1
0
forked from test/crm

fix: reload on save

This commit is contained in:
Shariq Ansari 2025-01-02 15:29:14 +05:30
parent 262acab271
commit f8a9605bea
6 changed files with 15 additions and 11 deletions

View File

@ -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 }"
>

View File

@ -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 || {}

View File

@ -122,9 +122,10 @@
>
<SidePanelLayout
v-model="contact.data"
:sections="sections"
:sections="sections.data"
doctype="Contact"
@update="updateField"
@reload="sections.reload"
/>
</div>
</Resizer>

View File

@ -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

View File

@ -172,9 +172,10 @@
>
<SidePanelLayout
v-model="lead.data"
:sections="sections"
:sections="sections.data"
doctype="CRM Lead"
@update="updateField"
@reload="sections.reload"
/>
</div>
</Resizer>

View File

@ -107,9 +107,10 @@
>
<SidePanelLayout
v-model="organization.doc"
:sections="sections"
:sections="sections.data"
doctype="CRM Organization"
@update="updateField"
@reload="sections.reload"
/>
</div>
</Resizer>