From 276e4abc4ec378afafa7414d8333aec1208f00e5 Mon Sep 17 00:00:00 2001 From: Chisom Chima <87203527+Chisomchima@users.noreply.github.com> Date: Thu, 5 Dec 2024 20:03:59 +0100 Subject: [PATCH] fix(categoryOptionGroup): remove dataDimension field (#460) * fix: remove data dimension and add data dimension type filter * chore: remove data dimension from edit form * chore: resolved filters --- i18n/en.pot | 2 ++ .../sectionList/listView/useModelListView.tsx | 1 + src/pages/categoryOptionGroups/Edit.tsx | 1 - .../form/CategoryOptionGroupFormFields.tsx | 11 ----------- .../form/categoryOptionGroupSchema.ts | 1 - 5 files changed, 3 insertions(+), 13 deletions(-) diff --git a/i18n/en.pot b/i18n/en.pot index 1f209e0b..97eccf17 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,6 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" +"POT-Creation-Date: 2024-12-05T06:06:51.471Z\n" +"PO-Revision-Date: 2024-12-05T06:06:51.471Z\n" "POT-Creation-Date: 2024-12-03T07:31:45.454Z\n" "PO-Revision-Date: 2024-12-03T07:31:45.455Z\n" diff --git a/src/components/sectionList/listView/useModelListView.tsx b/src/components/sectionList/listView/useModelListView.tsx index ae58f851..af0aad0f 100644 --- a/src/components/sectionList/listView/useModelListView.tsx +++ b/src/components/sectionList/listView/useModelListView.tsx @@ -149,6 +149,7 @@ export const useModelListView = () => { const columns = selectedView.columns const filters = selectedView.filters + return { view: selectedView, columns, filters, query } } diff --git a/src/pages/categoryOptionGroups/Edit.tsx b/src/pages/categoryOptionGroups/Edit.tsx index 529cb7c7..319c800f 100644 --- a/src/pages/categoryOptionGroups/Edit.tsx +++ b/src/pages/categoryOptionGroups/Edit.tsx @@ -22,7 +22,6 @@ const fieldFilters = [ 'code', 'description', 'categoryOptions[id,displayName]', - 'dataDimension', 'dataDimensionType', ] as const diff --git a/src/pages/categoryOptionGroups/form/CategoryOptionGroupFormFields.tsx b/src/pages/categoryOptionGroups/form/CategoryOptionGroupFormFields.tsx index abcf48f8..2c5ca915 100644 --- a/src/pages/categoryOptionGroups/form/CategoryOptionGroupFormFields.tsx +++ b/src/pages/categoryOptionGroups/form/CategoryOptionGroupFormFields.tsx @@ -66,17 +66,6 @@ function CategoryOptionGroupFormFields() { /> - - - diff --git a/src/pages/categoryOptionGroups/form/categoryOptionGroupSchema.ts b/src/pages/categoryOptionGroups/form/categoryOptionGroupSchema.ts index e086768d..31e5e901 100644 --- a/src/pages/categoryOptionGroups/form/categoryOptionGroupSchema.ts +++ b/src/pages/categoryOptionGroups/form/categoryOptionGroupSchema.ts @@ -16,7 +16,6 @@ export const categoryOptionGroupSchema = identifiable dataDimensionType: z .nativeEnum(CategoryOptionGroup.dataDimensionType) .default(CategoryOptionGroup.dataDimensionType.DISAGGREGATION), - dataDimension: z.boolean().default(true), categoryOptions: referenceCollection .min(1, 'At least one category option is required') .default([]),