Vue.component('VoiceCallHistory', { //language=Vue template: ` `, data() { return { window: window, VoiceCallHistoryTableConfig: { headers: [{text: "Call-ID", key: "uid"}, {text: "Voice Account", key: "voice_account"}, {text: "Time Range", key: "start", filter: "date"}, {text: "Source", key: "source"}, {text: "Destination", key: "destination"}, { text: "Billable", key: "billable", filter: "iconSelect", filterOptions: [{value: 1, text: 'Yes', icon: 'fas fa-check text-success'}, {value: 0, text: 'No', icon: 'fas fa-times text-danger'}] }, {text: "Duration", key: "duration", filter: "numberRange"},], tableHeader: 'Voice Call History', key: 'VoiceCallHistory', }, importCallsFromTodayLoading: false, } }, methods: { async importCallsFromToday() { this.importCallsFromTodayLoading = true; const response = await axios.get(window['TT_CONFIG']['VOICE_CALL_HISTORY_API_URL'] + '?do=importCallsFromToday'); window.notify(response.data.status === 'success' ? 'success' : 'error', response.data.message); await this.$refs.table.fetchData(); this.importCallsFromTodayLoading = false; }, } })