Skip to content

Commit dd4005a

Browse files
authored
Merge pull request #2024 from IFRCGo/feature/issue-2018-appeal-type-filter
AppealType filter to 2 values, langing page Appeals table
2 parents b2eec6b + 94d9314 commit dd4005a

File tree

5 files changed

+22
-5
lines changed

5 files changed

+22
-5
lines changed

.changeset/tame-deer-mix.md

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

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)}

app/src/views/CountryNsOverviewActivities/NationalSocietyDevelopmentInitiatives/InitiativeCard/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ function InitiativeCard(props: Props) {
2525
} = props;
2626

2727
const strings = useTranslation(i18n);
28-
const categories = initiative.categories?.join(', ');
2928

3029
return (
3130
<Container
@@ -44,7 +43,7 @@ function InitiativeCard(props: Props) {
4443
footerContent={(
4544
<TextOutput
4645
label={strings.initiativeCategoriesTitle}
47-
value={categories}
46+
value={initiative.categories}
4847
valueType="text"
4948
strongValue
5049
withoutLabelColon

app/src/views/Resources/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export function Component() {
9292
{strings.goBlog}
9393
</Link>
9494
<Link
95-
href="https://app.powerbi.com/view?r=eyJrIjoiY2RlOTRkOGQtMDU5Yy00OWIwLWE2NmYtNTQ5NTQ3YjEwY2ZmIiwidCI6ImEyYjUzYmU1LTczNGUtNGU2Yy1hYjBkLWQxODRmNjBmZDkxNyIsImMiOjh9&pageName=ReportSectione263ecb5066f3105a8fa"
95+
href="https://app.powerbi.com/view?r=eyJrIjoiMmE2OTg5ZDgtYzMyNC00NjQ1LWJkZWUtMDI1ZDc5M2Q5ZDFlIiwidCI6ImEyYjUzYmU1LTczNGUtNGU2Yy1hYjBkLWQxODRmNjBmZDkxNyIsImMiOjh9"
9696
external
9797
withLinkIcon
9898
>

0 commit comments

Comments
 (0)