diff --git a/erpnext/public/js/call_popup/call_popup.js b/erpnext/public/js/call_popup/call_popup.js index 501299c0a82..6510a0f8623 100644 --- a/erpnext/public/js/call_popup/call_popup.js +++ b/erpnext/public/js/call_popup/call_popup.js @@ -19,12 +19,14 @@ class CallPopup { 'fieldtype': 'Small Text', 'label': "Last Communication", 'fieldname': 'last_communication', - 'read_only': true + 'read_only': true, + 'default': `${__('No communication found.')}` }, { 'fieldtype': 'Small Text', 'label': "Last Issue", 'fieldname': 'last_issue', - 'read_only': true + 'read_only': true, + 'default': `${__('No issue raised by the customer.')}` }, { 'fieldtype': 'Column Break', }, { @@ -76,12 +78,12 @@ class CallPopup { `); } else { + const contact_name = frappe.utils.get_form_link('Contact', contact.name, true); const link = contact.links ? contact.links[0] : null; - const contact_link = link ? frappe.utils.get_form_link(link.link_doctype, link.link_name, true): ''; - const contact_name = `${contact.first_name || ''} ${contact.last_name || ''}` + let contact_link = link ? frappe.utils.get_form_link(link.link_doctype, link.link_name, true): ''; wrapper.append(`
- ${frappe.avatar(null, 'avatar-xl', contact_name, contact.image)} + ${frappe.avatar(null, 'avatar-xl', contact.name, contact.image)}
${contact_name}
${contact.mobile_no || ''}
@@ -132,6 +134,7 @@ class CallPopup { call_disconnected(call_log) { frappe.utils.play_sound("call_disconnect"); this.update_call_log(call_log); + setTimeout(this.get_close_btn().click, 10000); } make_last_interaction_section() { @@ -145,8 +148,6 @@ class CallPopup { // this.dialog.set_df_property('last_interaction', 'hidden', false); comm_field.set_value(comm.content); comm_field.$wrapper.append(frappe.utils.get_form_link('Communication', comm.name)); - } else { - comm_field.$wrapper.hide(); } if (data.last_issue) { @@ -154,8 +155,9 @@ class CallPopup { // this.dialog.set_df_property('last_interaction', 'hidden', false); const issue_field = this.dialog.fields_dict["last_issue"]; issue_field.set_value(issue.subject); - issue_field.$wrapper - .append(`View all issues from ${issue.customer}`); + issue_field.$wrapper.append(` + View all issues from ${issue.customer} + `); } }); } diff --git a/erpnext/public/less/call_popup.less b/erpnext/public/less/call_popup.less index 4b2ddfa9b4f..32e85ce16d9 100644 --- a/erpnext/public/less/call_popup.less +++ b/erpnext/public/less/call_popup.less @@ -2,4 +2,8 @@ a:hover { text-decoration: underline; } + .for-description { + max-height: 250px; + overflow: scroll; + } } \ No newline at end of file