fix: added mapping to call log status to display on Ui
This commit is contained in:
parent
4b9a31c2a3
commit
d47f5bae13
@ -35,9 +35,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<Badge
|
<Badge
|
||||||
:variant="'subtle'"
|
:variant="'subtle'"
|
||||||
:theme="callLog.data.status === 'Completed' ? 'green' : 'gray'"
|
:theme="statusColorMap[callLog.data.status]"
|
||||||
size="md"
|
size="md"
|
||||||
:label="callLog.data.status"
|
:label="statusLabelMap[callLog.data.status]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -245,6 +245,22 @@ const breadcrumbs = computed(() => [
|
|||||||
route: { name: 'Call Log', params: { callLogId: props.callLogId } },
|
route: { name: 'Call Log', params: { callLogId: props.callLogId } },
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
|
const statusLabelMap = {
|
||||||
|
Completed: 'Completed',
|
||||||
|
Busy: 'Declined',
|
||||||
|
Ringing: 'Ringing',
|
||||||
|
'No Answer': 'Missed Call',
|
||||||
|
'In Progress': 'In Progress',
|
||||||
|
}
|
||||||
|
|
||||||
|
const statusColorMap = {
|
||||||
|
Completed: 'green',
|
||||||
|
Busy: 'orange',
|
||||||
|
Ringing: 'gray',
|
||||||
|
'No Answer': 'red',
|
||||||
|
'In Progress': 'blue',
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@ -103,8 +103,8 @@ const rows = computed(() => {
|
|||||||
}
|
}
|
||||||
} else if (row === 'status') {
|
} else if (row === 'status') {
|
||||||
_rows[row] = {
|
_rows[row] = {
|
||||||
label: callLog.status,
|
label: statusLabelMap[callLog.status],
|
||||||
color: callLog.status === 'Completed' ? 'green' : 'gray',
|
color: statusColorMap[callLog.status],
|
||||||
}
|
}
|
||||||
} else if (['modified', 'creation'].includes(row)) {
|
} else if (['modified', 'creation'].includes(row)) {
|
||||||
_rows[row] = {
|
_rows[row] = {
|
||||||
@ -116,4 +116,20 @@ const rows = computed(() => {
|
|||||||
return _rows
|
return _rows
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const statusLabelMap = {
|
||||||
|
Completed: 'Completed',
|
||||||
|
Busy: 'Declined',
|
||||||
|
Ringing: 'Ringing',
|
||||||
|
'No Answer': 'Missed Call',
|
||||||
|
'In Progress': 'In Progress',
|
||||||
|
}
|
||||||
|
|
||||||
|
const statusColorMap = {
|
||||||
|
Completed: 'green',
|
||||||
|
Busy: 'orange',
|
||||||
|
Ringing: 'gray',
|
||||||
|
'No Answer': 'red',
|
||||||
|
'In Progress': 'blue',
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user