feat: added basic info. of lead in header part
This commit is contained in:
parent
f4f0dde838
commit
49cfac0ef0
@ -42,6 +42,7 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller
|
||||
|
||||
if (!this.frm.is_new()) {
|
||||
frappe.contacts.render_address_and_contact(this.frm);
|
||||
cur_frm.trigger('render_basic_info_html');
|
||||
} else {
|
||||
frappe.contacts.clear_address_and_contact(this.frm);
|
||||
}
|
||||
@ -81,6 +82,45 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller
|
||||
this.frm.set_value("ends_on", d.format(frappe.defaultDatetimeFormat));
|
||||
}
|
||||
}
|
||||
|
||||
render_basic_info_html() {
|
||||
let html='';
|
||||
if (cur_frm.doc.lead_owner){
|
||||
html += `<div class="col-xs-2">
|
||||
<span><b> Lead Owner </b></span>
|
||||
</div>
|
||||
<div class="col-xs-10">
|
||||
<span> ${cur_frm.doc.lead_owner} </span>
|
||||
</div>` ;
|
||||
}
|
||||
|
||||
if (cur_frm.doc.email_id){
|
||||
html += `<div class="col-xs-2">
|
||||
<span><b> Email </b></span>
|
||||
</div>
|
||||
<div class="col-xs-10">
|
||||
<span> ${cur_frm.doc.email_id} </span>
|
||||
</div>` ;
|
||||
}
|
||||
|
||||
if (cur_frm.doc.mobile_no){
|
||||
html += `<div class="col-xs-2">
|
||||
<span><b> Mobile </b></span>
|
||||
</div>
|
||||
<div class="col-xs-10">
|
||||
<span> ${cur_frm.doc.mobile_no} </span>
|
||||
</div>` ;
|
||||
}
|
||||
|
||||
html += `<div class="col-xs-2">
|
||||
<span><b> Status </b></span>
|
||||
</div>
|
||||
<div class="col-xs-10">
|
||||
<span> ${cur_frm.doc.status} </span>
|
||||
</div>` ;
|
||||
html = `<div class="row">${html}</div>`;
|
||||
cur_frm.dashboard.set_headline_alert(html);
|
||||
}
|
||||
};
|
||||
|
||||
extend_cscript(cur_frm.cscript, new erpnext.LeadController({ frm: cur_frm }));
|
||||
|
@ -486,7 +486,7 @@
|
||||
"idx": 5,
|
||||
"image_field": "image",
|
||||
"links": [],
|
||||
"modified": "2021-06-17 00:20:37.768449",
|
||||
"modified": "2021-07-28 00:20:37.768449",
|
||||
"modified_by": "Administrator",
|
||||
"module": "CRM",
|
||||
"name": "Lead",
|
||||
|
Loading…
Reference in New Issue
Block a user