class Personal extends Route { static route = "Personal"; static array = {}; static groups = {}; static subs = { "Abteilungen": {color: "purple", icon: "department.png", entries: []}, "Gruppen": {color: "olive", icon: "group.png", entries: []}, "Lehrgänge": {color: "teal", icon: "skill.png", entries: []}, "Einweisungen": {color: "chocolate", icon: "person.png", entries: []} }; static selects = { "Kategorie" : [], "Funktion" : [] }; static admin = true; // global page admin rights static prints = []; static filter = []; //static selected = []; //static dropzones = {}; static visible = false; constructor(groupName, json) { super( groupName, json, Personal.route, Personal.array, Personal.groups, Personal.subs, Personal.selects, Personal.admin/*, Personal.prints, Personal.filter, Personal.selected, Personal.dropzones*/ ); } init(json) { this.OFNr = json.MAIN.OFNR; this.PNr = json.MAIN.PNR; this.Nr = json.MAIN.NR; this.Login = json.MAIN.LOGIN; this.Email = json.MAIN.EMAIL; this.Vornamen = json.MAIN.VORNAMEN; this.Nachnamen = json.MAIN.NACHNAMEN; this.Name = json.MAIN.NAME; this.Bild = json.MAIN.BILD; this.Kategorie = json.MAIN.KATEGORIE; this.Funktion = json.MAIN.FUNKTION; } renderEntry(drawEdit) { let html = "
"; if (this.Bild.EXISTIERT) { html+= ""; if (drawEdit) { html+= "
"; } } else { html+= ""; } if (drawEdit) { html+= "
"; } html += "
"; document.getElementById(this.marker("Main")).innerHTML = html; } static RenderAdd() { let html = "

Fahrzeug hinzufügen

" + "
"; return html; } renderGroup() { return Personal.RenderGroup(this.groupName); } static RenderGroup(groupName) { return { begin: "

" + groupName + "

", end: "
" }; } static New(groupName, json) { return new Personal(groupName, json); } collect() { return Personal.Collect(this.ID); } static Collect(id, contextId = null) { return { ID: id, OFNR: this.Value(id, "OFNr"), PNR: this.Value(id, "PNr"), NACHNAMEN: this.Value(id, "Nachnamen"), VORNAMEN: this.Value(id, "Vornamen"), KATEGORIE: this.Value(id, "Kategorie"), LOGIN: this.Value(id, "Login"), FUNKTION: this.Value(id, "Funktion") }; } static RenderSelect(selectId, fahrzeugId, nullable = true) { let html = ""; return html; } }