1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-06-05 22:09:38 +02:00

Miglioramento modulo Statistiche

This commit is contained in:
Thomas Zilio
2019-07-11 12:04:22 +02:00
parent 3f73aa4def
commit 65fcdf57a2
21 changed files with 505 additions and 392 deletions

View File

@ -0,0 +1,38 @@
class Manager {
constructor(info) {
this.info = info;
this.calendars = {};
}
remove(name) {
if (Object.keys(this.calendars).length > 1) {
this.calendars[name].remove();
delete this.calendars[name];
return true;
}
return false;
}
add(id, name) {
var calendar = new Calendar(this.info, id);
this.calendars[name] = calendar;
return calendar;
}
init(name) {
var calendar = this.calendars[name];
var start = this.info.start_date;
var end = this.info.end_date;
calendar.update(start, end);
}
update(name, start, end){
this.calendars[name].update(start, end);
}
}