class Licenses{ constructor(){ this.name = "licenses"; } static GetColumns(){ return ["name","id"] } static allowAddNew(){ return userrights.has("licenses.edit") && (!sync.isActive("licenses") || currentSystem == "medic") } static allowEdit(){ return userrights.has("licenses.edit") && (!sync.isActive("licenses") || currentSystem == "medic") } static allowDelete(){ return userrights.has("licenses.delete") && (!sync.isActive("licenses") || currentSystem == "medic") } static TableDataCreate(row, key){ if(key == "id"){ return ` ${Form.getEditButtonIcon(row[key] , this.name + ".edit", this.allowEdit())} ${Form.getDeleteButtonIcon(row[key], this.name, this.allowDelete())} `; } else{ return `${row[key]}`; } } static GetEdit(data={}){ return { "name": { "val" : data.name ?? "" ,"type" : "text" ,"isRow": true ,"mandatory":true } } } }