class Employees{ constructor(){ this.name = "employees"; } static allowEdit(){ return userrights.has("employees.edit"); } static allowAddNew(){ return false; } static allowSuspend(){ return userrights.has("employees.suspend") } static allowViewEmployeeEntries(){ return userrights.has("employeesentries.view") } static allowEditEmployeeEntries(){ return userrights.has("employeesentries.edit") } static allowDeleteEmployeeEntries(){ return userrights.has("employeesentries.delete") } static allowFinishEmployeeEntries(){ return userrights.has("employeesentries.finish") } static allowViewUserTrainings(){ return userrights.has("trainingsemployees.view") } static GetExtraForView(data){ let retval = { top:"", bottom:"" } let suspendedText = getTranslation("suspend"); let suspended_new = 1; if(data.extraData.is_suspended !== undefined && data.extraData.is_suspended.length > 0 && data.extraData.is_suspended[0].is_suspended == true){ suspendedText = getTranslation("unsuspend"); suspended_new = 0; } let buttons = ``; if(this.allowSuspend()){ buttons += ``; //buttons += ``; } if(this.allowEditEmployeeEntries()){ buttons += ``; } if(this.allowViewUserTrainings()){ buttons += ``; } retval.bottom += `
${row.content.replace(/\n/g,"
")}