Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update +page.svelte #93

Merged
merged 2 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions backend/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,11 +776,11 @@ def quality_check(self) -> dict:
"object": _object,
}
)
if not self.authors:
if not self.authors.all():
info_lst.append(
{
"msg": _(
"{}: No author assigned to this risk risk assessment"
"{}: No author assigned to this risk assessment"
).format(str(self)),
"obj_type": "risk_assessment",
"object": _object,
Expand Down Expand Up @@ -1314,6 +1314,17 @@ def quality_check(self) -> dict:
"object": _object,
}
)

if not self.authors.all():
info_lst.append(
{
"msg": _(
"{}: No author assigned to this compliance assessment"
).format(str(self)),
"obj_type": "complianceassessment",
"object": _object,
}
)
# ---

# --- check on requirement assessments:
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/routes/(app)/x-rays/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@
<div class="space-y-2">
<div class="variant-soft-secondary rounded-token px-2 py-1">
<i class="fa-solid fa-circle-info mr-1" />
{#if quality_check.infos.length === 1}
<span class="font-bold">{quality_check.infos.length}</span>
{#if quality_check.info.length === 1}
<span class="font-bold">{quality_check.info.length}</span>
{m.infosFound({ s: ''})}
{:else}
<span class="font-bold">{quality_check.infos.length}</span>
<span class="font-bold">{quality_check.info.length}</span>
{m.infosFound({ s: 's'})}
{/if}
</div>
Expand Down Expand Up @@ -202,11 +202,11 @@
<div class="space-y-2">
<div class="variant-soft-secondary rounded-token px-2 py-1">
<i class="fa-solid fa-circle-info mr-1" />
{#if quality_check.infos.length === 1}
<span class="font-bold">{quality_check.infos.length}</span>
{#if quality_check.info.length === 1}
<span class="font-bold">{quality_check.info.length}</span>
{m.infosFound({ s: ''})}
{:else}
<span class="font-bold">{quality_check.infos.length}</span>
<span class="font-bold">{quality_check.info.length}</span>
{m.infosFound({ s: 's'})}
{/if}
</div>
Expand Down
Loading