Reversed Order, fixed column labels and added colors

This commit is contained in:
Luca Haid
2024-04-11 17:13:13 +02:00
parent f39978e7a9
commit d7e4b76f0d
3 changed files with 17 additions and 4 deletions

View File

@@ -50,6 +50,8 @@ include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php")
{{ new Date(row.answer_time).toLocaleString() }}
</template>
<!-- dst_device_extension -->
</tt-table>
</div>
@@ -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,
},

View File

@@ -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"},

View File

@@ -55,7 +55,7 @@ class VoiceCallActiveController extends mfBaseController {
private function getActiveCalls(): array {
return [
"rows" => $this->kolmisoftMore->getActiveCalls()
"rows" => array_reverse($this->kolmisoftMore->getActiveCalls())
];
}
}