forked from Simnation/Main
40 lines
No EOL
794 B
JavaScript
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>`;
|
|
}
|
|
}
|
|
} |