Feature/rework vue schema
This commit is contained in:
@@ -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),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user