added new adbrimofcp map
This commit is contained in:
@@ -1788,4 +1788,26 @@ class PreorderController extends mfBaseController {
|
||||
$this->layout()->set("JSGlobals", $JSGlobals);
|
||||
$this->layout()->setTemplate("VueViews/Vue"); // Assuming a generic Vue template
|
||||
}
|
||||
|
||||
public function RimoTypeMapAction() {
|
||||
$allowedCampaigns = Helper::getPreorderCampaignFromUser($this->me);
|
||||
$campaignId = $this->request->preordercampaign_id ?? null;
|
||||
if (!$campaignId || !in_array($campaignId, $allowedCampaigns)) {
|
||||
$this->layout()->setFlash("Ungültige oder keine Kampagne ausgewählt.", "warning");
|
||||
$this->redirect("Preorder", "Index");
|
||||
}
|
||||
|
||||
Helper::renderVue($this, "PreorderRimoTypeMap", "PreorderRimoTypeMap", ["MAPBOX_KEY" => TT_MAPBOX_TILE_API_TOKEN]);
|
||||
}
|
||||
|
||||
public function RimoTypeMapDataAction() {
|
||||
$input = json_decode(file_get_contents('php://input'), true);
|
||||
$campaignId = $input['campaignId'] ?? null;
|
||||
$allowedCampaigns = Helper::getPreorderCampaignFromUser($this->me);
|
||||
|
||||
if (!$campaignId || !in_array($campaignId, $allowedCampaigns)) self::sendError('Ungültige oder keine Kampagne ausgewählt.');
|
||||
|
||||
$data = PreorderModel::getPreorderRimoTypeData($campaignId);
|
||||
self::returnJson(['success' => true, 'data' => $data]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user