From a887f24a82c99531307e85fa9047142671d7d395 Mon Sep 17 00:00:00 2001 From: Abderrahmane Smimite Date: Tue, 17 Dec 2024 21:32:51 +0100 Subject: [PATCH] Temporary fix to get all the ids displayed --- .../[id=uuid]/table-mode/+page.svelte | 444 +++++++++--------- 1 file changed, 219 insertions(+), 225 deletions(-) diff --git a/frontend/src/routes/(app)/(third-party)/compliance-assessments/[id=uuid]/table-mode/+page.svelte b/frontend/src/routes/(app)/(third-party)/compliance-assessments/[id=uuid]/table-mode/+page.svelte index 9b72758ac..a83bc875f 100644 --- a/frontend/src/routes/(app)/(third-party)/compliance-assessments/[id=uuid]/table-mode/+page.svelte +++ b/frontend/src/routes/(app)/(third-party)/compliance-assessments/[id=uuid]/table-mode/+page.svelte @@ -182,249 +182,243 @@ {#each data.requirement_assessments as requirementAssessment}
- {#if !requirementAssessment.assessable} - -
- - {title(requirementAssessment)} -
- {:else} -
+
+ + {title(requirementAssessment)} - {#if requirementAssessment.description} -
- {requirementAssessment.description} -
- {/if} - {#if requirementAssessment.assessable} -
- {#if !questionnaireMode} -
-
-

{m.status()}

- - {#each status_options as option} - { - const newStatus = - requirementAssessment.status === option.id ? 'to_do' : option.id; - requirementAssessment.status = newStatus; - update(requirementAssessment, 'status', newStatus); - }}>{option.label} - {/each} - -
-
-

- {m.result()} -

- - {#each result_options as option} - { - const newResult = - requirementAssessment.result === option.id - ? 'not_assessed' - : option.id; - requirementAssessment.result = newResult; - update(requirementAssessment, 'result', newResult); // Update result for both select and deselect - }} - >{option.label} - - {/each} - -
+ +
+
+ {#if requirementAssessment.description} +
+ {requirementAssessment.description} +
+ {/if} + {#if requirementAssessment.assessable} + + {#if !questionnaireMode} +
+
+

{m.status()}

+ + {#each status_options as option} + { + const newStatus = + requirementAssessment.status === option.id ? 'to_do' : option.id; + requirementAssessment.status = newStatus; + update(requirementAssessment, 'status', newStatus); + }}>{option.label} + {/each} + +
+
+

+ {m.result()} +

+ + {#each result_options as option} + { + const newResult = + requirementAssessment.result === option.id ? 'not_assessed' : option.id; + requirementAssessment.result = newResult; + update(requirementAssessment, 'result', newResult); // Update result for both select and deselect + }} + >{option.label} + + {/each} +
- {/if} - {#if requirementAssessment.answer != null && Object.keys(requirementAssessment.answer).length !== 0} -
- {#each requirementAssessment.answer.questions as question} -
  • -

    {question.text}

    +
  • + {/if} + {#if requirementAssessment.answer != null && Object.keys(requirementAssessment.answer).length !== 0} +
    + {#each requirementAssessment.answer.questions as question} +
  • +

    {question.text}

    + {#if shallow} + {#if question.answer} +

    {question.answer}

    + {:else} +

    {m.noAnswer()}

    + {/if} + {:else if question.type === 'unique_choice'} + + {#each question.options as option} + { + const newAnswer = question.answer === option ? null : option; + question.answer = newAnswer; + update(requirementAssessment, 'answer', newAnswer, question); + }} + >{option} + + {/each} + + {:else if question.type === 'date'} + + update(requirementAssessment, 'answer', question.answer, question)} + {...$$restProps} + /> + {:else} +