fix: added type of call select field, additional status for agent rejecting call
This commit is contained in:
parent
fd20713bd7
commit
00b0f10100
@ -41,6 +41,8 @@ def handle_missed_call(**kwargs):
|
|||||||
status = 'No Answer'
|
status = 'No Answer'
|
||||||
elif CallType == "client-hangup" and DialCallStatus == "canceled":
|
elif CallType == "client-hangup" and DialCallStatus == "canceled":
|
||||||
status = 'Canceled'
|
status = 'Canceled'
|
||||||
|
elif CallType == "incomplete" and DialCallStatus == "failed":
|
||||||
|
status = 'Failed'
|
||||||
|
|
||||||
update_call_log(kwargs, status)
|
update_call_log(kwargs, status)
|
||||||
|
|
||||||
|
@ -141,6 +141,15 @@ class CallPopup {
|
|||||||
'fieldtype': 'Section Break',
|
'fieldtype': 'Section Break',
|
||||||
'hide_border': 1,
|
'hide_border': 1,
|
||||||
}, {
|
}, {
|
||||||
|
'fieldname': 'type_of_call',
|
||||||
|
'label': 'Type Of Call',
|
||||||
|
'fieldtype': 'Select',
|
||||||
|
'options': '\nFrappe Cloud Queries/Plan\nEnterprise Plans\nPartnership\nSupport\nBilling/Renewal\nOpen source / Junk',
|
||||||
|
'default': 'Frappe Cloud Queries/Plan',
|
||||||
|
},{
|
||||||
|
'fieldtype': 'Section Break',
|
||||||
|
'hide_border': 1,
|
||||||
|
},{
|
||||||
'fieldtype': 'Small Text',
|
'fieldtype': 'Small Text',
|
||||||
'label': __('Call Summary'),
|
'label': __('Call Summary'),
|
||||||
'fieldname': 'call_summary',
|
'fieldname': 'call_summary',
|
||||||
@ -149,10 +158,12 @@ class CallPopup {
|
|||||||
'label': __('Save'),
|
'label': __('Save'),
|
||||||
'click': () => {
|
'click': () => {
|
||||||
const call_summary = this.call_details.get_value('call_summary');
|
const call_summary = this.call_details.get_value('call_summary');
|
||||||
|
const call_type = this.call_details.get_value('type_of_call');
|
||||||
if (!call_summary) return;
|
if (!call_summary) return;
|
||||||
frappe.xcall('erpnext.telephony.doctype.call_log.call_log.add_call_summary', {
|
frappe.xcall('erpnext.telephony.doctype.call_log.call_log.add_call_summary_and_call_type', {
|
||||||
'call_log': this.call_log.name,
|
'call_log': this.call_log.name,
|
||||||
'summary': call_summary,
|
'summary': call_summary,
|
||||||
|
'call_type': call_type,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.close_modal();
|
this.close_modal();
|
||||||
frappe.show_alert({
|
frappe.show_alert({
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
"recording_url",
|
"recording_url",
|
||||||
"recording_html",
|
"recording_html",
|
||||||
"section_break_11",
|
"section_break_11",
|
||||||
|
"type_of_call",
|
||||||
"summary",
|
"summary",
|
||||||
"section_break_19",
|
"section_break_19",
|
||||||
"links"
|
"links"
|
||||||
@ -105,7 +106,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "summary",
|
"fieldname": "summary",
|
||||||
"fieldtype": "Small Text"
|
"fieldtype": "Small Text",
|
||||||
|
"label": "Summary"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "section_break_11",
|
"fieldname": "section_break_11",
|
||||||
@ -149,12 +151,17 @@
|
|||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
"label": "Employee User Id"
|
"label": "Employee User Id"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "type_of_call",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Type Of Call"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"in_create": 1,
|
"in_create": 1,
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2022-02-23 19:47:04.310577",
|
"modified": "2022-02-25 13:37:48.156501",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Telephony",
|
"module": "Telephony",
|
||||||
"name": "Call Log",
|
"name": "Call Log",
|
||||||
|
@ -103,8 +103,10 @@ def get_employee_name(emp):
|
|||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def add_call_summary(call_log, summary):
|
def add_call_summary_and_call_type(call_log, summary, call_type):
|
||||||
doc = frappe.get_doc('Call Log', call_log)
|
doc = frappe.get_doc('Call Log', call_log)
|
||||||
|
doc.type_of_call = call_type
|
||||||
|
doc.save()
|
||||||
doc.add_comment('Comment', frappe.bold(_('Call Summary')) + '<br><br>' + summary)
|
doc.add_comment('Comment', frappe.bold(_('Call Summary')) + '<br><br>' + summary)
|
||||||
|
|
||||||
def get_employees_with_number(number):
|
def get_employees_with_number(number):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user