diff --git a/crm/integrations/api.py b/crm/integrations/api.py index b440e629..c1c4e198 100644 --- a/crm/integrations/api.py +++ b/crm/integrations/api.py @@ -53,15 +53,17 @@ def add_note_to_call_log(call_sid, note): _note = frappe.get_doc( { "doctype": "FCRM Note", + "title": note.get("title", "Call Note"), "content": note.get("content"), } ).insert(ignore_permissions=True) - call_log = frappe.get_cached_doc("CRM Call Log", call_sid) - call_log.link_with_reference_doc("FCRM Note", _note.name) - call_log.save(ignore_permissions=True) else: _note = frappe.set_value("FCRM Note", note.get("name"), "content", note.get("content")) + call_log = frappe.get_cached_doc("CRM Call Log", call_sid) + call_log.link_with_reference_doc("FCRM Note", _note.name) + call_log.save(ignore_permissions=True) + return _note @@ -75,21 +77,30 @@ def add_task_to_call_log(call_sid, task): "doctype": "CRM Task", "title": task.get("title"), "description": task.get("description"), + "assigned_to": task.get("assigned_to"), + "due_date": task.get("due_date"), + "status": task.get("status"), + "priority": task.get("priority"), } ).insert(ignore_permissions=True) - call_log = frappe.get_doc("CRM Call Log", call_sid) - call_log.link_with_reference_doc("CRM Task", _task.name) - call_log.save(ignore_permissions=True) else: _task = frappe.get_doc("CRM Task", task.get("name")) _task.update( { "title": task.get("title"), "description": task.get("description"), + "assigned_to": task.get("assigned_to"), + "due_date": task.get("due_date"), + "status": task.get("status"), + "priority": task.get("priority"), } ) _task.save(ignore_permissions=True) + call_log = frappe.get_doc("CRM Call Log", call_sid) + call_log.link_with_reference_doc("CRM Task", _task.name) + call_log.save(ignore_permissions=True) + return _task diff --git a/frontend/src/components/Modals/CallLogDetailModal.vue b/frontend/src/components/Modals/CallLogDetailModal.vue index 8f6758d4..3995e0f0 100644 --- a/frontend/src/components/Modals/CallLogDetailModal.vue +++ b/frontend/src/components/Modals/CallLogDetailModal.vue @@ -9,6 +9,30 @@
+ + +
+
+ +
+
+ +
{{ field.value }}
@@ -110,7 +151,8 @@
- + +