diff --git a/src/domain/entities/Indicator.ts b/src/domain/entities/Indicator.ts index 49f08e45..84fe8edc 100644 --- a/src/domain/entities/Indicator.ts +++ b/src/domain/entities/Indicator.ts @@ -12,7 +12,7 @@ export type IndicatorAttrs = { theme: string; status: string; type: "outputs" | "outcomes"; - scope: ScopeType; + scope: IndicatorScope; group: string; disaggregation: Maybe; coreCompetency: CoreCompetency; @@ -21,7 +21,7 @@ export type IndicatorAttrs = { relatedDataElements: DataElement[]; }; -export type ScopeType = "core" | "local" | "donor"; +export type IndicatorScope = "core" | "local" | "donor"; export class Indicator extends Struct() { setRelatedDataElements( diff --git a/src/utils/uid.ts b/src/utils/uid.ts index 673111d6..9032ebb7 100644 --- a/src/utils/uid.ts +++ b/src/utils/uid.ts @@ -45,9 +45,6 @@ export function generateUid(): string { return randomChars; } -// @ts-ignore -window.generateUid = generateUid; - const fullUidRegex = /^[a-zA-Z]{1}[a-zA-Z0-9]{10}$/; export function isValidUid(code: string | undefined | null): boolean { diff --git a/src/webapp/components/dataset-wizard/FilterIndicators.tsx b/src/webapp/components/dataset-wizard/FilterIndicators.tsx index b5b00893..58dcbd68 100644 --- a/src/webapp/components/dataset-wizard/FilterIndicators.tsx +++ b/src/webapp/components/dataset-wizard/FilterIndicators.tsx @@ -19,7 +19,7 @@ export type FilterIndicatorsProps = { onClose: () => void; onFilterChange: (scope: ChipItem[], type: FilterType) => void; scopes: string[]; - scopeValue: string; + scopeValue: string[]; showCloseButton?: boolean; themes: string[]; theme: string; @@ -104,7 +104,7 @@ export const FilterIndicators = React.memo((props: FilterIndicatorsProps) => { items={types.map(t => ({ text: t, value: t }))} label={i18n.t("Type")} onChange={value => onFilterChange(value, "outputType")} - value={selectedType} + value={[selectedType]} mode="single" /> @@ -139,7 +139,7 @@ export type ChipFilterProps = { items: ChipItem[]; label: string; onChange: (item: ChipItem[]) => void; - value: string | string[]; + value: string[]; mode?: "single" | "multiple"; }; diff --git a/src/webapp/components/dataset-wizard/IndicatorsDataSet.tsx b/src/webapp/components/dataset-wizard/IndicatorsDataSet.tsx index 984845f0..b0189f5c 100644 --- a/src/webapp/components/dataset-wizard/IndicatorsDataSet.tsx +++ b/src/webapp/components/dataset-wizard/IndicatorsDataSet.tsx @@ -157,7 +157,7 @@ export const IndicatorsDataSet = React.memo((props: IndicatorsDataSetProps) => { >