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

40 lines
No EOL
794 B
JavaScript

class Prison{
constructor(){
this.name = "prison";
}
static allowView(){
return userrights.has("prison.view");
}
static allowAddNew(){
return false;
}
static allowEdit(){
return false;
}
static allowDelete(){
return false;
}
static GetColumns(){
return ["playername","prison","reason","remainingTime","date"]
}
static TableDataCreate(row, key){
if(key == "date"){
return `
<td>
${row[key]}<br>${row["officerName"]}
</td>`;
}
else if(key == "remainingTime"){
return `
<td>
${System.convertSecondsToTime(row[key])}
</td>`;
}
else{
return `<td>${row[key]}</td>`;
}
}
}