Skip to content

Commit 77c804b

Browse files
authored
Merge pull request #460 from IFRCGo/fix/Wiki-hook-points
Add Wiki hooks points for PER
2 parents 2f61fad + 609e60e commit 77c804b

File tree

9 files changed

+52
-23
lines changed

9 files changed

+52
-23
lines changed

src/components/domain/RiskImminentEvents/Gdacs/EventDetails/i18n.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"eventPopulationLabel": "Population exposed",
1010
"eventPeopleAffectedLabel": "People affected",
1111
"eventImpactLabel": "Impact",
12-
"eventSeverityLabel": "Severity"
12+
"eventSeverityLabel": "Severity",
13+
"eventAlertType": "Alert Type"
1314
}
1415
}

src/components/domain/RiskImminentEvents/Gdacs/EventDetails/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ interface GdacsEventDetails {
5555
geometry?: string;
5656
},
5757
}
58-
5958
interface GdacsPopulationExposure {
6059
death?: number;
6160
displaced?: number;
@@ -153,6 +152,12 @@ function EventDetails(props: Props) {
153152
value={eventDetails?.severitydata?.severitytext}
154153
/>
155154
)}
155+
{isDefined(eventDetails?.alertlevel) && (
156+
<TextOutput
157+
label={strings.eventAlertType}
158+
value={eventDetails?.alertlevel}
159+
/>
160+
)}
156161
</div>
157162
{isDefined(eventDetails)
158163
&& isDefined(eventDetails.url)

src/views/AccountMyFormsPer/index.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import useTranslation from '#hooks/useTranslation';
3131
import useFilterState from '#hooks/useFilterState';
3232
import { useRequest, type GoApiResponse } from '#utils/restRequest';
3333
import { numericIdSelector } from '#utils/selectors';
34-
34+
import WikiLink from '#components/WikiLink';
3535
import PerTableActions, { type Props as PerTableActionsProps } from './PerTableActions';
3636
import i18n from './i18n.json';
3737
import styles from './styles.module.css';
@@ -209,13 +209,19 @@ export function Component() {
209209
className={styles.accountPerForms}
210210
heading={strings.processStatusTitle}
211211
withHeaderBorder
212+
actionsContainerClassName={styles.actionsContainer}
212213
actions={(
213-
<Link
214-
to="newPerOverviewForm"
215-
variant="primary"
216-
>
217-
{strings.newProcessButtonLabel}
218-
</Link>
214+
<>
215+
<Link
216+
to="newPerOverviewForm"
217+
variant="primary"
218+
>
219+
{strings.newProcessButtonLabel}
220+
</Link>
221+
<WikiLink
222+
href="user_guide/Preparedness#register-or-update-a-per-process"
223+
/>
224+
</>
219225
)}
220226
filtersContainerClassName={styles.filters}
221227
filters={(

src/views/AccountMyFormsPer/styles.module.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
88
}
99

10+
.actions-container {
11+
display: flex;
12+
align-items: center;
13+
}
1014
.sub-cell {
1115
border-bottom: unset;
1216
background-color: var(--go-ui-color-gray-20);

src/views/CountryPreparedness/index.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import {
3636
stringLabelSelector,
3737
stringTitleSelector,
3838
} from '#utils/selectors';
39-
39+
import WikiLink from '#components/WikiLink';
4040
import PreviousAssessmentCharts from './PreviousAssessmentChart';
4141
import PublicCountryPreparedness from './PublicCountryPreparedness';
4242
import RatingByAreaChart from './RatingByAreaChart';
@@ -399,15 +399,21 @@ export function Component() {
399399
className={styles.countryPreparedness}
400400
childrenContainerClassName={styles.preparednessContent}
401401
heading={strings.nsPreparednessAndResponseCapacityHeading}
402+
actionsContainerClassName={styles.actionsContainer}
402403
headingLevel={2}
403404
withHeaderBorder
404405
actions={(
405-
<TextOutput
406-
label={strings.lastUpdatedLabel}
407-
value={processStatusResponse?.updated_at}
408-
valueType="date"
409-
strongValue
410-
/>
406+
<>
407+
<TextOutput
408+
label={strings.lastUpdatedLabel}
409+
value={processStatusResponse?.updated_at}
410+
valueType="date"
411+
strongValue
412+
/>
413+
<WikiLink
414+
href="user_guide/Preparedness#how-to-use-it"
415+
/>
416+
</>
411417
)}
412418
>
413419
<div className={styles.latestPerDetails}>

src/views/CountryPreparedness/styles.module.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
padding: var(--go-ui-spacing-2xl) 0;
33
min-height: 40vh;
44

5+
.actions-container {
6+
display: flex;
7+
align-items: center;
8+
}
9+
510
.preparedness-content {
611
display: grid;
712
grid-gap: var(--go-ui-spacing-lg);

src/views/Preparedness/index.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import NavigationTab from '#components/NavigationTab';
88
import NavigationTabList from '#components/NavigationTabList';
99
import { resolveToComponent } from '#utils/translation';
1010
import useTranslation from '#hooks/useTranslation';
11+
import WikiLink from '#components/WikiLink';
1112

1213
import i18n from './i18n.json';
1314

1415
import styles from './styles.module.css';
15-
1616
// eslint-disable-next-line import/prefer-default-export
1717
export function Component() {
1818
const strings = useTranslation(i18n);
@@ -28,6 +28,7 @@ export function Component() {
2828
heading={strings.preparednessApproachSection}
2929
withHeaderBorder
3030
childrenContainerClassName={styles.approachContent}
31+
actionsContainerClassName={styles.actionsContainer}
3132
actions={(
3233
<>
3334
<Link
@@ -37,11 +38,9 @@ export function Component() {
3738
>
3839
{strings.contactPerTeam}
3940
</Link>
40-
{/* {strings.wikiJsLink?.length > 0 && (
41-
<WikiLink
42-
href=''
43-
/>
44-
)} */}
41+
<WikiLink
42+
href="user_guide/Preparedness"
43+
/>
4544
</>
4645
)}
4746
>

src/views/Preparedness/styles.module.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
flex-direction: column;
44
gap: var(--go-ui-spacing-2xl);
55

6+
.actions-container {
7+
display: flex;
8+
align-items: center;
9+
}
610
.approach-content {
711
display: grid;
812
grid-gap: var(--go-ui-spacing-md);

src/views/RegionRiskWatchImminent/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { RegionOutletContext } from '#utils/outletContext';
88
import styles from './styles.module.css';
99

1010
// TODO: Add historic data chart
11-
1211
// eslint-disable-next-line import/prefer-default-export
1312
export function Component() {
1413
const { regionResponse } = useOutletContext<RegionOutletContext>();

0 commit comments

Comments
 (0)