Skip to content

Commit

Permalink
fix: made deal quick entry sections not deletable
Browse files Browse the repository at this point in the history
  • Loading branch information
shariquerik committed Jan 1, 2025
1 parent 251658e commit 9113378
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crm/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def add_default_fields_layout(force=False):
},
"CRM Deal-Quick Entry": {
"doctype": "CRM Deal",
"layout": '[{"name": "organization_section", "columns": [{"name": "column_GpMP", "fields": ["organization"]}, {"name": "column_FPTn", "fields": []}]}, {"name": "organization_details_section", "columns": [{"name": "column_S3tQ", "fields": ["organization_name", "territory"]}, {"name": "column_KqV1", "fields": ["website", "annual_revenue"]}, {"name": "column_1r67", "fields": ["no_of_employees", "industry"]}]}, {"name": "contact_section", "columns": [{"name": "column_CeXr", "fields": ["contact"]}, {"name": "column_yHbk", "fields": []}]}, {"name": "contact_details_section", "columns": [{"name": "column_ZTWr", "fields": ["salutation", "email"]}, {"name": "column_tabr", "fields": ["first_name", "mobile_no"]}, {"name": "column_Qjdx", "fields": ["last_name", "gender"]}]}, {"name": "deal_section", "columns": [{"name": "column_mdps", "fields": ["status"]}, {"name": "column_H40H", "fields": ["deal_owner"]}]}]',
"layout": '[{"name": "organization_section", "hidden": true, "editable": false, "columns": [{"name": "column_GpMP", "fields": ["organization"]}, {"name": "column_FPTn", "fields": []}]}, {"name": "organization_details_section", "editable": false, "columns": [{"name": "column_S3tQ", "fields": ["organization_name", "territory"]}, {"name": "column_KqV1", "fields": ["website", "annual_revenue"]}, {"name": "column_1r67", "fields": ["no_of_employees", "industry"]}]}, {"name": "contact_section", "hidden": true, "editable": false, "columns": [{"name": "column_CeXr", "fields": ["contact"]}, {"name": "column_yHbk", "fields": []}]}, {"name": "contact_details_section", "editable": false, "columns": [{"name": "column_ZTWr", "fields": ["salutation", "email"]}, {"name": "column_tabr", "fields": ["first_name", "mobile_no"]}, {"name": "column_Qjdx", "fields": ["last_name", "gender"]}]}, {"name": "deal_section", "columns": [{"name": "column_mdps", "fields": ["status"]}, {"name": "column_H40H", "fields": ["deal_owner"]}]}]',
},
"Contact-Quick Entry": {
"doctype": "Contact",
Expand Down
7 changes: 2 additions & 5 deletions frontend/src/components/FieldLayoutEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@ function getSectionOptions(i, section, tab) {
label: __('Edit'),
icon: 'edit',
onClick: () => (section.editingLabel = true),
condition: () => section.editable !== false,
},
{
label: section.collapsible ? __('Uncollapsible') : __('Collapsible'),
Expand Down Expand Up @@ -396,8 +395,7 @@ function getSectionOptions(i, section, tab) {
)
tabIndex.value -= 1
},
condition: () =>
section.editable !== false && props.tabs[tabIndex.value - 1],
condition: () => props.tabs[tabIndex.value - 1],
},
{
label: __('Move to next tab'),
Expand All @@ -411,8 +409,7 @@ function getSectionOptions(i, section, tab) {
)
tabIndex.value += 1
},
condition: () =>
section.editable !== false && props.tabs[tabIndex.value + 1],
condition: () => props.tabs[tabIndex.value + 1],
},
],
},
Expand Down

0 comments on commit 9113378

Please sign in to comment.