Skip to content

Commit 8e5d8a0

Browse files
authored
Merge pull request #895 from IFRCGo/feat/country-pages-wiki-links
Add links to GO Wiki in country page sections
2 parents 111c1c0 + 9657d4b commit 8e5d8a0

File tree

12 files changed

+112
-38
lines changed

12 files changed

+112
-38
lines changed

.changeset/polite-dingos-sniff.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"go-web-app": minor
3+
---
4+
5+
Add GO Wiki links for country page sections

app/src/views/CountryAdditionalInfo/index.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
import { isNotDefined } from '@togglecorp/fujs';
2323

2424
import Link, { type Props as LinkProps } from '#components/Link';
25+
import WikiLink from '#components/WikiLink';
2526
import {
2627
type CountryOutletContext,
2728
type CountryResponse,
@@ -114,7 +115,14 @@ export function Component() {
114115
const isDataAvailable = hasCountryLinks || hasCountryContacts || hasCountrySnippet;
115116

116117
return (
117-
<div className={styles.countryAdditionalData}>
118+
<Container
119+
className={styles.countryAdditionalData}
120+
actions={(
121+
<WikiLink
122+
href="user_guide/Country_Pages#additional-data"
123+
/>
124+
)}
125+
>
118126
{hasCountrySnippet && (
119127
<List
120128
data={countrySnippetResponse.results}
@@ -166,7 +174,7 @@ export function Component() {
166174
description={!countrySnippetPending && strings.noDataMessage}
167175
/>
168176
)}
169-
</div>
177+
</Container>
170178
);
171179
}
172180

app/src/views/CountryNsOverviewActivities/index.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import { unparse } from 'papaparse';
3737
import ExportButton from '#components/domain/ExportButton';
3838
import ProjectActions, { Props as ProjectActionsProps } from '#components/domain/ProjectActions';
3939
import Link from '#components/Link';
40+
import WikiLink from '#components/WikiLink';
4041
import useAlert from '#hooks/useAlert';
4142
import useFilterState from '#hooks/useFilterState';
4243
import useRecursiveCsvExport from '#hooks/useRecursiveCsvRequest';
@@ -367,13 +368,18 @@ export function Component() {
367368
<Container
368369
className={styles.nsActivity}
369370
actions={(
370-
<Link
371-
to="newThreeWActivity"
372-
variant="secondary"
373-
icons={<AddFillIcon />}
374-
>
375-
{strings.addNSActivity}
376-
</Link>
371+
<>
372+
<Link
373+
to="newThreeWActivity"
374+
variant="secondary"
375+
icons={<AddFillIcon />}
376+
>
377+
{strings.addNSActivity}
378+
</Link>
379+
<WikiLink
380+
href="user_guide/Country_Pages#national-society-overview"
381+
/>
382+
</>
377383
)}
378384
headerDescription={strings.nSActivityDescription}
379385
withCenteredHeaderDescription

app/src/views/CountryNsOverviewCapacity/index.tsx

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
} from '@togglecorp/fujs';
1616

1717
import Link from '#components/Link';
18+
import WikiLink from '#components/WikiLink';
1819
import { type CountryOutletContext } from '#utils/outletContext';
1920
import { useRequest } from '#utils/restRequest';
2021

@@ -49,14 +50,19 @@ export function Component() {
4950
<Container
5051
className={styles.nsOverviewCapacity}
5152
actions={(
52-
<Link
53-
href="https://www.ifrc.org/evaluations/"
54-
external
55-
withLinkIcon
56-
variant="primary"
57-
>
58-
{strings.nsOverviewCapacityLink}
59-
</Link>
53+
<>
54+
<Link
55+
href="https://www.ifrc.org/evaluations/"
56+
external
57+
withLinkIcon
58+
variant="primary"
59+
>
60+
{strings.nsOverviewCapacityLink}
61+
</Link>
62+
<WikiLink
63+
href="user_guide/Country_Pages#capacity"
64+
/>
65+
</>
6066
)}
6167
headerDescription={strings.nSOverviewCapacityDescription}
6268
withCenteredHeaderDescription

app/src/views/CountryNsOverviewContextAndStructure/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
} from '@togglecorp/fujs';
1212

1313
import Link from '#components/Link';
14+
import WikiLink from '#components/WikiLink';
1415
import { type CountryOutletContext } from '#utils/outletContext';
1516
import { useRequest } from '#utils/restRequest';
1617

@@ -65,6 +66,11 @@ export function Component() {
6566
contentViewType="vertical"
6667
spacing="loose"
6768
pending={databankResponsePending}
69+
actions={(
70+
<WikiLink
71+
href="user_guide/Country_Pages#context-and-structure"
72+
/>
73+
)}
6874
>
6975
<NationalSocietyIndicators
7076
databankResponse={databankResponse}

app/src/views/CountryNsOverviewStrategicPriorities/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
} from '@togglecorp/fujs';
2020

2121
import Link from '#components/Link';
22+
import WikiLink from '#components/WikiLink';
2223
import useDebouncedValue from '#hooks/useDebouncedValue';
2324
import { type CountryOutletContext } from '#utils/outletContext';
2425
import { useRequest } from '#utils/restRequest';
@@ -169,6 +170,11 @@ export function Component() {
169170
className={styles.strategicPriorities}
170171
childrenContainerClassName={styles.countryNsOverviewStrategicPriorities}
171172
headerDescription={strings.strategicPrioritiesDescription}
173+
actions={(
174+
<WikiLink
175+
href="user_guide/Country_Pages#strategic-priorities"
176+
/>
177+
)}
172178
withCenteredHeaderDescription
173179
pending={pending}
174180
empty={!pending && !hasCountryPlan && !perContentsDefined}

app/src/views/CountryNsOverviewSupportingPartners/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { useOutletContext } from 'react-router-dom';
22
import { Container } from '@ifrc-go/ui';
33
import { isNotDefined } from '@togglecorp/fujs';
44

5+
import WikiLink from '#components/WikiLink';
56
import { type CountryOutletContext } from '#utils/outletContext';
67
import { useRequest } from '#utils/restRequest';
78

@@ -35,6 +36,11 @@ export function Component() {
3536
className={styles.countryProfileSupportingPartners}
3637
contentViewType="vertical"
3738
spacing="loose"
39+
actions={(
40+
<WikiLink
41+
href="user_guide/Country_Pages#partners"
42+
/>
43+
)}
3844
>
3945
<Presence />
4046
{countryResponse?.has_country_plan && (

app/src/views/CountryOngoingActivitiesEmergencies/index.tsx

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ import HighlightedOperations from '#components/domain/HighlightedOperations';
6666
import Link from '#components/Link';
6767
import MapContainerWithDisclaimer from '#components/MapContainerWithDisclaimer';
6868
import MapPopup from '#components/MapPopup';
69+
import WikiLink from '#components/WikiLink';
6970
import { adminUrl } from '#config';
7071
import useAuth from '#hooks/domain/useAuth';
7172
import useCountryRaw from '#hooks/domain/useCountryRaw';
@@ -459,14 +460,19 @@ export function Component(props: BaseProps) {
459460
<Container
460461
className={styles.countryOngoingActivities}
461462
actions={isAuthenticated && (
462-
<Link
463-
external
464-
href={resolveUrl(adminUrl, `api/country/${countryId}/change/`)}
465-
variant="secondary"
466-
icons={<PencilFillIcon />}
467-
>
468-
{strings.editCountryLink}
469-
</Link>
463+
<>
464+
<Link
465+
external
466+
href={resolveUrl(adminUrl, `api/country/${countryId}/change/`)}
467+
variant="secondary"
468+
icons={<PencilFillIcon />}
469+
>
470+
{strings.editCountryLink}
471+
</Link>
472+
<WikiLink
473+
href="user_guide/Country_Pages#on-going-activities"
474+
/>
475+
</>
470476
)}
471477
headerDescription={strings.countryOngoingActivitiesEmergenciesDescription}
472478
withCenteredHeaderDescription
@@ -591,8 +597,8 @@ export function Component(props: BaseProps) {
591597
<Link
592598
to="countriesLayout"
593599
urlParams={{
594-
countryId:
595-
clickedPointProperties.feature.properties.country_id,
600+
// eslint-disable-next-line max-len
601+
countryId: clickedPointProperties.feature.properties.country_id,
596602
}}
597603
>
598604
{clickedPointProperties.feature.properties.name}

app/src/views/CountryOngoingActivitiesThreeWProjects/index.tsx

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import { unparse } from 'papaparse';
4040
import ExportButton from '#components/domain/ExportButton';
4141
import ProjectActions, { Props as ProjectActionsProps } from '#components/domain/ProjectActions';
4242
import Link from '#components/Link';
43+
import WikiLink from '#components/WikiLink';
4344
import useUserMe from '#hooks/domain/useUserMe';
4445
import useAlert from '#hooks/useAlert';
4546
import useRecursiveCsvExport from '#hooks/useRecursiveCsvRequest';
@@ -357,17 +358,23 @@ export function Component() {
357358
<Container
358359
className={styles.threeWProjects}
359360
actions={(
360-
isDefined(userMe?.id) && (
361-
<div className={styles.countryThreeWActions}>
362-
<Link
363-
variant="secondary"
364-
to="newThreeWProject"
365-
state={{ reportingNsId: countryId }}
366-
>
367-
{strings.addThreeWProject}
368-
</Link>
369-
</div>
370-
)
361+
<>
362+
{isDefined(userMe?.id) && (
363+
<div className={styles.countryThreeWActions}>
364+
<Link
365+
variant="secondary"
366+
to="newThreeWProject"
367+
state={{ reportingNsId: countryId }}
368+
>
369+
{strings.addThreeWProject}
370+
</Link>
371+
</div>
372+
)}
373+
<WikiLink
374+
href="user_guide/Country_Pages#h-3w-projects"
375+
/>
376+
</>
377+
371378
)}
372379
headerDescription={strings.threeWProjectDescription}
373380
withCenteredHeaderDescription

app/src/views/CountryProfileOverview/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
} from '@togglecorp/fujs';
2424

2525
import Link from '#components/Link';
26+
import WikiLink from '#components/WikiLink';
2627
import { type CountryOutletContext } from '#utils/outletContext';
2728
import {
2829
GoApiResponse,
@@ -225,6 +226,11 @@ export function Component() {
225226
pending={databankResponsePending}
226227
errored={isDefined(databankResponseError)}
227228
errorMessage={databankResponseError?.value?.messageForNotification}
229+
actions={(
230+
<WikiLink
231+
href="user_guide/Country_Pages#country-profile"
232+
/>
233+
)}
228234
>
229235
{isDefined(databankResponse) && (
230236
<Container

0 commit comments

Comments
 (0)