fix: remove updateField event from various components
(cherry picked from commit baf344a6976b61a2c62a4cc2e60bf159f546ac49)
This commit is contained in:
parent
4e84fd0731
commit
454dbd06cc
@ -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 }"
|
||||
>
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -124,7 +124,6 @@
|
||||
:sections="sections.data"
|
||||
doctype="Contact"
|
||||
:docname="contact.data.name"
|
||||
@update="updateField"
|
||||
@reload="sections.reload"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -133,7 +133,6 @@
|
||||
:addContact="addContact"
|
||||
doctype="CRM Deal"
|
||||
:docname="deal.data.name"
|
||||
@update="updateField"
|
||||
@reload="sections.reload"
|
||||
>
|
||||
<template #actions="{ section }">
|
||||
|
||||
@ -185,7 +185,6 @@
|
||||
:sections="sections.data"
|
||||
doctype="CRM Lead"
|
||||
:docname="lead.data.name"
|
||||
@update="updateField"
|
||||
@reload="sections.reload"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -133,7 +133,6 @@
|
||||
:sections="sections.data"
|
||||
doctype="Contact"
|
||||
:docname="contact.data.name"
|
||||
@update="updateField"
|
||||
@reload="sections.reload"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -65,7 +65,6 @@
|
||||
:sections="sections.data"
|
||||
doctype="CRM Deal"
|
||||
:docname="deal.data.name"
|
||||
@update="updateField"
|
||||
@reload="sections.reload"
|
||||
>
|
||||
<template #actions="{ section }">
|
||||
|
||||
@ -70,7 +70,6 @@
|
||||
:sections="sections.data"
|
||||
doctype="CRM Lead"
|
||||
:docname="lead.data.name"
|
||||
@update="updateField"
|
||||
@reload="sections.reload"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -115,7 +115,6 @@
|
||||
:sections="sections.data"
|
||||
doctype="CRM Organization"
|
||||
:docname="organization.doc.name"
|
||||
@update="updateField"
|
||||
@reload="sections.reload"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -109,7 +109,6 @@
|
||||
:sections="sections.data"
|
||||
doctype="CRM Organization"
|
||||
:docname="organization.doc.name"
|
||||
@update="updateField"
|
||||
@reload="sections.reload"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user