diff --git a/Layout/default/VoiceCallActive/Index.php b/Layout/default/VoiceCallActive/Index.php index 2b182f9d8..a3753fe09 100644 --- a/Layout/default/VoiceCallActive/Index.php +++ b/Layout/default/VoiceCallActive/Index.php @@ -50,6 +50,8 @@ include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php") {{ new Date(row.answer_time).toLocaleString() }} + + @@ -66,6 +68,17 @@ include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php") data: { window: window, VoiceCallActiveTableConfig: { + customRowClass: function (row) { + if (!row.dst_device_extension) { + return 'bg-danger'; + } + if (row.status.toLowerCase() === 'ringing') { + return 'bg-warning'; + } + if (row.status.toLowerCase() === 'answered') { + return 'bg-success'; + } + }, headers: [ {text: 'ID', key: 'id', filter: false}, {text: 'Status', key: 'status', filter: false}, @@ -77,7 +90,7 @@ include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php") {text: 'Destination User', key: 'dst_user', filter: false}, {text: 'Destination Device Extension', key: 'dst_device_extension', filter: false}, ], - tableHeader: 'Voice Call History', + tableHeader: 'Active Voice Calls', }, refreshLoading: false, }, diff --git a/Layout/default/VoiceCallHistory/Index.php b/Layout/default/VoiceCallHistory/Index.php index fe8392989..44d205a23 100644 --- a/Layout/default/VoiceCallHistory/Index.php +++ b/Layout/default/VoiceCallHistory/Index.php @@ -61,9 +61,9 @@ include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php") window: window, VoiceCallHistoryTableConfig: { headers: [ - {text: "UID", key: "uid"}, + {text: "Call-ID", key: "uid"}, {text: "Voice Account", key: "voice_account"}, - {text: "Start", key: "start", filter: "dateRange"}, + {text: "Time Range", key: "start", filter: "dateRange"}, {text: "Source", key: "source"}, {text: "Destination", key: "destination"}, {text: "Billable", key: "billable"}, diff --git a/application/VoiceCallActive/VoiceCallActiveController.php b/application/VoiceCallActive/VoiceCallActiveController.php index 7a8a851fa..f3aa609a4 100644 --- a/application/VoiceCallActive/VoiceCallActiveController.php +++ b/application/VoiceCallActive/VoiceCallActiveController.php @@ -55,7 +55,7 @@ class VoiceCallActiveController extends mfBaseController { private function getActiveCalls(): array { return [ - "rows" => $this->kolmisoftMore->getActiveCalls() + "rows" => array_reverse($this->kolmisoftMore->getActiveCalls()) ]; } } \ No newline at end of file