diff --git a/frontend/src/routes/(app)/requirement-assessments/[id=uuid]/+page.svelte b/frontend/src/routes/(app)/requirement-assessments/[id=uuid]/+page.svelte index 281abad9e0..64604e2cf0 100644 --- a/frontend/src/routes/(app)/requirement-assessments/[id=uuid]/+page.svelte +++ b/frontend/src/routes/(app)/requirement-assessments/[id=uuid]/+page.svelte @@ -5,6 +5,10 @@ export let data: PageData; const threats = data.requirement.threats; const reference_controls = data.requirement.reference_controls; + const annotation = data.requirement.annotation; + + const has_threats = threats && threats.length > 0; + const has_reference_controls = reference_controls && reference_controls.length > 0; import { page } from '$app/stores'; import AutocompleteSelect from '$lib/components/Forms/AutocompleteSelect.svelte'; @@ -155,54 +159,65 @@ 👉 {data.requirement.description}

{/if} - {#if (threats && threats.length > 0) || (reference_controls && reference_controls.length > 0)} -
-
-

- - {m.suggestedReferenceControls()} -

- {#if reference_controls.length === 0} -

--

- {:else} -
    - {#each reference_controls as func} -
  • - {#if func.id} - - {func.str} - - {:else} -

    {func.str}

    - {/if} -
  • - {/each} -
- {/if} -
-
-

- - {m.threatsCovered()} -

- {#if threats.length === 0} -

--

- {:else} -
    - {#each threats as threat} -
  • - {#if threat.id} - - {threat.str} - - {:else} -

    {threat.str}

    - {/if} -
  • - {/each} -
- {/if} -
+ {#if has_threats || has_reference_controls || annotation} +
+ {#if has_threats || has_reference_controls} +
+
+ {#if reference_controls.length > 0} +

+ + {m.suggestedReferenceControls()} +

+
    + {#each reference_controls as func} +
  • + {#if func.id} + + {func.str} + + {:else} +

    {func.str}

    + {/if} +
  • + {/each} +
+ {/if} +
+
+ {#if threats.length > 0} +

+ + {m.threatsCovered()} +

+
    + {#each threats as threat} +
  • + {#if threat.id} + + {threat.str} + + {:else} +

    {threat.str}

    + {/if} +
  • + {/each} +
+ {/if} +
+
+ {/if} + {#if annotation} +
+

+ + {m.annotation()} +

+

+ {annotation} +

+
+ {/if}
{/if}