Skip to content

Commit

Permalink
Add dual use risk to the risk table
Browse files Browse the repository at this point in the history
  • Loading branch information
erikao1998 committed Dec 22, 2023
1 parent 63763b2 commit afae07b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/client/components/ResultPage/TotalRisk.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ const TotalRisk = ({
.find((question) => question.id === 12)
?.optionData.options.find((o) => o.id === resultData[12])?.risk

const dualUseRisk = questions
.find((question) => question.id === 23)
?.optionData.options.find((o) => o.id === resultData[23])?.risk

const riskArray = [
{
id: 'country',
Expand All @@ -74,6 +78,11 @@ const TotalRisk = ({
text: t('risks:durationRiskLevel'),
riskLevel: durationRisk,
},
{
id: 'dualUse',
text: t('risks:dualUseRiskLevel'),
riskLevel: dualUseRisk,
},
].filter((value) => possibleRiskLevels.includes(value.riskLevel))

if (riskArray.length === 0) return null
Expand Down Expand Up @@ -119,7 +128,6 @@ const TotalRisk = ({
)}
{riskArray.map(
(risk) =>
risk.riskLevel === 3 &&
risk.id !== 'country' && (
<RiskElement
key={risk.id}
Expand Down
1 change: 1 addition & 0 deletions src/client/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"durationRiskLevel": "Risk level of the project duration",
"funderRiskLevel": "Risk level of the project funder",
"fundingRiskLevel": "Risk level of the external funding",
"dualUseRiskLevel": "Risk level of the dual use",
"totalRiskLevel": "**Total risk level of the project**",
"noRisk": "No identifiable risk",
"sanctionsRisk": "*Read more information about the sanctions at [sanctionsmap.eu](https://sanctionsmap.eu/#/main)*"
Expand Down
1 change: 1 addition & 0 deletions src/client/locales/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"durationRiskLevel": "Yhteistyön keston riskitaso",
"funderRiskLevel": "Projektin rahoittajan riskitaso",
"fundingRiskLevel": "Ulkopuolisen rahoituksen riskitaso",
"dualUseRiskLevel": "Kaksikäyttötuotteiden riskitaso",
"totalRiskLevel": "**Yhteistyön kokonaisriskitaso**",
"noRisk": "Ei erityistä riskiä",
"sanctionsRisk": "*Lue lisää maahan kohdistuvista pakotteista [sanctionsmap.eu](https://sanctionsmap.eu/#/main)-sivulta*"
Expand Down
1 change: 1 addition & 0 deletions src/client/locales/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"durationRiskLevel": "Risk level of the project duration",
"funderRiskLevel": "Risk level of the project funder",
"fundingRiskLevel": "Risk level of the external funding",
"dualUseRiskLevel": "Risk level of the dual use",
"totalRiskLevel": "**Total risk level of the project**",
"noRisk": "No identifiable risk",
"sanctionsRisk": "*Read more information about the sanctions at [sanctionsmap.eu](https://sanctionsmap.eu/#/main)*"
Expand Down

0 comments on commit afae07b

Please sign in to comment.