diff --git a/frontend/src/app/components/containers/complaints/outcomes/ceeb/ceeb-decision/decision-form.tsx b/frontend/src/app/components/containers/complaints/outcomes/ceeb/ceeb-decision/decision-form.tsx index 2bd2c654d..8482b7a76 100644 --- a/frontend/src/app/components/containers/complaints/outcomes/ceeb/ceeb-decision/decision-form.tsx +++ b/frontend/src/app/components/containers/complaints/outcomes/ceeb/ceeb-decision/decision-form.tsx @@ -114,6 +114,18 @@ export const DecisionForm: FC = ({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [officerAssigned]); + useEffect(() => { + if (sector && schedule) { + let options = scheduleSectorType.filter((item) => item.schedule === schedule).map(item => { + const record: Option = { label: item.longDescription, value: item.sector }; + return record + }); + const model = { ...data, sector: sector, schedule: schedule }; + setData(model); + setSectorList(options); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [officerAssigned]); //-- update the decision state by property const updateModel = (property: string, value: string | Date | undefined) => { const model = { ...data, [property]: value }; diff --git a/frontend/src/app/store/reducers/code-table-selectors.ts b/frontend/src/app/store/reducers/code-table-selectors.ts index a5db4c73a..714e36b17 100644 --- a/frontend/src/app/store/reducers/code-table-selectors.ts +++ b/frontend/src/app/store/reducers/code-table-selectors.ts @@ -41,7 +41,6 @@ export const selectScheduleSectorDropdown = (state: RootState): Array