1
0
Fork 0
forked from Simnation/Main
This commit is contained in:
Nordi98 2025-08-14 13:21:51 +02:00
parent 48a36209b5
commit 884f3df7cf
262 changed files with 223207 additions and 2 deletions

View file

@ -0,0 +1,52 @@
class RankManagement{
static isCustom(){
return true;
}
static allowAddNew(){
return false;
}
static CreateCustom(data){
data.noLimit = true;
data.pageNum = 1;
data.count = data.data.length;
let tempdata = [];
for(let i=0; i<data.data.length; i++){
tempdata[data.data[i].grade] = data.data[i]
}
data.data = []
tempdata.forEach(function(element){
data.data.push(element)
});
System.CreateOverView(this, data)
}
static GetColumns(){
return ["name","id"]
}
static TableDataCreate(row, key){
if(key == "id"){
let disabled = "";
if(row.isboss){
disabled = " disabled"
}
return `
<td>
<button type="button" onclick="loadPage('rankmanagementrights.dataload', '${row.grade}')" class="btn btn-sm btn-primary" ${disabled}>${getTranslation("set_rights")}</button>
</td>`;
}
else{
return `<td>${row[key]}</td>`;
}
}
static GetEdit(data={}){
}
}