feat: add fcp map

fix: fixed lazy fcp search
fix: try to fix preorder filter
This commit is contained in:
Luca Haid
2025-04-08 11:46:10 +02:00
parent 3d3e082fb5
commit 26b92c411c
7 changed files with 323 additions and 6 deletions

View File

@@ -101,4 +101,28 @@ class ADBRimoFcpController extends TTCrud {
$counts['upd'], $counts['fcpNF'], $counts['noFCP'], $counts['noExtId']);
self::returnJson(['success' => true, 'message' => $msg]);
}
public function MapAction() {
Helper::renderVue($this, "ADBRimoFcpMap", "ADBRimoFcpMap", [
"MAPBOX_KEY" => TT_MAPBOX_TILE_API_TOKEN,
]);
}
public function getAllFCPsAction() {
$input = json_decode(file_get_contents('php://input'), true);
$fcpList = ADBRimoFcp::getAll();
$fcpData = array_map(function ($fcp) {
return [
'id' => $fcp->id,
// 'rimo_ex_state' => $fcp->rimo_ex_state,
// 'rimo_op_state' => $fcp->rimo_op_state,
'gps_lat' => $fcp->gps_lat,
'gps_long' => $fcp->gps_long
];
}, $fcpList);
self::returnJson(['success' => true, 'data' => $fcpData]);
}
}