Skip to content

Commit 852dbf9

Browse files
Merge pull request #2356 from akvo/step-instructions-update
update step instructions
2 parents 3a13780 + ca433f3 commit 852dbf9

File tree

15 files changed

+438
-68
lines changed

15 files changed

+438
-68
lines changed

frontend/src/modules/workspace/ps/config.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,46 @@ export const stepsState = [
148148
slug: '5-national-action-plan',
149149
substeps: [
150150
{ label: 'Intro', slug: '', checked: false },
151+
{
152+
label: 'Upstream Measures',
153+
slug: 'upstream-measures',
154+
checked: false,
155+
strapiParams: {
156+
slug: 'upstream-measures',
157+
},
158+
},
159+
{
160+
label: 'Waste Management & Circularity',
161+
slug: 'waste-management-circularity',
162+
checked: false,
163+
strapiParams: {
164+
slug: 'waste-management-circularity',
165+
},
166+
},
167+
{
168+
label: 'Sectoral Interventions & Legacy Plastics',
169+
slug: 'sectoral-interventions-legacy-plastics',
170+
checked: false,
171+
strapiParams: {
172+
slug: 'sectoral-interventions-legacy-plastics',
173+
},
174+
},
175+
{
176+
label: 'Governance & Enforcement',
177+
slug: 'governance-enforcement',
178+
checked: false,
179+
strapiParams: {
180+
slug: 'governance-enforcement',
181+
},
182+
},
183+
{
184+
label: 'Monitoring & Implementation',
185+
slug: 'monitoring-implementation',
186+
checked: false,
187+
strapiParams: {
188+
slug: 'monitoring-implementation',
189+
},
190+
},
151191
{ label: 'Summary & Report', slug: 'summary', checked: false },
152192
],
153193
},
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { PageLayout } from '..'
2+
import { useRouter } from 'next/router'
3+
import { Trans, t } from '@lingui/macro'
4+
import { loadCatalog } from '../../../../translations/utils'
5+
import { useStepInstructions } from '../../../../hooks/useStepInstructions'
6+
7+
const View = () => {
8+
const router = useRouter()
9+
const { data } = useStepInstructions('governance-enforcement', router.locale)
10+
11+
return (
12+
<>
13+
<h4 className="caps-heading-m">
14+
<Trans>Governance & Enforcement</Trans>
15+
</h4>
16+
<h2 className="h-xxl w-bold">{data?.title}</h2>
17+
<div
18+
className="strapi-workflow-page"
19+
dangerouslySetInnerHTML={{ __html: data?.content }}
20+
></div>
21+
</>
22+
)
23+
}
24+
25+
View.getLayout = PageLayout
26+
27+
export const getStaticPaths = async () => {
28+
return {
29+
paths: [],
30+
fallback: 'blocking',
31+
}
32+
}
33+
34+
export const getStaticProps = async (ctx) => {
35+
return {
36+
props: {
37+
i18n: await loadCatalog(ctx.locale),
38+
},
39+
}
40+
}
41+
42+
export default View
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { PageLayout } from '..'
2+
import { useRouter } from 'next/router'
3+
import { Trans, t } from '@lingui/macro'
4+
import { loadCatalog } from '../../../../translations/utils'
5+
import { useStepInstructions } from '../../../../hooks/useStepInstructions'
6+
7+
const View = () => {
8+
const router = useRouter()
9+
const { data } = useStepInstructions(
10+
'monitoring-implementation',
11+
router.locale
12+
)
13+
14+
return (
15+
<>
16+
<h4 className="caps-heading-m">
17+
<Trans>Monitoring & Implementation</Trans>
18+
</h4>
19+
<h2 className="h-xxl w-bold">{data?.title}</h2>
20+
<div
21+
className="strapi-workflow-page"
22+
dangerouslySetInnerHTML={{ __html: data?.content }}
23+
></div>
24+
</>
25+
)
26+
}
27+
28+
View.getLayout = PageLayout
29+
30+
export const getStaticPaths = async () => {
31+
return {
32+
paths: [],
33+
fallback: 'blocking',
34+
}
35+
}
36+
37+
export const getStaticProps = async (ctx) => {
38+
return {
39+
props: {
40+
i18n: await loadCatalog(ctx.locale),
41+
},
42+
}
43+
}
44+
45+
export default View
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { PageLayout } from '..'
2+
import { useRouter } from 'next/router'
3+
import { Trans, t } from '@lingui/macro'
4+
import { loadCatalog } from '../../../../translations/utils'
5+
import { useStepInstructions } from '../../../../hooks/useStepInstructions'
6+
7+
const View = () => {
8+
const router = useRouter()
9+
const { data } = useStepInstructions(
10+
'sectoral-interventions-legacy-plastics',
11+
router.locale
12+
)
13+
14+
return (
15+
<>
16+
<h4 className="caps-heading-m">
17+
<Trans>Sectoral Interventions & Legacy Plastics</Trans>
18+
</h4>
19+
<h2 className="h-xxl w-bold">{data?.title}</h2>
20+
<div
21+
className="strapi-workflow-page"
22+
dangerouslySetInnerHTML={{ __html: data?.content }}
23+
></div>
24+
</>
25+
)
26+
}
27+
28+
View.getLayout = PageLayout
29+
30+
export const getStaticPaths = async () => {
31+
return {
32+
paths: [],
33+
fallback: 'blocking',
34+
}
35+
}
36+
37+
export const getStaticProps = async (ctx) => {
38+
return {
39+
props: {
40+
i18n: await loadCatalog(ctx.locale),
41+
},
42+
}
43+
}
44+
45+
export default View
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { PageLayout } from '..'
2+
import { useRouter } from 'next/router'
3+
import { Trans, t } from '@lingui/macro'
4+
import { loadCatalog } from '../../../../translations/utils'
5+
import { useStepInstructions } from '../../../../hooks/useStepInstructions'
6+
7+
const View = () => {
8+
const router = useRouter()
9+
const { data } = useStepInstructions('upstream-measures', router.locale)
10+
11+
return (
12+
<>
13+
<h4 className="caps-heading-m">
14+
<Trans>Upstream Measures</Trans>
15+
</h4>
16+
<h2 className="h-xxl w-bold">{data?.title}</h2>
17+
<div
18+
className="strapi-workflow-page"
19+
dangerouslySetInnerHTML={{ __html: data?.content }}
20+
></div>
21+
</>
22+
)
23+
}
24+
25+
View.getLayout = PageLayout
26+
27+
export const getStaticPaths = async () => {
28+
return {
29+
paths: [],
30+
fallback: 'blocking',
31+
}
32+
}
33+
34+
export const getStaticProps = async (ctx) => {
35+
return {
36+
props: {
37+
i18n: await loadCatalog(ctx.locale),
38+
},
39+
}
40+
}
41+
42+
export default View
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { PageLayout } from '..'
2+
import { useRouter } from 'next/router'
3+
import { Trans, t } from '@lingui/macro'
4+
import { loadCatalog } from '../../../../translations/utils'
5+
import { useStepInstructions } from '../../../../hooks/useStepInstructions'
6+
7+
const View = () => {
8+
const router = useRouter()
9+
const { data } = useStepInstructions(
10+
'waste-management-circularity',
11+
router.locale
12+
)
13+
14+
return (
15+
<>
16+
<h4 className="caps-heading-m">
17+
<Trans>Waste Management & Circularity</Trans>
18+
</h4>
19+
<h2 className="h-xxl w-bold">{data?.title}</h2>
20+
<div
21+
className="strapi-workflow-page"
22+
dangerouslySetInnerHTML={{ __html: data?.content }}
23+
></div>
24+
</>
25+
)
26+
}
27+
28+
View.getLayout = PageLayout
29+
30+
export const getStaticPaths = async () => {
31+
return {
32+
paths: [],
33+
fallback: 'blocking',
34+
}
35+
}
36+
37+
export const getStaticProps = async (ctx) => {
38+
return {
39+
props: {
40+
i18n: await loadCatalog(ctx.locale),
41+
},
42+
}
43+
}
44+
45+
export default View

frontend/src/pages/workspace/[slug]/layout.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ export const useStepsDict = () => {
5555
t`National Source Inventory Data Mapping`
5656
),
5757
'Final Review': i18n._(t`Final Review`),
58+
'Upstream Measures': i18n._(t`Upstream Measures`),
59+
'Waste Management & Circularity': i18n._(t`Waste Management & Circularity`),
60+
'Sectoral Interventions & Legacy Plastics': i18n._(
61+
t`Sectoral Interventions & Legacy Plastics`
62+
),
63+
'Governance & Enforcement': i18n._(t`Governance & Enforcement`),
64+
'Monitoring & Implementation': i18n._(t`Monitoring & Implementation`),
5865
}
5966

6067
return stepsDict

frontend/src/translations/locales/en.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)