crm/frontend/src/composables/document.js
Shariq Ansari 887db5398e feat: added callback to update link field value after creating new
(cherry picked from commit 91ba11b5653a08a431e233c8d55297a5cec70277)
2025-05-14 18:13:49 +00:00

17 lines
490 B
JavaScript

import { ref } from 'vue'
export const showCreateDocumentModal = ref(false)
export const createDocumentDoctype = ref('')
export const createDocumentData = ref({})
export const createDocumentCallback = ref(null)
export function createDocument(doctype, obj, close, callback) {
if (doctype) {
close?.()
createDocumentDoctype.value = doctype
createDocumentData.value = obj || {}
createDocumentCallback.value = callback || null
showCreateDocumentModal.value = true
}
}