1
0
Fork 0
forked from Simnation/Main
Main/resources/[jobs]/[mdt]/myEmergency/html/js/modules/EmployeesEntry.js
2025-08-14 13:21:51 +02:00

45 lines
No EOL
1.1 KiB
JavaScript

class EmployeesEntry{
constructor(){
this.name = "employeesentry";
}
static GetCustomDestination(data, dest){
return (data.employee_id ?? "" != "" ? "employees.view" : "employees.overview");
}
static GetCustomDestID(data, destID){
return data.employee_id ?? destID;
}
static GetColumns(){
return [];
}
static TableDataCreate(row, key){
return `<td>${row[key]}</td>`;
}
static GetEdit(data = {}){
return {
"employee_id": {
"val" : data.employee_id ?? ""
,"type" : "hidden"
,"mandatory":true
}
,"content": {
"val" : data.content ?? ""
,"type" : "textarea"
,"mandatory":true
,"isRow":true
,autogrow: true
}
,"type_of_entry": {
"val" : data.type_of_entry ?? 0
,"type" : "dropdown"
,"mandatory":true
,"isRow":true
,"options":System.getEmployeeEntryTypesOptions()
}
};
}
}