From 1d06159cbd4ca4c0b76db6c0f0e7ec8bc2f5e3b8 Mon Sep 17 00:00:00 2001 From: Daniel Klein Date: Wed, 25 Sep 2024 20:36:39 +0200 Subject: [PATCH] fix(rating): compliance condition placement --- composables/useData.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/composables/useData.ts b/composables/useData.ts index 8b4344b..afe20af 100644 --- a/composables/useData.ts +++ b/composables/useData.ts @@ -254,9 +254,6 @@ export const useData = defineStore('data', () => { value = field if (value !== undefined) isValid = value === ref.condition.equals - if (ref.field === 'compliance') { - negative = value - } } if (ref.condition.exists !== undefined) { @@ -264,6 +261,10 @@ export const useData = defineStore('data', () => { if (value !== undefined) isValid = !!value } + if (ref.field === 'compliance') { + negative = value + } + rankPoints += isValid ? ref.points : 0 maxPoints += ref.points return {