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

@@ -24,7 +24,21 @@ class VoiceCallActiveController extends mfBaseController {
}
protected function indexAction(): void {
$this->layout()->setTemplate("VoiceCallActive/Index");
$JSGlobals = ["BASE_URL" => self::getUrl("VoiceCallActive"),
"DASHBOARD_URL" => self::getUrl("Dashboard"),
"MFAPPNAME" => MFAPPNAME_SLUG,
"PAGE_TITLE" => "Active Voice Calls",
"PATH" => [
["text" => MFAPPNAME_SLUG, "href" => self::getUrl("Dashboard")],
["text" => "Active Voice Calls", "href" => self::getUrl("VoiceCallActive")]
],
"VOICE_CALL_ACTIVE_API_URL" => self::getUrl("VoiceCallActive/api"),
];
$this->layout()->set("additionalCSS", ["css/views/VoiceCallActive.css"]);
$this->layout()->set("vueViewName", "VoiceCallActive");
$this->layout()->set("JSGlobals", $JSGlobals);
$this->layout()->setTemplate("VueViews/Vue");
}
protected function apiAction() {
@@ -54,8 +68,10 @@ class VoiceCallActiveController extends mfBaseController {
}
private function getActiveCalls(): array {
$activeCalls = $this->kolmisoftMore->getActiveCalls();
return [
"rows" => array_reverse($this->kolmisoftMore->getActiveCalls())
"rows" => is_null($activeCalls) ? [] : (is_object($activeCalls) ? [$activeCalls] : $activeCalls),
];
}
}