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

@@ -26,7 +26,21 @@ class DomainController extends mfBaseController {
}
protected function indexAction(): void {
$this->layout()->setTemplate("Domain/Index");
$JSGlobals = ["BASE_URL" => self::getUrl("Domain"),
"DASHBOARD_URL" => self::getUrl("Dashboard"),
"MFAPPNAME" => MFAPPNAME_SLUG,
"PAGE_TITLE" => "Domains",
"PATH" => [
["text" => MFAPPNAME_SLUG, "href" => self::getUrl("Dashboard")],
["text" => "Domain Management", "href" => self::getUrl("Domain")],
["text" => "Domains"]
],
"DOMAIN_API_URL" => self::getUrl("Domain/api"),
];
$this->layout()->set("vueViewName", "Domain");
$this->layout()->set("JSGlobals", $JSGlobals);
$this->layout()->setTemplate("VueViews/Vue");
}
protected function apiAction() {
@@ -128,7 +142,7 @@ class DomainController extends mfBaseController {
"rows" => $domains,
"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)