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

32 lines
No EOL
762 B
JavaScript

class SpeedcamsMobile{
constructor(){
this.name = "speedcamsmobile";
}
static allowAddNew(){
return false;
}
static GetColumns(){
return ["name","totalProfit","lastTime","lastProfit","id"]
}
static TableDataCreate(row, key){
if(key == "id"){
let coords = {}
coords.x = row.positionX;
coords.y = row.positionY;
coords = JSON.stringify(coords);
return `
<td>
<button type="button" class="btn btn-primary btn-sm" data-entering='${coords}' onclick="GenerateRoute(this, false)">
<i class="fa-solid fa-location-dot"></i>
<button>
</td>`;
}
else{
return `<td>${row[key]}</td>`;
}
}
}