class ControlCentreEmployees{ constructor(){ this.name = "controlcentreemployees"; } static allowEdit(){ return userrights.has("controlcentre.take"); } static isCustom(){ return true; } static GetColumns(){ return ["name","radio_short_name","id"] } static TableDataCreate(row, key){ let FgColor = System.GetFgColorByBgColor(row["radio_color"]); if(row["radio_color"] == ""){ row["radio_color"] = "#FFFFFF"; } if(key == "id"){ if(!this.allowEdit()){ return `` } return ` `; } else if(key == "radio_short_name"){ return ` ${row[key] == "" ? getTranslation("emergency_vehicles_no_radio") : row[key]} `; } else if(key == "name"){ return ` ${row["serviceno"] ?? System.getServiceNo(row.id)} - ${System.buildEmployeeName(row[key])} `; } else { return `${row[key]}`; } } }