Feature/rework vue schema

This commit is contained in:
Luca Haid
2024-05-10 21:03:01 +00:00
parent 1f30671cf9
commit 78c9d3ef37
34 changed files with 2290 additions and 1146 deletions

View File

@@ -15,7 +15,21 @@ class HistoricTicketController extends mfBaseController {
if (!$this->me->is("employee")) {
$this->redirect("dashboard");
}
$this->layout()->setTemplate("HistoricTicket/Index");
$JSGlobals = ["BASE_URL" => self::getUrl("Domain"),
"DASHBOARD_URL" => self::getUrl("Dashboard"),
"MFAPPNAME" => MFAPPNAME_SLUG,
"PAGE_TITLE" => "Historische Tickets",
"PATH" => [
["text" => MFAPPNAME_SLUG, "href" => self::getUrl("Dashboard")],
["text" => "Historische Tickets", "href" => self::getUrl("HistoricTicket")]
],
"HISTORIC_TICKET_API_URL" => self::getUrl("HistoricTicket/api"),
];
$this->layout()->set("vueViewName", "HistoricTicket");
$this->layout()->set("JSGlobals", $JSGlobals);
$this->layout()->setTemplate("VueViews/Vue");
}
protected function apiAction() {
@@ -66,7 +80,7 @@ class HistoricTicketController extends mfBaseController {
"rows" => $historicTickets,
"pagination" => [
"page" => $page,
"total_pages" => ceil($totalRows / $perPage),
"total_pages" => ceil($filtered_available / $perPage),
"per_page" => $perPage,
"filtered_available" => intval($filtered_available),
"total_rows" => intval($totalRows)