diff --git a/erpnext/crm/call_summary/call_summary_utils.py b/erpnext/crm/call_summary/call_summary_utils.py new file mode 100644 index 00000000000..822fb3e038e --- /dev/null +++ b/erpnext/crm/call_summary/call_summary_utils.py @@ -0,0 +1,10 @@ +import frappe + +@frappe.whitelist() +def get_contact_doc(phone_number): + contacts = frappe.get_all('Contact', filters={ + 'phone': phone_number + }, fields=['*']) + + if contacts: + return contacts[0] \ No newline at end of file diff --git a/erpnext/public/build.json b/erpnext/public/build.json index 45de6eb294f..25fe0d61a38 100644 --- a/erpnext/public/build.json +++ b/erpnext/public/build.json @@ -48,7 +48,8 @@ "public/js/utils/customer_quick_entry.js", "public/js/education/student_button.html", "public/js/education/assessment_result_tool.html", - "public/js/hub/hub_factory.js" + "public/js/hub/hub_factory.js", + "public/js/call_summary_dialog.js" ], "js/item-dashboard.min.js": [ "stock/dashboard/item_dashboard.html", diff --git a/erpnext/public/js/call_summary_dialog.js b/erpnext/public/js/call_summary_dialog.js new file mode 100644 index 00000000000..c4c6d483eb7 --- /dev/null +++ b/erpnext/public/js/call_summary_dialog.js @@ -0,0 +1,24 @@ +frappe.call_summary_dialog = class { + constructor(opts) { + this.number = '+91234444444'; + this.make(); + } + + make() { + var d = new frappe.ui.Dialog(); + this.$modal_body = $(d.body); + this.call_summary_dialog = d; + $(d.header).html(`