fix: render fields in side panel, quick entry & data tab in new format
This commit is contained in:
parent
0b4ee64a36
commit
37f357ac08
@ -593,7 +593,8 @@ def get_sidebar_fields(doctype, name):
|
|||||||
|
|
||||||
for section in layout:
|
for section in layout:
|
||||||
section["name"] = section.get("name") or section.get("label")
|
section["name"] = section.get("name") or section.get("label")
|
||||||
for field in section.get("fields") if section.get("fields") else []:
|
for column in section.get("columns") if section.get("columns") else []:
|
||||||
|
for field in column.get("fields") if column.get("fields") else []:
|
||||||
field_obj = next((f for f in fields if f.fieldname == field), None)
|
field_obj = next((f for f in fields if f.fieldname == field), None)
|
||||||
if field_obj:
|
if field_obj:
|
||||||
if field_obj.permlevel > 0:
|
if field_obj.permlevel > 0:
|
||||||
@ -603,7 +604,7 @@ def get_sidebar_fields(doctype, name):
|
|||||||
field_obj.read_only = 1
|
field_obj.read_only = 1
|
||||||
if not field_has_read_access and not field_has_write_access:
|
if not field_has_read_access and not field_has_write_access:
|
||||||
field_obj.hidden = 1
|
field_obj.hidden = 1
|
||||||
section["fields"][section.get("fields").index(field)] = get_field_obj(field_obj)
|
column["fields"][column.get("fields").index(field)] = get_field_obj(field_obj)
|
||||||
|
|
||||||
fields_meta = {}
|
fields_meta = {}
|
||||||
for field in fields:
|
for field in fields:
|
||||||
|
|||||||
@ -101,12 +101,14 @@ function saveChanges() {
|
|||||||
_tabs.forEach((tab) => {
|
_tabs.forEach((tab) => {
|
||||||
if (!tab.sections) return
|
if (!tab.sections) return
|
||||||
tab.sections.forEach((section) => {
|
tab.sections.forEach((section) => {
|
||||||
if (!section.fields) return
|
section.columns.forEach((column) => {
|
||||||
section.fields = section.fields.map(
|
if (!column.fields) return
|
||||||
|
column.fields = column.fields.map(
|
||||||
(field) => field.fieldname || field.name,
|
(field) => field.fieldname || field.name,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
})
|
||||||
loading.value = true
|
loading.value = true
|
||||||
call(
|
call(
|
||||||
'crm.fcrm.doctype.crm_fields_layout.crm_fields_layout.save_fields_layout',
|
'crm.fcrm.doctype.crm_fields_layout.crm_fields_layout.save_fields_layout',
|
||||||
|
|||||||
@ -125,13 +125,15 @@ const tabs = createResource({
|
|||||||
transform: (_tabs) => {
|
transform: (_tabs) => {
|
||||||
return _tabs.forEach((tab) => {
|
return _tabs.forEach((tab) => {
|
||||||
tab.sections.forEach((section) => {
|
tab.sections.forEach((section) => {
|
||||||
section.fields.forEach((field) => {
|
section.columns.forEach((column) => {
|
||||||
|
column.fields.forEach((field) => {
|
||||||
if (field.type === 'Table') {
|
if (field.type === 'Table') {
|
||||||
_contact.value[field.name] = []
|
_contact.value[field.name] = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -101,12 +101,14 @@ function saveChanges() {
|
|||||||
_tabs.forEach((tab) => {
|
_tabs.forEach((tab) => {
|
||||||
if (!tab.sections) return
|
if (!tab.sections) return
|
||||||
tab.sections.forEach((section) => {
|
tab.sections.forEach((section) => {
|
||||||
if (!section.fields) return
|
section.columns.forEach((column) => {
|
||||||
section.fields = section.fields.map(
|
if (!column.fields) return
|
||||||
|
column.fields = column.fields.map(
|
||||||
(field) => field.fieldname || field.name,
|
(field) => field.fieldname || field.name,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
})
|
||||||
loading.value = true
|
loading.value = true
|
||||||
call(
|
call(
|
||||||
'crm.fcrm.doctype.crm_fields_layout.crm_fields_layout.save_fields_layout',
|
'crm.fcrm.doctype.crm_fields_layout.crm_fields_layout.save_fields_layout',
|
||||||
|
|||||||
@ -109,7 +109,8 @@ const tabs = createResource({
|
|||||||
transform: (_tabs) => {
|
transform: (_tabs) => {
|
||||||
return _tabs.forEach((tab) => {
|
return _tabs.forEach((tab) => {
|
||||||
tab.sections.forEach((section) => {
|
tab.sections.forEach((section) => {
|
||||||
section.fields.forEach((field) => {
|
section.columns.forEach((column) => {
|
||||||
|
column.fields.forEach((field) => {
|
||||||
if (field.name == 'status') {
|
if (field.name == 'status') {
|
||||||
field.type = 'Select'
|
field.type = 'Select'
|
||||||
field.options = dealStatuses.value
|
field.options = dealStatuses.value
|
||||||
@ -124,6 +125,7 @@ const tabs = createResource({
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -71,7 +71,8 @@ const tabs = createResource({
|
|||||||
transform: (_tabs) => {
|
transform: (_tabs) => {
|
||||||
return _tabs.forEach((tab) => {
|
return _tabs.forEach((tab) => {
|
||||||
tab.sections.forEach((section) => {
|
tab.sections.forEach((section) => {
|
||||||
section.fields.forEach((field) => {
|
section.columns.forEach((column) => {
|
||||||
|
column.fields.forEach((field) => {
|
||||||
if (field.name == 'status') {
|
if (field.name == 'status') {
|
||||||
field.type = 'Select'
|
field.type = 'Select'
|
||||||
field.options = leadStatuses.value
|
field.options = leadStatuses.value
|
||||||
@ -86,6 +87,7 @@ const tabs = createResource({
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -124,13 +124,15 @@ const tabs = createResource({
|
|||||||
transform: (_tabs) => {
|
transform: (_tabs) => {
|
||||||
return _tabs.forEach((tab) => {
|
return _tabs.forEach((tab) => {
|
||||||
tab.sections.forEach((section) => {
|
tab.sections.forEach((section) => {
|
||||||
section.fields.forEach((field) => {
|
section.columns.forEach((column) => {
|
||||||
|
column.fields.forEach((field) => {
|
||||||
if (field.type === 'Table') {
|
if (field.type === 'Table') {
|
||||||
_organization.value[field.name] = []
|
_organization.value[field.name] = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -99,12 +99,14 @@ function saveChanges() {
|
|||||||
_tabs.forEach((tab) => {
|
_tabs.forEach((tab) => {
|
||||||
if (!tab.sections) return
|
if (!tab.sections) return
|
||||||
tab.sections.forEach((section) => {
|
tab.sections.forEach((section) => {
|
||||||
if (!section.fields) return
|
section.columns.forEach((column) => {
|
||||||
section.fields = section.fields.map(
|
if (!column.fields) return
|
||||||
|
column.fields = column.fields.map(
|
||||||
(field) => field.fieldname || field.name,
|
(field) => field.fieldname || field.name,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
})
|
||||||
loading.value = true
|
loading.value = true
|
||||||
call(
|
call(
|
||||||
'crm.fcrm.doctype.crm_fields_layout.crm_fields_layout.save_fields_layout',
|
'crm.fcrm.doctype.crm_fields_layout.crm_fields_layout.save_fields_layout',
|
||||||
|
|||||||
@ -51,7 +51,7 @@
|
|||||||
:opened="section.opened"
|
:opened="section.opened"
|
||||||
>
|
>
|
||||||
<SidePanelLayout
|
<SidePanelLayout
|
||||||
:fields="section.fields"
|
:fields="section.columns[0].fields"
|
||||||
:isLastSection="i == section.data?.length - 1"
|
:isLastSection="i == section.data?.length - 1"
|
||||||
v-model="data"
|
v-model="data"
|
||||||
/>
|
/>
|
||||||
@ -129,12 +129,14 @@ function saveChanges() {
|
|||||||
let _tabs = JSON.parse(JSON.stringify(tabs.data))
|
let _tabs = JSON.parse(JSON.stringify(tabs.data))
|
||||||
_tabs.forEach((tab) => {
|
_tabs.forEach((tab) => {
|
||||||
tab.sections.forEach((section) => {
|
tab.sections.forEach((section) => {
|
||||||
if (!section.fields) return
|
section.columns.forEach((column) => {
|
||||||
section.fields = section.fields
|
if (!column.fields) return
|
||||||
|
column.fields = column.fields
|
||||||
.map((field) => field.fieldname || field.name)
|
.map((field) => field.fieldname || field.name)
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
})
|
||||||
loading.value = true
|
loading.value = true
|
||||||
call(
|
call(
|
||||||
'crm.fcrm.doctype.crm_fields_layout.crm_fields_layout.save_fields_layout',
|
'crm.fcrm.doctype.crm_fields_layout.crm_fields_layout.save_fields_layout',
|
||||||
|
|||||||
@ -139,8 +139,8 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</template>
|
</template>
|
||||||
<SidePanelLayout
|
<SidePanelLayout
|
||||||
v-if="section.fields"
|
v-if="section.columns?.[0].fields"
|
||||||
:fields="section.fields"
|
:fields="section.columns[0].fields"
|
||||||
:isLastSection="i == fieldsLayout.data.length - 1"
|
:isLastSection="i == fieldsLayout.data.length - 1"
|
||||||
doctype="Contact"
|
doctype="Contact"
|
||||||
v-model="contact.data"
|
v-model="contact.data"
|
||||||
@ -377,13 +377,12 @@ const fieldsLayout = createResource({
|
|||||||
|
|
||||||
function getParsedFields(data) {
|
function getParsedFields(data) {
|
||||||
return data.map((section) => {
|
return data.map((section) => {
|
||||||
return {
|
section.columns = section.columns.map((column) => {
|
||||||
...section,
|
column.fields = column.fields.map((field) => {
|
||||||
fields: computed(() =>
|
|
||||||
section.fields.map((field) => {
|
|
||||||
if (field.name === 'email_id') {
|
if (field.name === 'email_id') {
|
||||||
return {
|
return {
|
||||||
...field,
|
...field,
|
||||||
|
read_only: false,
|
||||||
type: 'dropdown',
|
type: 'dropdown',
|
||||||
options:
|
options:
|
||||||
contact.data?.email_ids?.map((email) => {
|
contact.data?.email_ids?.map((email) => {
|
||||||
@ -415,8 +414,7 @@ function getParsedFields(data) {
|
|||||||
contact.data.email_ids = contact.data.email_ids.filter(
|
contact.data.email_ids = contact.data.email_ids.filter(
|
||||||
(email) => email.name !== option.name,
|
(email) => email.name !== option.name,
|
||||||
)
|
)
|
||||||
!isNew &&
|
!isNew && (await deleteOption('Contact Email', option.name))
|
||||||
(await deleteOption('Contact Email', option.name))
|
|
||||||
if (_contact.value.email_id === option.value) {
|
if (_contact.value.email_id === option.value) {
|
||||||
if (contact.data.email_ids.length === 0) {
|
if (contact.data.email_ids.length === 0) {
|
||||||
_contact.value.email_id = ''
|
_contact.value.email_id = ''
|
||||||
@ -441,6 +439,7 @@ function getParsedFields(data) {
|
|||||||
} else if (field.name === 'mobile_no') {
|
} else if (field.name === 'mobile_no') {
|
||||||
return {
|
return {
|
||||||
...field,
|
...field,
|
||||||
|
read_only: false,
|
||||||
type: 'dropdown',
|
type: 'dropdown',
|
||||||
options:
|
options:
|
||||||
contact.data?.phone_nos?.map((phone) => {
|
contact.data?.phone_nos?.map((phone) => {
|
||||||
@ -472,8 +471,7 @@ function getParsedFields(data) {
|
|||||||
contact.data.phone_nos = contact.data.phone_nos.filter(
|
contact.data.phone_nos = contact.data.phone_nos.filter(
|
||||||
(phone) => phone.name !== option.name,
|
(phone) => phone.name !== option.name,
|
||||||
)
|
)
|
||||||
!isNew &&
|
!isNew && (await deleteOption('Contact Phone', option.name))
|
||||||
(await deleteOption('Contact Phone', option.name))
|
|
||||||
if (_contact.value.actual_mobile_no === option.value) {
|
if (_contact.value.actual_mobile_no === option.value) {
|
||||||
if (contact.data.phone_nos.length === 0) {
|
if (contact.data.phone_nos.length === 0) {
|
||||||
_contact.value.actual_mobile_no = ''
|
_contact.value.actual_mobile_no = ''
|
||||||
@ -516,9 +514,10 @@ function getParsedFields(data) {
|
|||||||
} else {
|
} else {
|
||||||
return field
|
return field
|
||||||
}
|
}
|
||||||
}),
|
})
|
||||||
),
|
return column
|
||||||
}
|
})
|
||||||
|
return section
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -168,8 +168,8 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</template>
|
</template>
|
||||||
<SidePanelLayout
|
<SidePanelLayout
|
||||||
v-if="section.fields"
|
v-if="section.columns?.[0].fields"
|
||||||
:fields="section.fields"
|
:fields="section.columns[0].fields"
|
||||||
:isLastSection="i == fieldsLayout.data.length - 1"
|
:isLastSection="i == fieldsLayout.data.length - 1"
|
||||||
doctype="CRM Deal"
|
doctype="CRM Deal"
|
||||||
v-model="deal.data"
|
v-model="deal.data"
|
||||||
@ -611,7 +611,7 @@ const fieldsLayout = createResource({
|
|||||||
function getParsedFields(sections) {
|
function getParsedFields(sections) {
|
||||||
sections.forEach((section) => {
|
sections.forEach((section) => {
|
||||||
if (section.name == 'contacts_section') return
|
if (section.name == 'contacts_section') return
|
||||||
section.fields.forEach((field) => {
|
section.columns[0].fields.forEach((field) => {
|
||||||
if (field.name == 'organization') {
|
if (field.name == 'organization') {
|
||||||
field.create = (value, close) => {
|
field.create = (value, close) => {
|
||||||
_organization.value.organization_name = value
|
_organization.value.organization_name = value
|
||||||
|
|||||||
@ -183,7 +183,7 @@
|
|||||||
:opened="section.opened"
|
:opened="section.opened"
|
||||||
>
|
>
|
||||||
<SidePanelLayout
|
<SidePanelLayout
|
||||||
:fields="section.fields"
|
:fields="section.columns[0].fields"
|
||||||
:isLastSection="i == fieldsLayout.data.length - 1"
|
:isLastSection="i == fieldsLayout.data.length - 1"
|
||||||
v-model="lead.data"
|
v-model="lead.data"
|
||||||
@update="updateField"
|
@update="updateField"
|
||||||
|
|||||||
@ -143,7 +143,7 @@
|
|||||||
>
|
>
|
||||||
<Section :label="section.label" :opened="section.opened">
|
<Section :label="section.label" :opened="section.opened">
|
||||||
<SidePanelLayout
|
<SidePanelLayout
|
||||||
:fields="section.fields"
|
:fields="section.columns[0].fields"
|
||||||
:isLastSection="i == fieldsLayout.data.length - 1"
|
:isLastSection="i == fieldsLayout.data.length - 1"
|
||||||
doctype="Contact"
|
doctype="Contact"
|
||||||
v-model="contact.data"
|
v-model="contact.data"
|
||||||
@ -357,10 +357,8 @@ const fieldsLayout = createResource({
|
|||||||
|
|
||||||
function getParsedFields(data) {
|
function getParsedFields(data) {
|
||||||
return data.map((section) => {
|
return data.map((section) => {
|
||||||
return {
|
section.columns = section.columns.map((column) => {
|
||||||
...section,
|
column.fields = column.fields.map((field) => {
|
||||||
fields: computed(() =>
|
|
||||||
section.fields.map((field) => {
|
|
||||||
if (field.name === 'email_id') {
|
if (field.name === 'email_id') {
|
||||||
return {
|
return {
|
||||||
...field,
|
...field,
|
||||||
@ -395,8 +393,7 @@ function getParsedFields(data) {
|
|||||||
contact.data.email_ids = contact.data.email_ids.filter(
|
contact.data.email_ids = contact.data.email_ids.filter(
|
||||||
(email) => email.name !== option.name,
|
(email) => email.name !== option.name,
|
||||||
)
|
)
|
||||||
!isNew &&
|
!isNew && (await deleteOption('Contact Email', option.name))
|
||||||
(await deleteOption('Contact Email', option.name))
|
|
||||||
if (_contact.value.email_id === option.value) {
|
if (_contact.value.email_id === option.value) {
|
||||||
if (contact.data.email_ids.length === 0) {
|
if (contact.data.email_ids.length === 0) {
|
||||||
_contact.value.email_id = ''
|
_contact.value.email_id = ''
|
||||||
@ -452,8 +449,7 @@ function getParsedFields(data) {
|
|||||||
contact.data.phone_nos = contact.data.phone_nos.filter(
|
contact.data.phone_nos = contact.data.phone_nos.filter(
|
||||||
(phone) => phone.name !== option.name,
|
(phone) => phone.name !== option.name,
|
||||||
)
|
)
|
||||||
!isNew &&
|
!isNew && (await deleteOption('Contact Phone', option.name))
|
||||||
(await deleteOption('Contact Phone', option.name))
|
|
||||||
if (_contact.value.actual_mobile_no === option.value) {
|
if (_contact.value.actual_mobile_no === option.value) {
|
||||||
if (contact.data.phone_nos.length === 0) {
|
if (contact.data.phone_nos.length === 0) {
|
||||||
_contact.value.actual_mobile_no = ''
|
_contact.value.actual_mobile_no = ''
|
||||||
@ -496,9 +492,10 @@ function getParsedFields(data) {
|
|||||||
} else {
|
} else {
|
||||||
return field
|
return field
|
||||||
}
|
}
|
||||||
}),
|
})
|
||||||
),
|
return column
|
||||||
}
|
})
|
||||||
|
return section
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -99,8 +99,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<SidePanelLayout
|
<SidePanelLayout
|
||||||
v-if="section.fields"
|
v-if="section.columns?.[0].fields"
|
||||||
:fields="section.fields"
|
:fields="section.columns[0].fields"
|
||||||
:isLastSection="i == fieldsLayout.data.length - 1"
|
:isLastSection="i == fieldsLayout.data.length - 1"
|
||||||
doctype="CRM Deal"
|
doctype="CRM Deal"
|
||||||
v-model="deal.data"
|
v-model="deal.data"
|
||||||
@ -289,7 +289,7 @@ import {
|
|||||||
Tabs,
|
Tabs,
|
||||||
Breadcrumbs,
|
Breadcrumbs,
|
||||||
call,
|
call,
|
||||||
usePageMeta
|
usePageMeta,
|
||||||
} from 'frappe-ui'
|
} from 'frappe-ui'
|
||||||
import { ref, computed, h, onMounted } from 'vue'
|
import { ref, computed, h, onMounted } from 'vue'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
@ -511,7 +511,7 @@ const fieldsLayout = createResource({
|
|||||||
function getParsedFields(sections) {
|
function getParsedFields(sections) {
|
||||||
sections.forEach((section) => {
|
sections.forEach((section) => {
|
||||||
if (section.name == 'contacts_section') return
|
if (section.name == 'contacts_section') return
|
||||||
section.fields.forEach((field) => {
|
section.columns[0].fields.forEach((field) => {
|
||||||
if (field.name == 'organization') {
|
if (field.name == 'organization') {
|
||||||
field.create = (value, close) => {
|
field.create = (value, close) => {
|
||||||
_organization.value.organization_name = value
|
_organization.value.organization_name = value
|
||||||
|
|||||||
@ -76,7 +76,7 @@
|
|||||||
>
|
>
|
||||||
<Section :label="section.label" :opened="section.opened">
|
<Section :label="section.label" :opened="section.opened">
|
||||||
<SidePanelLayout
|
<SidePanelLayout
|
||||||
:fields="section.fields"
|
:fields="section.columns[0].fields"
|
||||||
:isLastSection="i == fieldsLayout.data.length - 1"
|
:isLastSection="i == fieldsLayout.data.length - 1"
|
||||||
v-model="lead.data"
|
v-model="lead.data"
|
||||||
@update="updateField"
|
@update="updateField"
|
||||||
|
|||||||
@ -125,8 +125,9 @@
|
|||||||
>
|
>
|
||||||
<Section :label="section.label" :opened="section.opened">
|
<Section :label="section.label" :opened="section.opened">
|
||||||
<SidePanelLayout
|
<SidePanelLayout
|
||||||
|
v-if="section.columns?.[0].fields"
|
||||||
v-model="organization.doc"
|
v-model="organization.doc"
|
||||||
:fields="section.fields"
|
:fields="section.columns[0].fields"
|
||||||
:isLastSection="i == fieldsLayout.data.length - 1"
|
:isLastSection="i == fieldsLayout.data.length - 1"
|
||||||
doctype="CRM Organization"
|
doctype="CRM Organization"
|
||||||
@update="updateField"
|
@update="updateField"
|
||||||
@ -335,10 +336,8 @@ const fieldsLayout = createResource({
|
|||||||
|
|
||||||
function getParsedFields(data) {
|
function getParsedFields(data) {
|
||||||
return data.map((section) => {
|
return data.map((section) => {
|
||||||
return {
|
section.columns = section.columns.map((column) => {
|
||||||
...section,
|
column.fields = column.fields.map((field) => {
|
||||||
fields: computed(() =>
|
|
||||||
section.fields.map((field) => {
|
|
||||||
if (field.name === 'address') {
|
if (field.name === 'address') {
|
||||||
return {
|
return {
|
||||||
...field,
|
...field,
|
||||||
@ -359,9 +358,10 @@ function getParsedFields(data) {
|
|||||||
} else {
|
} else {
|
||||||
return field
|
return field
|
||||||
}
|
}
|
||||||
}),
|
})
|
||||||
),
|
return column
|
||||||
}
|
})
|
||||||
|
return section
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -124,9 +124,9 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</template>
|
</template>
|
||||||
<SidePanelLayout
|
<SidePanelLayout
|
||||||
v-if="section.fields"
|
v-if="section.columns?.[0].fields"
|
||||||
v-model="organization.doc"
|
v-model="organization.doc"
|
||||||
:fields="section.fields"
|
:fields="section.columns[0].fields"
|
||||||
:isLastSection="i == fieldsLayout.data.length - 1"
|
:isLastSection="i == fieldsLayout.data.length - 1"
|
||||||
doctype="CRM Organization"
|
doctype="CRM Organization"
|
||||||
@update="updateField"
|
@update="updateField"
|
||||||
@ -377,10 +377,8 @@ const fieldsLayout = createResource({
|
|||||||
|
|
||||||
function getParsedFields(data) {
|
function getParsedFields(data) {
|
||||||
return data.map((section) => {
|
return data.map((section) => {
|
||||||
return {
|
section.columns = section.columns.map((column) => {
|
||||||
...section,
|
column.fields = column.fields.map((field) => {
|
||||||
fields: computed(() =>
|
|
||||||
section.fields.map((field) => {
|
|
||||||
if (field.name === 'address') {
|
if (field.name === 'address') {
|
||||||
return {
|
return {
|
||||||
...field,
|
...field,
|
||||||
@ -401,9 +399,10 @@ function getParsedFields(data) {
|
|||||||
} else {
|
} else {
|
||||||
return field
|
return field
|
||||||
}
|
}
|
||||||
}),
|
})
|
||||||
),
|
return column
|
||||||
}
|
})
|
||||||
|
return section
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user