Skip to content

Commit 8e2b2d6

Browse files
committed
AppealType filter to 2 values, landing page Appeals table
1 parent b2eec6b commit 8e2b2d6

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.changeset/tame-deer-mix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"go-web-app": patch
3+
---
4+
5+
AppealType filter to 2 values, landing page Appeals table

app/src/components/domain/AppealsTable/index.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ import type {
3838
} from '#utils/restRequest';
3939
import { useRequest } from '#utils/restRequest';
4040

41+
import {
42+
APPEAL_TYPE_DREF,
43+
APPEAL_TYPE_EMERGENCY,
44+
} from '../ActiveOperationMap/utils';
45+
4146
import i18n from './i18n.json';
4247
import styles from './styles.module.css';
4348

@@ -106,7 +111,7 @@ function AppealsTable(props: Props) {
106111
});
107112

108113
const strings = useTranslation(i18n);
109-
const { api_appeal_type: appealTypeOptions } = useGlobalEnums();
114+
const { api_appeal_type: appealTypeOptionsRaw } = useGlobalEnums();
110115

111116
const handleClearFiltersButtonClick = useCallback(() => {
112117
setFilter({});
@@ -269,6 +274,13 @@ function AppealsTable(props: Props) {
269274
query,
270275
});
271276

277+
const appealTypeOptions = useMemo(() => (
278+
appealTypeOptionsRaw?.filter(
279+
(appealTypeOption) => appealTypeOption.key === APPEAL_TYPE_DREF
280+
|| appealTypeOption.key === APPEAL_TYPE_EMERGENCY,
281+
)
282+
), [appealTypeOptionsRaw]);
283+
272284
return (
273285
<Container
274286
className={_cs(styles.appealsTable, className)}

0 commit comments

Comments
 (0)