forked from Simnation/Main
32 lines
762 B
JavaScript
32 lines
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>`;
|
||
|
}
|
||
|
}
|
||
|
}
|