Skip to content

Commit

Permalink
Added Wiki hook points on Preparedness page,each country page Prepare…
Browse files Browse the repository at this point in the history
…dness tab,On My account - PER tab
  • Loading branch information
roshni73 committed Jan 16, 2024
1 parent 9e93b86 commit 835e493
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 32 deletions.
2 changes: 1 addition & 1 deletion src/components/Alert/i18n.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"namespace": "common",
"strings": {
"CopyErrorDetails": "Copy error details",
"alertCopyErrorDetails": "alertCopyErrorDetails",
"closeButtonTitle": "Close"
}
}
17 changes: 8 additions & 9 deletions src/views/AccountMyFormsPer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ import useTranslation from '#hooks/useTranslation';
import useFilterState from '#hooks/useFilterState';
import { useRequest, type GoApiResponse } from '#utils/restRequest';
import { numericIdSelector } from '#utils/selectors';

import WikiLink from '#components/WikiLink';
import PerTableActions, { type Props as PerTableActionsProps } from './PerTableActions';
import i18n from './i18n.json';
import styles from './styles.module.css';
import WikiLink from '#components/WikiLink';

type AggregatedPerProcessStatusResponse = GoApiResponse<'/api/v2/aggregated-per-process-status/'>;
type PerProcessStatusItem = NonNullable<AggregatedPerProcessStatusResponse['results']>[number];
Expand Down Expand Up @@ -207,22 +206,22 @@ export function Component() {

return (
<Container
actions={(
<WikiLink
href=" https://go-wiki.ifrc.org/en/user_guide/Preparedness#register-or-update-a-per-process"
/>
)}
className={styles.accountPerForms}
heading={strings.processStatusTitle}
withHeaderBorder
/*actions={(
actions={(
<>
<Link
to="newPerOverviewForm"
variant="primary"
>
{strings.newProcessButtonLabel}
</Link>
)}*/
<WikiLink
href="https://go-wiki.ifrc.org/en/user_guide/Preparedness#register-or-update-a-per-process"
/>
</>
)}
filtersContainerClassName={styles.filters}
filters={(
<>
Expand Down
21 changes: 12 additions & 9 deletions src/views/CountryPreparedness/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,12 @@ import {
stringLabelSelector,
stringTitleSelector,
} from '#utils/selectors';

import WikiLink from '#components/WikiLink';
import PreviousAssessmentCharts from './PreviousAssessmentChart';
import PublicCountryPreparedness from './PublicCountryPreparedness';
import RatingByAreaChart from './RatingByAreaChart';
import i18n from './i18n.json';
import styles from './styles.module.css';
import Actions from '#views/DrefOperationalUpdateForm/Actions';
import { access } from 'fs';

const primaryRedColorShades = [
'var(--go-ui-color-red-90)',
Expand Down Expand Up @@ -404,12 +402,17 @@ export function Component() {
headingLevel={2}
withHeaderBorder
actions={(
<TextOutput
label={strings.lastUpdatedLabel}
value={processStatusResponse?.updated_at}
valueType="date"
strongValue
/>
<>
<TextOutput
label={strings.lastUpdatedLabel}
value={processStatusResponse?.updated_at}
valueType="date"
strongValue
/>
<WikiLink
href="https://go-wiki.ifrc.org/en/user_guide/Preparedness#how-to-use-it"
/>
</>
)}
>
<div className={styles.latestPerDetails}>
Expand Down
9 changes: 3 additions & 6 deletions src/views/Preparedness/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import WikiLink from '#components/WikiLink';
import i18n from './i18n.json';

import styles from './styles.module.css';


// eslint-disable-next-line import/prefer-default-export
export function Component() {
const strings = useTranslation(i18n);
Expand All @@ -32,17 +30,16 @@ export function Component() {
childrenContainerClassName={styles.approachContent}
actions={(
<>
<WikiLink
href=' https://go-wiki.ifrc.org/en/user_guide/Preparedness'

/>
<Link
href="mailto:[email protected]"
external
variant="primary"
>
{strings.contactPerTeam}
</Link>
<WikiLink
href="https://go-wiki.ifrc.org/en/user_guide/Preparedness"
/>
</>
)}
>
Expand Down
1 change: 1 addition & 0 deletions src/views/Preparedness/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
}
}
}

7 changes: 0 additions & 7 deletions src/views/RegionPreparedness/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { type RegionOutletContext, type RegionResponse } from '#utils/outletCont
import HtmlOutput from '#components/HtmlOutput';
import Container from '#components/Container';
import List from '#components/List';
import WikiLink from '#components/WikiLink';
import Page from '#components/Page';

import styles from './styles.module.css';

Expand All @@ -31,11 +29,6 @@ function Snippet(props: SnippetProps) {
key={id}
heading={title}
withHeaderBorder
actions={(
<WikiLink
href="user_guide/account"
/>
)}
>
<HtmlOutput
value={snippet}
Expand Down

0 comments on commit 835e493

Please sign in to comment.