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