forked from Simnation/Main
ed
This commit is contained in:
parent
48a36209b5
commit
884f3df7cf
262 changed files with 223207 additions and 2 deletions
40
resources/[jobs]/[mdt]/myEmergency/html/js/modules/Prison.js
Normal file
40
resources/[jobs]/[mdt]/myEmergency/html/js/modules/Prison.js
Normal file
|
@ -0,0 +1,40 @@
|
|||
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>`;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue