File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
app/src/components/domain/AppealsTable Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " go-web-app " : patch
3+ ---
4+
5+ AppealType filter to 2 values, landing page Appeals table
Original file line number Diff line number Diff line change @@ -38,6 +38,11 @@ import type {
3838} from '#utils/restRequest' ;
3939import { useRequest } from '#utils/restRequest' ;
4040
41+ import {
42+ APPEAL_TYPE_DREF ,
43+ APPEAL_TYPE_EMERGENCY ,
44+ } from '../ActiveOperationMap/utils' ;
45+
4146import i18n from './i18n.json' ;
4247import 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 ) }
You can’t perform that action at this time.
0 commit comments