From 67ed472c87197abd03ed4c0bda9bff7468e03234 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Sat, 23 Dec 2023 21:59:37 +0530 Subject: [PATCH] fix: not able to update call log note --- crm/fcrm/doctype/crm_call_log/crm_call_log.py | 1 + frontend/src/components/Modals/NoteModal.vue | 8 ++++++-- frontend/src/pages/CallLog.vue | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/crm/fcrm/doctype/crm_call_log/crm_call_log.py b/crm/fcrm/doctype/crm_call_log/crm_call_log.py index 4369e0a2..8f2865bf 100644 --- a/crm/fcrm/doctype/crm_call_log/crm_call_log.py +++ b/crm/fcrm/doctype/crm_call_log/crm_call_log.py @@ -96,6 +96,7 @@ def get_call_log(name): if doc.note: note = frappe.db.get_values("CRM Note", doc.note, ["title", "content"])[0] _doc.note_doc = { + "name": doc.note, "title": note[0], "content": note[1] } diff --git a/frontend/src/components/Modals/NoteModal.vue b/frontend/src/components/Modals/NoteModal.vue index a0ade1cb..0c904eb3 100644 --- a/frontend/src/components/Modals/NoteModal.vue +++ b/frontend/src/components/Modals/NoteModal.vue @@ -63,6 +63,8 @@ const props = defineProps({ const show = defineModel() const notes = defineModel('reloadNotes') +const emit = defineEmits(['after']) + const title = ref(null) const editMode = ref(false) let _note = ref({}) @@ -81,7 +83,8 @@ async function updateNote() { fieldname: _note.value, }) if (d.name) { - notes.value.reload() + notes.value?.reload() + emit('after', d) } } else { let d = await call('frappe.client.insert', { @@ -94,7 +97,8 @@ async function updateNote() { }, }) if (d.name) { - notes.value.reload() + notes.value?.reload() + emit('after', d) } } show.value = false diff --git a/frontend/src/pages/CallLog.vue b/frontend/src/pages/CallLog.vue index 7faf4780..7c397e76 100644 --- a/frontend/src/pages/CallLog.vue +++ b/frontend/src/pages/CallLog.vue @@ -135,7 +135,7 @@