Skip to content

Commit

Permalink
Simplify risk assessment detail view
Browse files Browse the repository at this point in the history
  • Loading branch information
nas-tabchiche committed Nov 25, 2024
1 parent 7c75633 commit 85826c0
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import RiskScenarioItem from '$lib/components/RiskMatrix/RiskScenarioItem.svelte';
import * as m from '$paraglide/messages';
import { languageTag } from '$paraglide/runtime';
import { toCamelCase } from '$lib/utils/locales.js';
import { safeTranslate } from '$lib/utils/i18n.js';
export let data;
Expand Down Expand Up @@ -161,28 +160,28 @@
</div>
<br />
<div class="text-sm">
<ul>
<li class="pb-1">
<ul class="leading-loose">
<li>
<span class="font-semibold">{m.refId()}:</span>
{risk_assessment.ref_id ?? '--'}
</li>
<li class="pb-1">
<li>
<span class="font-semibold">{m.status()}:</span>
{risk_assessment.status === null ? '--' : safetranslate(risk_assessment.status)}
{!risk_assessment.status ? '--' : safeTranslate(risk_assessment.status)}
</li>
<li class="pb-1">
<li>
<span class="font-semibold">{m.authors()}:</span>
<ul>
{#each risk_assessment.authors as author}
<li>{author.str}</li>
{/each}
</ul>
</li>
<li class="pb-1">
<li>
<span class="font-semibold">{m.createdAt()}:</span>
{new Date(risk_assessment.created_at).toLocaleString(languageTag())}
</li>
<li class="pb-1">
<li>
<span class="font-semibold">{m.updatedAt()}:</span>
{new Date(risk_assessment.updated_at).toLocaleString(languageTag())}
</li>
Expand All @@ -204,7 +203,7 @@
>
</div>
<div class="text-sm" data-testid="description-field-value">
{risk_assessment.description ?? '-'}
{risk_assessment.description ?? '--'}
</div>
</div>
<div class="flex flex-col space-y-2 ml-4">
Expand Down

0 comments on commit 85826c0

Please sign in to comment.