class ControlCentreEmergancyVehicles{ constructor(){ this.name = "controlcentreemployees"; } static allowEdit(){ return userrights.has("controlcentre.take"); } static isCustom(){ return true; } static GetColumns(){ return ["short_name","name","employees","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 ` `; } else{ return ``; } } else if(key == "radio_short_name"){ return ` ${row[key] == "" ? getTranslation("emergency_vehicles_no_radio") : row[key]} `; } else if(key == "employees"){ return ` ${System.buildEmployeeName(row[key])} `; } else { return `${row[key]}`; } } }