fix: do not update field value instead create copy of it and use on client side
This commit is contained in:
parent
9c59e4d0d8
commit
e27a662f71
@ -97,7 +97,7 @@ class CRMCallLog(Document):
|
||||
|
||||
def parse_call_log(call):
|
||||
call["show_recording"] = False
|
||||
call["duration"] = seconds_to_duration(call.get("duration"))
|
||||
call["_duration"] = seconds_to_duration(call.get("duration"))
|
||||
if call.get("type") == "Incoming":
|
||||
call["activity_type"] = "incoming_call"
|
||||
contact = get_contact_by_phone_number(call.get("from"))
|
||||
@ -106,11 +106,11 @@ def parse_call_log(call):
|
||||
if call.get("receiver")
|
||||
else [None, None]
|
||||
)
|
||||
call["caller"] = {
|
||||
call["_caller"] = {
|
||||
"label": contact.get("full_name", "Unknown"),
|
||||
"image": contact.get("image"),
|
||||
}
|
||||
call["receiver"] = {
|
||||
call["_receiver"] = {
|
||||
"label": receiver[0],
|
||||
"image": receiver[1],
|
||||
}
|
||||
@ -122,11 +122,11 @@ def parse_call_log(call):
|
||||
if call.get("caller")
|
||||
else [None, None]
|
||||
)
|
||||
call["caller"] = {
|
||||
call["_caller"] = {
|
||||
"label": caller[0],
|
||||
"image": caller[1],
|
||||
}
|
||||
call["receiver"] = {
|
||||
call["_receiver"] = {
|
||||
"label": contact.get("full_name", "Unknown"),
|
||||
"image": contact.get("image"),
|
||||
}
|
||||
|
||||
@ -9,9 +9,19 @@ export function getCallLogDetail(row, log, columns = []) {
|
||||
|
||||
if (row === 'duration') {
|
||||
return {
|
||||
label: log.duration,
|
||||
label: log._duration,
|
||||
icon: 'clock',
|
||||
}
|
||||
} else if (row === 'caller') {
|
||||
return {
|
||||
label: log._caller.label,
|
||||
image: log._caller.image,
|
||||
}
|
||||
} else if (row === 'receiver') {
|
||||
return {
|
||||
label: log._receiver.label,
|
||||
image: log._receiver.image,
|
||||
}
|
||||
} else if (row === 'type') {
|
||||
return {
|
||||
label: log.type,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user