Skip to content

Commit

Permalink
Merge branch 'CA-178-Add-score-notion-to-ComplianceAssessment' of git…
Browse files Browse the repository at this point in the history
…hub.com:intuitem/ciso-assistant-community into CA-178-Add-score-notion-to-ComplianceAssessment
  • Loading branch information
Mohamed-Hacene committed Apr 25, 2024
2 parents 048f004 + 0f34ec4 commit 09348cc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions frontend/src/lib/components/Forms/Score.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@
export let min_score: number = 0;
export let max_score: number = 100;
export let score_step: number = 1;
export let score_definition: string = '';
export let form: SuperForm<AnyZodObject>;
const { value, errors, constraints } = formFieldProxy(form, field);
$: scoringEnabled = $value === null ? false : true;
$: if (max_score === 100) score_step = 5;
const status = formFieldProxy(form, 'status')['value'];
$: isApplicable = $status === 'not_applicable' ? false : true;
Expand Down Expand Up @@ -49,7 +52,7 @@
bind:value={$value}
min={min_score}
max={max_score}
step={1}
step={score_step}
ticked
>
<div class="flex justify-between items-center">
Expand Down Expand Up @@ -85,7 +88,7 @@
value={min_score}
min={min_score}
max={max_score}
step={1}
step={score_step}
ticked
>
<div class="flex justify-between items-center">
Expand Down

0 comments on commit 09348cc

Please sign in to comment.