diff --git a/src/components/sectionedForm/SectionFormSidebar.module.css b/src/components/sectionedForm/SectionFormSidebar.module.css index 156a22f35..9648caf4b 100644 --- a/src/components/sectionedForm/SectionFormSidebar.module.css +++ b/src/components/sectionedForm/SectionFormSidebar.module.css @@ -21,89 +21,3 @@ box-shadow: 4px 0px 0px 0px var(--colors-blue700) inset; cursor: initial; } - -.listItem header { - font-size: 14px; - font-weight: 500; -} - -.listItem .checkInfo { - display: flex; - flex-direction: column; - justify-content: space-between; - gap: 8px; -} - -.listItem .subtitle { - display: flex; - align-items: flex-start; - flex-wrap: wrap; - font-size: 12px; - gap: 4px; - color: var(--colors-grey700); -} - -.noItemsMessage { - display: flex; - justify-content: center; - align-items: center; - height: 100%; - font-size: 14px; - color: var(--colors-grey700); -} - -.subtitleSection { - flex-shrink: 0; -} - -.statusIcon { - flex-shrink: 0; -} - -.listToolbar { - display: flex; - gap: 10px; - align-items: center; - padding: var(--spacers-dp8) var(--spacers-dp8) var(--spacers-dp8) - var(--spacers-dp16); - border-width: 1px 0px 1px; - border-style: solid; - border-color: var(--colors-grey400); -} - -.toolbarTabs { - border-width: 1px 0px 0px; - border-style: solid; - border-color: var(--colors-grey400); - box-shadow: none; -} - -.slowCheckInfo { - font-size: 14px; - display: flex; - align-items: center; - gap: 6px; - border-inline-start: 1px solid var(--colors-grey300); - padding-inline-start: 6px; - color: var(--colors-grey700); -} - -/* disable borders and shadows from UI TabBar and Tab -Prevents "double" border -*/ -.toolbarTabs div, -.toolbarTabs button { - box-shadow: none; - border: none !important; -} - -.errorIcon { - display: flex; - align-items: center; - gap: 4px; - font-size: 14px; -} - -.searchInput { - width: 180px; -} diff --git a/src/lib/form/sectionedForm/useSelectedSection.ts b/src/lib/form/sectionedForm/useSelectedSection.ts index 75d2fbcd9..a69cb32d2 100644 --- a/src/lib/form/sectionedForm/useSelectedSection.ts +++ b/src/lib/form/sectionedForm/useSelectedSection.ts @@ -24,23 +24,3 @@ export const useSelectedSection = () => { removeDefaultsFromUrl: true, }) } - -/* Helper to create a type-safe hook for useSelectedSection */ -export const createUseSelectedSection = < - TSection extends string, - TDefault extends TSection ->( - sections: TSection[], - defaultSection: TDefault -) => { - const queryParamType = withDefault( - createEnumParam(sections), - defaultSection - ) - const useSelectedSection = () => { - return useQueryParam(FORM_SECTION_PARAM_KEY, queryParamType, { - removeDefaultsFromUrl: true, - }) - } - return useSelectedSection -} diff --git a/src/lib/form/types.ts b/src/lib/form/types.ts deleted file mode 100644 index 891496cb9..000000000 --- a/src/lib/form/types.ts +++ /dev/null @@ -1,17 +0,0 @@ -// type AllowAnyString -type FieldDescriptor = { - label: string -} - -type SectionDescriptor = { - label: string - // keyof T | (string & {}) allows auto-completion for fields, while also allowing - // any other string to be used as a key - fields: Partial> - // fields: Partial> -} - -type FormDescriptor = { - name: string - sections: Record> -} diff --git a/src/pages/dataSets/form/fieldFilters.ts b/src/pages/dataSets/form/fieldFilters.ts index e61ffc82b..385564e98 100644 --- a/src/pages/dataSets/form/fieldFilters.ts +++ b/src/pages/dataSets/form/fieldFilters.ts @@ -7,7 +7,7 @@ import { DataSet, PickWithFieldFilters } from '../../../types/generated' const fieldFilters = [ ...DEFAULT_FIELD_FILTERS, ...ATTRIBUTE_VALUES_FIELD_FILTERS, - 'categoryCombos[id,displayName]', + 'categoryCombo[id,displayName]', 'dataElementDecoration', 'dataEntryForm[id]', 'dataInputPeriods', @@ -22,12 +22,13 @@ const fieldFilters = [ 'renderAsTabs', 'renderHorizontally', 'sections', + 'style', 'skipOffline', 'timelyDays', 'validCommpleteOnly', ] as const -// DisplayOptions are handld by client only +// DisplayOptions are handled by client only, and thus dont have a generated type // TODO: this should have a zod-schema and validation type DisplayOptions = Record