fix: only show erpnext setting fields if enabled is set
This commit is contained in:
parent
078bea20a8
commit
020c285178
@ -17,14 +17,14 @@
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"depends_on": "eval:!doc.is_erpnext_in_the_current_site",
|
||||
"depends_on": "eval:doc.enabled && !doc.is_erpnext_in_the_current_site",
|
||||
"fieldname": "api_key",
|
||||
"fieldtype": "Data",
|
||||
"label": "API Key",
|
||||
"mandatory_depends_on": "eval:!doc.is_erpnext_in_the_current_site"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:!doc.is_erpnext_in_the_current_site",
|
||||
"depends_on": "eval:doc.enabled && !doc.is_erpnext_in_the_current_site",
|
||||
"fieldname": "api_secret",
|
||||
"fieldtype": "Data",
|
||||
"label": "API Secret",
|
||||
@ -40,7 +40,7 @@
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:!doc.is_erpnext_in_the_current_site",
|
||||
"depends_on": "eval:doc.enabled && !doc.is_erpnext_in_the_current_site",
|
||||
"fieldname": "erpnext_site_url",
|
||||
"fieldtype": "Data",
|
||||
"label": "ERPNext Site URL",
|
||||
@ -74,7 +74,7 @@
|
||||
"index_web_pages_for_search": 1,
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2024-09-12 18:14:44.323068",
|
||||
"modified": "2024-09-13 15:06:23.317262",
|
||||
"modified_by": "Administrator",
|
||||
"module": "FCRM",
|
||||
"name": "ERPNext CRM Settings",
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div
|
||||
v-for="section in sections"
|
||||
:key="section.label"
|
||||
class="first:border-t-0 first:pt-0"
|
||||
class="section first:border-t-0 first:pt-0"
|
||||
:class="section.hideBorder ? '' : 'border-t pt-4'"
|
||||
>
|
||||
<div
|
||||
@ -22,6 +22,7 @@
|
||||
>
|
||||
<div v-for="field in section.fields" :key="field.name">
|
||||
<div
|
||||
class="settings-field"
|
||||
v-if="
|
||||
(field.type == 'Check' ||
|
||||
(field.read_only && data[field.name]) ||
|
||||
@ -218,4 +219,12 @@ const props = defineProps({
|
||||
:deep(.form-control.prefix select) {
|
||||
padding-left: 2rem;
|
||||
}
|
||||
|
||||
.section {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.section:has(.settings-field) {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user