Skip to content

Commit 9d81a55

Browse files
committed
feat(active-operation-map): update visible appeal types
- Remove `Forecased Based Action` from appeals filter - Remove `International Appeal` from appeals filter - Remove `Early Action Protocol Activation` from legend
1 parent 894ec29 commit 9d81a55

File tree

1 file changed

+10
-9
lines changed
  • app/src/components/domain/ActiveOperationMap

1 file changed

+10
-9
lines changed

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,10 @@ import { useRequest } from '#utils/restRequest';
5656
import GlobalMap, { type AdminZeroFeatureProperties } from '../GlobalMap';
5757
import {
5858
APPEAL_TYPE_DREF,
59-
APPEAL_TYPE_EAP,
6059
APPEAL_TYPE_EMERGENCY,
6160
APPEAL_TYPE_MULTIPLE,
6261
basePointLayerOptions,
6362
COLOR_DREF,
64-
COLOR_EAP,
6563
COLOR_EMERGENCY_APPEAL,
6664
COLOR_MULTIPLE_TYPES,
6765
optionKeySelector,
@@ -177,14 +175,21 @@ function ActiveOperationMap(props: Props) {
177175

178176
const [scaleBy, setScaleBy] = useInputState<ScaleOption['value']>('peopleTargeted');
179177
const strings = useTranslation(i18n);
180-
const { api_appeal_type: appealTypeOptions } = useGlobalEnums();
178+
const { api_appeal_type: appealTypeOptionsRaw } = useGlobalEnums();
181179
const {
182180
response: appealResponse,
183181
} = useRequest({
184182
url: '/api/v2/appeal/',
185183
query,
186184
});
187185

186+
const appealTypeOptions = useMemo(() => (
187+
appealTypeOptionsRaw?.filter(
188+
(appealTypeOption) => appealTypeOption.key === APPEAL_TYPE_DREF
189+
|| appealTypeOption.key === APPEAL_TYPE_EMERGENCY,
190+
)
191+
), [appealTypeOptionsRaw]);
192+
188193
const countryResponse = useCountryRaw();
189194

190195
const scaleOptions: ScaleOption[] = useMemo(() => ([
@@ -206,11 +211,6 @@ function ActiveOperationMap(props: Props) {
206211
label: strings.explanationBubbleDref,
207212
color: COLOR_DREF,
208213
},
209-
{
210-
value: APPEAL_TYPE_EAP,
211-
label: strings.explanationBubbleEAP,
212-
color: COLOR_EAP,
213-
},
214214
{
215215
value: APPEAL_TYPE_MULTIPLE,
216216
label: strings.explanationBubbleMultiple,
@@ -219,7 +219,8 @@ function ActiveOperationMap(props: Props) {
219219
]), [
220220
strings.explanationBubbleEmergencyAppeal,
221221
strings.explanationBubbleDref,
222-
strings.explanationBubbleEAP,
222+
// FIXME: string to be removed
223+
// strings.explanationBubbleEAP,
223224
strings.explanationBubbleMultiple,
224225
]);
225226

0 commit comments

Comments
 (0)