diff --git a/frontend/messages/en.json b/frontend/messages/en.json index adf0b358f..5567ada59 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -356,5 +356,6 @@ "inconsistenciesFoundComposer": "Found {count} inconsistenc{plural}. For more details, check", "current": "Current", "residual": "Residual", - "jumpToRiskAssessment": "Jump to risk assessment" + "jumpToRiskAssessment": "Jump to risk assessment", + "additionalMeasures": "Additional measures" } diff --git a/frontend/src/routes/(app)/risk-assessments/[id=uuid]/plan/+page.server.ts b/frontend/src/routes/(app)/risk-assessments/[id=uuid]/plan/+page.server.ts index ac6a98ab6..fb1b469bd 100644 --- a/frontend/src/routes/(app)/risk-assessments/[id=uuid]/plan/+page.server.ts +++ b/frontend/src/routes/(app)/risk-assessments/[id=uuid]/plan/+page.server.ts @@ -1,5 +1,4 @@ import { BASE_API_URL } from '$lib/utils/constants'; -import type { UUID } from 'crypto'; import type { PageServerLoad } from './$types'; @@ -9,11 +8,12 @@ export const load = (async ({ fetch, params }) => { const res = await fetch(endpoint); const risk_assessment = await res.json(); - const folder = await fetch(`${BASE_API_URL}/folders/${risk_assessment.project.id.folder}/`).then( + const project = await fetch(`${BASE_API_URL}/projects/${risk_assessment.project.id}/`).then( + (res) => res.json() + ); + const folder = await fetch(`${BASE_API_URL}/folders/${project.folder.id}/`).then( (res) => res.json() ); - risk_assessment.folder = folder; - return { URLModel, risk_assessment }; }) satisfies PageServerLoad; diff --git a/frontend/src/routes/(app)/risk-assessments/[id=uuid]/plan/+page.svelte b/frontend/src/routes/(app)/risk-assessments/[id=uuid]/plan/+page.svelte index a09f84752..96711969b 100644 --- a/frontend/src/routes/(app)/risk-assessments/[id=uuid]/plan/+page.svelte +++ b/frontend/src/routes/(app)/risk-assessments/[id=uuid]/plan/+page.svelte @@ -1,5 +1,6 @@

- Domain: {data.risk_assessment.folder.str}{data.risk_assessment.folder.name}

/

- Project: {data.risk_assessment.project.str}

/

- Risk assessment: {data.risk_assessment.name} - {data.risk_assessment.version}

-

Associated risk scenarios:

+

{m.associatedRiskScenarios()}:

@@ -69,27 +75,27 @@ {#if scenario.existing_measures} - + - + {/if} {#if scenario.security_measures.length > 0} - + - - - - - - - - + + + + + + + + {#each scenario.security_measures as measure, index} 0)} {/if}
Existing measures: {m.existingMeasures()}:
lorem ipsum {scenario.existing_measures}
Additional measures: {m.additionalMeasures()}:
#NameDescriptionTypeSecurity functionETAEffortLinkStatus{m.name()}{m.description()}{m.type()}{m.securityFunction()}{m.eta()}{m.effort()}{m.link()}{m.status()}
- No associated measure + {m.noSecurityMeasureYet()}