fix: reload on save
This commit is contained in:
parent
262acab271
commit
f8a9605bea
@ -38,9 +38,9 @@
|
|||||||
/>
|
/>
|
||||||
<div v-if="preview" class="flex flex-1 flex-col border rounded">
|
<div v-if="preview" class="flex flex-1 flex-col border rounded">
|
||||||
<SidePanelLayout
|
<SidePanelLayout
|
||||||
:sections="{ data: tabs.data[0].sections }"
|
|
||||||
:doctype="_doctype"
|
|
||||||
v-model="data"
|
v-model="data"
|
||||||
|
:sections="tabs.data[0].sections"
|
||||||
|
:doctype="_doctype"
|
||||||
:preview="true"
|
:preview="true"
|
||||||
v-slot="{ section }"
|
v-slot="{ section }"
|
||||||
>
|
>
|
||||||
|
|||||||
@ -342,7 +342,7 @@
|
|||||||
v-if="showSidePanelModal"
|
v-if="showSidePanelModal"
|
||||||
v-model="showSidePanelModal"
|
v-model="showSidePanelModal"
|
||||||
:doctype="doctype"
|
:doctype="doctype"
|
||||||
@reload="() => sections.reload()"
|
@reload="() => emit('reload')"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -381,14 +381,14 @@ const { getFormattedPercent, getFormattedFloat, getFormattedCurrency } =
|
|||||||
getMeta(props.doctype)
|
getMeta(props.doctype)
|
||||||
const { isManager, getUser } = usersStore()
|
const { isManager, getUser } = usersStore()
|
||||||
|
|
||||||
const emit = defineEmits(['update'])
|
const emit = defineEmits(['update', 'reload'])
|
||||||
|
|
||||||
const data = defineModel()
|
const data = defineModel()
|
||||||
const showSidePanelModal = ref(false)
|
const showSidePanelModal = ref(false)
|
||||||
|
|
||||||
const _sections = computed(() => {
|
const _sections = computed(() => {
|
||||||
if (!props.sections?.data?.length) return []
|
if (!props.sections?.length) return []
|
||||||
return props.sections.data.map((section) => {
|
return props.sections.map((section) => {
|
||||||
if (section.columns?.length) {
|
if (section.columns?.length) {
|
||||||
section.columns[0].fields = section.columns[0].fields.map((field) => {
|
section.columns[0].fields = section.columns[0].fields.map((field) => {
|
||||||
let df = field?.all_properties || {}
|
let df = field?.all_properties || {}
|
||||||
|
|||||||
@ -122,9 +122,10 @@
|
|||||||
>
|
>
|
||||||
<SidePanelLayout
|
<SidePanelLayout
|
||||||
v-model="contact.data"
|
v-model="contact.data"
|
||||||
:sections="sections"
|
:sections="sections.data"
|
||||||
doctype="Contact"
|
doctype="Contact"
|
||||||
@update="updateField"
|
@update="updateField"
|
||||||
|
@reload="sections.reload"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Resizer>
|
</Resizer>
|
||||||
|
|||||||
@ -119,10 +119,11 @@
|
|||||||
>
|
>
|
||||||
<SidePanelLayout
|
<SidePanelLayout
|
||||||
v-model="deal.data"
|
v-model="deal.data"
|
||||||
:sections="sections"
|
:sections="sections.data"
|
||||||
doctype="CRM Deal"
|
doctype="CRM Deal"
|
||||||
@update="updateField"
|
|
||||||
v-slot="{ section }"
|
v-slot="{ section }"
|
||||||
|
@update="updateField"
|
||||||
|
@reload="sections.reload"
|
||||||
>
|
>
|
||||||
<div v-if="section.name == 'contacts_section'" class="contacts-area">
|
<div v-if="section.name == 'contacts_section'" class="contacts-area">
|
||||||
<div
|
<div
|
||||||
|
|||||||
@ -172,9 +172,10 @@
|
|||||||
>
|
>
|
||||||
<SidePanelLayout
|
<SidePanelLayout
|
||||||
v-model="lead.data"
|
v-model="lead.data"
|
||||||
:sections="sections"
|
:sections="sections.data"
|
||||||
doctype="CRM Lead"
|
doctype="CRM Lead"
|
||||||
@update="updateField"
|
@update="updateField"
|
||||||
|
@reload="sections.reload"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Resizer>
|
</Resizer>
|
||||||
|
|||||||
@ -107,9 +107,10 @@
|
|||||||
>
|
>
|
||||||
<SidePanelLayout
|
<SidePanelLayout
|
||||||
v-model="organization.doc"
|
v-model="organization.doc"
|
||||||
:sections="sections"
|
:sections="sections.data"
|
||||||
doctype="CRM Organization"
|
doctype="CRM Organization"
|
||||||
@update="updateField"
|
@update="updateField"
|
||||||
|
@reload="sections.reload"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Resizer>
|
</Resizer>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user