Finished off the agenda and minutes features in the adm page. Added another six events to the calendar.

This commit is contained in:
2025-07-10 12:40:53 +10:00
parent 558012bf89
commit 3e32ea92b4
7 changed files with 121 additions and 29 deletions

View File

@@ -1,7 +1,8 @@
var dbg = null;
Vue.createApp({
data: function() {
return { 'events': null
, 'frm': { 'e': null, 'modal': null }
, 'frm': { 'e': null, 'modal': null, 'tab': 'agenda' }
, 'faults': null
, 'fields': { 'coordinates': { 'patterns': [ '^$', '^-?\\d{1,3}(?:\\.\\d+)?,-?\\d{1,3}(?:\\.\\d+)?$' ], 'default': '-27.38621539644283,153.0351689206467' }
, 'start': { 'patterns': [ '^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:?\\d{0,2}$' ], 'default': '' }
@@ -22,6 +23,19 @@ Vue.createApp({
var ret = moment(dt).format(fmt);
return ret;
},
tabEnabled: function(e, tab) {
var ret = ( Object.keys(this.events[e]).indexOf(tab) >= 0 );
return ret;
},
toggleMD: function(evt) {
evt.preventDefault();
if ( this.events[this.frm.e][this.frm.tab] == undefined ) {
this.events[this.frm.e][this.frm.tab] = '';
} else {
delete this.events[this.frm.e][this.frm.tab];
}
this.events = JSON.parse(JSON.stringify(this.events));
},
hoursDiff: function(d1, d2) {
return moment(d2).diff(moment(d1), 'hours', true);
},
@@ -125,6 +139,7 @@ Vue.createApp({
}
},
mounted: function() {
dbg = this;
this.load();
}
}).mount('#app')