Reversed Order, fixed column labels and added colors
This commit is contained in:
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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"},
|
||||
|
||||
@@ -55,7 +55,7 @@ class VoiceCallActiveController extends mfBaseController {
|
||||
|
||||
private function getActiveCalls(): array {
|
||||
return [
|
||||
"rows" => $this->kolmisoftMore->getActiveCalls()
|
||||
"rows" => array_reverse($this->kolmisoftMore->getActiveCalls())
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user