class SpeedcamsProfit{
constructor(){
this.name = "speedcamsprofit";
}
static allowAddNew(){
return false;
}
static GetColumns(){
return ["state", "type", "name", "totalProfit", "lastTime", "lastProfit", "id"]
}
static TableDataCreate(row, key){
if(key == "id"){
if(row.allowRoute){
let coords = {}
coords.x = row.positionX;
coords.y = row.positionY;
coords = JSON.stringify(coords);
return `
| `;
}
else{
return ` | `;
}
}
else if(key == "type"){
let text = getTranslation("speedcamtype." + row[key]);
let badge = `${text}
`;
if(row[key] == "mobile"){
badge = `${text}
`;
}
return `${badge} | `;
}
else if(key == "state"){
let text = getTranslation("speedcam_active." + row[key]);
let badge = `${text}
`;
if(row[key] == 1){
badge = `${text}
`;
}
return `${badge} | `;
}
else{
return `${row[key]} | `;
}
}
}