fix: remove updateField event from various components

(cherry picked from commit baf344a6976b61a2c62a4cc2e60bf159f546ac49)
(cherry picked from commit 454dbd06cc39bbf93e955d0b6e462641c9c07d8d)
This commit is contained in:
Shariq Ansari 2025-05-15 01:15:25 +05:30 committed by Mergify
parent ed1c54a7a5
commit b5dc2c73ab
10 changed files with 13 additions and 12 deletions

View File

@ -38,9 +38,9 @@
/>
<div v-if="preview" class="flex flex-1 flex-col border rounded">
<SidePanelLayout
v-model="data"
:sections="tabs.data[0].sections"
:doctype="_doctype"
docname=""
:preview="true"
v-slot="{ section }"
>

View File

@ -1,6 +1,6 @@
<template>
<div
v-if="!document.get.loading"
v-if="!document.get?.loading"
class="sections flex flex-col overflow-y-auto"
>
<template v-for="(section, i) in _sections" :key="section.name">
@ -412,11 +412,18 @@ const { getFormattedPercent, getFormattedFloat, getFormattedCurrency } =
const { isManager, getUser } = usersStore()
const emit = defineEmits(['update', 'reload'])
const emit = defineEmits(['reload'])
const showSidePanelModal = ref(false)
const { document, triggerOnChange } = useDocument(props.doctype, props.docname)
let document = { doc: {} }
let triggerOnChange
if (props.docname) {
let d = useDocument(props.doctype, props.docname)
document = d.document
triggerOnChange = d.triggerOnChange
}
const _sections = computed(() => {
if (!props.sections?.length) return []
@ -470,6 +477,8 @@ function parsedField(field) {
}
async function fieldChange(value, df) {
if (props.preview) return
document.doc[df.fieldname] = value
await triggerOnChange(df.fieldname)

View File

@ -124,7 +124,6 @@
:sections="sections.data"
doctype="Contact"
:docname="contact.data.name"
@update="updateField"
@reload="sections.reload"
/>
</div>

View File

@ -133,7 +133,6 @@
:addContact="addContact"
doctype="CRM Deal"
:docname="deal.data.name"
@update="updateField"
@reload="sections.reload"
>
<template #actions="{ section }">

View File

@ -185,7 +185,6 @@
:sections="sections.data"
doctype="CRM Lead"
:docname="lead.data.name"
@update="updateField"
@reload="sections.reload"
/>
</div>

View File

@ -133,7 +133,6 @@
:sections="sections.data"
doctype="Contact"
:docname="contact.data.name"
@update="updateField"
@reload="sections.reload"
/>
</div>

View File

@ -65,7 +65,6 @@
:sections="sections.data"
doctype="CRM Deal"
:docname="deal.data.name"
@update="updateField"
@reload="sections.reload"
>
<template #actions="{ section }">

View File

@ -70,7 +70,6 @@
:sections="sections.data"
doctype="CRM Lead"
:docname="lead.data.name"
@update="updateField"
@reload="sections.reload"
/>
</div>

View File

@ -115,7 +115,6 @@
:sections="sections.data"
doctype="CRM Organization"
:docname="organization.doc.name"
@update="updateField"
@reload="sections.reload"
/>
</div>

View File

@ -109,7 +109,6 @@
:sections="sections.data"
doctype="CRM Organization"
:docname="organization.doc.name"
@update="updateField"
@reload="sections.reload"
/>
</div>