Skip to content

Commit

Permalink
Add a tag for accepted risks (#1229)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene authored Dec 23, 2024
2 parents a9e6cba + 0d6672c commit 4ba2b60
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions frontend/src/lib/components/ModelTable/ModelTable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,15 @@
{formatDateOrDateTime(value, languageTag())}
{:else if [true, false].includes(value)}
<span class="ml-4">{safeTranslate(value ?? '-')}</span>
{:else if URLModel == 'risk-acceptances' && key === 'name' && row.meta?.accepted_at && row.meta?.revoked_at == null}
<div class="flex items-center space-x-2">
<span>{safeTranslate(value ?? '-')}</span>
<span
class="bg-green-100 text-green-800 text-xs font-semibold mr-2 px-2.5 py-0.5 rounded dark:bg-green-200 dark:text-green-900"
>
{m.accept()}
</span>
</div>
{:else}
{safeTranslate(value ?? '-')}
{/if}
Expand Down

0 comments on commit 4ba2b60

Please sign in to comment.