fix: Call popup UI
This commit is contained in:
parent
c8c17422f7
commit
6a87e3338b
@ -19,12 +19,14 @@ class CallPopup {
|
|||||||
'fieldtype': 'Small Text',
|
'fieldtype': 'Small Text',
|
||||||
'label': "Last Communication",
|
'label': "Last Communication",
|
||||||
'fieldname': 'last_communication',
|
'fieldname': 'last_communication',
|
||||||
'read_only': true
|
'read_only': true,
|
||||||
|
'default': `<i class="text-muted">${__('No communication found.')}<i>`
|
||||||
}, {
|
}, {
|
||||||
'fieldtype': 'Small Text',
|
'fieldtype': 'Small Text',
|
||||||
'label': "Last Issue",
|
'label': "Last Issue",
|
||||||
'fieldname': 'last_issue',
|
'fieldname': 'last_issue',
|
||||||
'read_only': true
|
'read_only': true,
|
||||||
|
'default': `<i class="text-muted">${__('No issue raised by the customer.')}<i>`
|
||||||
}, {
|
}, {
|
||||||
'fieldtype': 'Column Break',
|
'fieldtype': 'Column Break',
|
||||||
}, {
|
}, {
|
||||||
@ -76,12 +78,12 @@ class CallPopup {
|
|||||||
</div>
|
</div>
|
||||||
`);
|
`);
|
||||||
} else {
|
} else {
|
||||||
|
const contact_name = frappe.utils.get_form_link('Contact', contact.name, true);
|
||||||
const link = contact.links ? contact.links[0] : null;
|
const link = contact.links ? contact.links[0] : null;
|
||||||
const contact_link = link ? frappe.utils.get_form_link(link.link_doctype, link.link_name, true): '';
|
let contact_link = link ? frappe.utils.get_form_link(link.link_doctype, link.link_name, true): '';
|
||||||
const contact_name = `${contact.first_name || ''} ${contact.last_name || ''}`
|
|
||||||
wrapper.append(`
|
wrapper.append(`
|
||||||
<div class="caller-info flex">
|
<div class="caller-info flex">
|
||||||
${frappe.avatar(null, 'avatar-xl', contact_name, contact.image)}
|
${frappe.avatar(null, 'avatar-xl', contact.name, contact.image)}
|
||||||
<div>
|
<div>
|
||||||
<h5>${contact_name}</h5>
|
<h5>${contact_name}</h5>
|
||||||
<div>${contact.mobile_no || ''}</div>
|
<div>${contact.mobile_no || ''}</div>
|
||||||
@ -132,6 +134,7 @@ class CallPopup {
|
|||||||
call_disconnected(call_log) {
|
call_disconnected(call_log) {
|
||||||
frappe.utils.play_sound("call_disconnect");
|
frappe.utils.play_sound("call_disconnect");
|
||||||
this.update_call_log(call_log);
|
this.update_call_log(call_log);
|
||||||
|
setTimeout(this.get_close_btn().click, 10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
make_last_interaction_section() {
|
make_last_interaction_section() {
|
||||||
@ -145,8 +148,6 @@ class CallPopup {
|
|||||||
// this.dialog.set_df_property('last_interaction', 'hidden', false);
|
// this.dialog.set_df_property('last_interaction', 'hidden', false);
|
||||||
comm_field.set_value(comm.content);
|
comm_field.set_value(comm.content);
|
||||||
comm_field.$wrapper.append(frappe.utils.get_form_link('Communication', comm.name));
|
comm_field.$wrapper.append(frappe.utils.get_form_link('Communication', comm.name));
|
||||||
} else {
|
|
||||||
comm_field.$wrapper.hide();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.last_issue) {
|
if (data.last_issue) {
|
||||||
@ -154,8 +155,9 @@ class CallPopup {
|
|||||||
// this.dialog.set_df_property('last_interaction', 'hidden', false);
|
// this.dialog.set_df_property('last_interaction', 'hidden', false);
|
||||||
const issue_field = this.dialog.fields_dict["last_issue"];
|
const issue_field = this.dialog.fields_dict["last_issue"];
|
||||||
issue_field.set_value(issue.subject);
|
issue_field.set_value(issue.subject);
|
||||||
issue_field.$wrapper
|
issue_field.$wrapper.append(`<a class="text-medium" href="#List/Issue?customer=${issue.customer}">
|
||||||
.append(`<a class="text-medium" href="#List/Issue/List?customer=${issue.customer}">View all issues from ${issue.customer}</a>`);
|
View all issues from ${issue.customer}
|
||||||
|
</a>`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,4 +2,8 @@
|
|||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
.for-description {
|
||||||
|
max-height: 250px;
|
||||||
|
overflow: scroll;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user