Skip to content

Commit

Permalink
Use Anchor component on risk assessment detail
Browse files Browse the repository at this point in the history
  • Loading branch information
nas-tabchiche committed Dec 21, 2024
1 parent 3fe07c0 commit dc8e352
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import { safeTranslate } from '$lib/utils/i18n.js';
import * as m from '$paraglide/messages';
import { languageTag } from '$paraglide/runtime';
import Anchor from '$lib/components/Anchor/Anchor.svelte';
export let data;
const showRisks = true;
Expand Down Expand Up @@ -189,21 +190,21 @@
<div class="container w-2/3">
<div class="text-sm">
<span class="font-semibold" data-testid="risk-matrix-field-title">{m.riskMatrix()}:</span>
<a
<Anchor
href="/risk-matrices/{risk_assessment.risk_matrix.id}"
class="anchor"
data-testid="risk-matrix-field-value">{risk_assessment.risk_matrix.name}</a
data-testid="risk-matrix-field-value">{risk_assessment.risk_matrix.name}</Anchor
>
</div>
<br />
{#if risk_assessment.ebios_rm_study}
<div class="text-sm">
<span class="font-semibold" data-testid="ebios-rm-field-title">{m.ebiosRmStudy()}:</span
>
<a
<Anchor
href="/ebios-rm/{risk_assessment.ebios_rm_study.id}"
class="anchor"
data-testid="ebios-rm-field-value">{risk_assessment.ebios_rm_study.name}</a
data-testid="ebios-rm-field-value">{risk_assessment.ebios_rm_study.name}</Anchor
>
</div>
<br />
Expand Down Expand Up @@ -247,20 +248,22 @@
>
</div>
{#if canEditObject}
<a
<Anchor
href="/risk-assessments/{risk_assessment.id}/edit?next=/risk-assessments/{risk_assessment.id}"
label={m.edit()}
class="btn variant-filled-primary"
data-testid="edit-button"
>
<i class="fa-solid fa-edit mr-2" />
{m.edit()}</a
{m.edit()}</Anchor
>
{/if}
</div>
<a
<Anchor
label={m.remediationPlan()}
href="/risk-assessments/{risk_assessment.id}/remediation-plan"
class="btn variant-filled-primary"
><i class="fa-solid fa-heart-pulse mr-2" />{m.remediationPlan()}</a
><i class="fa-solid fa-heart-pulse mr-2" />{m.remediationPlan()}</Anchor
>
<span class="pt-4 font-light text-sm">Power-ups:</span>
<button
Expand Down

0 comments on commit dc8e352

Please sign in to comment.