fix: not able to update call log note

This commit is contained in:
Shariq Ansari 2023-12-23 21:59:37 +05:30
parent ccd57e213a
commit 67ed472c87
3 changed files with 8 additions and 3 deletions

View File

@ -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]
}

View File

@ -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

View File

@ -135,7 +135,7 @@
<NoteModal
v-model="showNoteModal"
:note="callLog.data?.note_doc"
@updateNote="updateNote"
@after="updateNote"
/>
</template>