From ef5b1c80e493bc43fc0d01407a280b4062134ee5 Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Wed, 9 Aug 2023 12:02:15 +0530 Subject: [PATCH] fix: show Is Required - show Custom Form in search only if enabled --- schemas/core/CustomField.json | 4 ++-- src/utils/search.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/schemas/core/CustomField.json b/schemas/core/CustomField.json index 953e04ef..c6500601 100644 --- a/schemas/core/CustomField.json +++ b/schemas/core/CustomField.json @@ -122,12 +122,12 @@ "fieldtype": "AutoComplete" } ], - "tableFields": ["label", "fieldname", "fieldtype"], + "tableFields": ["label", "fieldname", "fieldtype", "isRequired"], "quickEditFields": [ "label", "fieldname", "fieldtype", - "required", + "isRequired", "options", "target", "references", diff --git a/src/utils/search.ts b/src/utils/search.ts index 961aef53..194b1654 100644 --- a/src/utils/search.ts +++ b/src/utils/search.ts @@ -217,6 +217,10 @@ function getListViewList(fyo: Fyo): SearchItem[] { schemaNames.push(ModelNameEnum.SerialNumber); } + if (fyo.doc.singles.AccountingSettings?.enableFormCustomization) { + schemaNames.push(ModelNameEnum.CustomForm); + } + if (fyo.store.isDevelopment) { schemaNames = Object.keys(fyo.schemaMap) as ModelNameEnum[]; }