fix: do not show caller/receiver if empty
This commit is contained in:
parent
f9c97ce51b
commit
26a20e048c
@ -17,20 +17,20 @@ export function getCallLogDetail(row, log, columns = []) {
|
|||||||
? getContact(log.from)?.full_name ||
|
? getContact(log.from)?.full_name ||
|
||||||
getLeadContact(log.from)?.full_name ||
|
getLeadContact(log.from)?.full_name ||
|
||||||
'Unknown'
|
'Unknown'
|
||||||
: getUser(log.caller).full_name,
|
: log.caller && getUser(log.caller).full_name,
|
||||||
image: incoming
|
image: incoming
|
||||||
? getContact(log.from)?.image || getLeadContact(log.from)?.image
|
? getContact(log.from)?.image || getLeadContact(log.from)?.image
|
||||||
: getUser(log.caller).user_image,
|
: log.caller && getUser(log.caller).user_image,
|
||||||
}
|
}
|
||||||
} else if (row === 'receiver') {
|
} else if (row === 'receiver') {
|
||||||
return {
|
return {
|
||||||
label: incoming
|
label: incoming
|
||||||
? getUser(log.receiver).full_name
|
? log.receiver && getUser(log.receiver).full_name
|
||||||
: getContact(log.to)?.full_name ||
|
: getContact(log.to)?.full_name ||
|
||||||
getLeadContact(log.to)?.full_name ||
|
getLeadContact(log.to)?.full_name ||
|
||||||
'Unknown',
|
'Unknown',
|
||||||
image: incoming
|
image: incoming
|
||||||
? getUser(log.receiver).user_image
|
? log.receiver && getUser(log.receiver).user_image
|
||||||
: getContact(log.to)?.image || getLeadContact(log.to)?.image,
|
: getContact(log.to)?.image || getLeadContact(log.to)?.image,
|
||||||
}
|
}
|
||||||
} else if (row === 'duration') {
|
} else if (row === 'duration') {
|
||||||
@ -82,7 +82,7 @@ export const statusLabelMap = {
|
|||||||
Busy: 'Declined',
|
Busy: 'Declined',
|
||||||
Failed: 'Failed',
|
Failed: 'Failed',
|
||||||
Queued: 'Queued',
|
Queued: 'Queued',
|
||||||
Cancelled: 'Cancelled',
|
Canceled: 'Canceled',
|
||||||
Ringing: 'Ringing',
|
Ringing: 'Ringing',
|
||||||
'No Answer': 'Missed Call',
|
'No Answer': 'Missed Call',
|
||||||
'In Progress': 'In Progress',
|
'In Progress': 'In Progress',
|
||||||
@ -94,7 +94,7 @@ export const statusColorMap = {
|
|||||||
Failed: 'red',
|
Failed: 'red',
|
||||||
Initiated: 'gray',
|
Initiated: 'gray',
|
||||||
Queued: 'gray',
|
Queued: 'gray',
|
||||||
Cancelled: 'gray',
|
Canceled: 'gray',
|
||||||
Ringing: 'gray',
|
Ringing: 'gray',
|
||||||
'No Answer': 'red',
|
'No Answer': 'red',
|
||||||
'In Progress': 'blue',
|
'In Progress': 'blue',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user