@webitel/ui-sdk 26.2.114 → 26.2.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-sdk",
|
|
3
|
-
"version": "26.2.
|
|
3
|
+
"version": "26.2.115",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"make-all": "npm version patch --git-tag-version false && npm run build && (npm run build:types || true) && (npm run biome:format:all || true) && npm run publish-lib",
|
|
@@ -31,6 +31,7 @@ import type {
|
|
|
31
31
|
EngineQuestion,
|
|
32
32
|
EngineQuestionAnswer,
|
|
33
33
|
} from '@webitel/api-services/gen/models';
|
|
34
|
+
import { EngineAuditQuestionType } from '@webitel/api-services/gen/models';
|
|
34
35
|
import { computed, inject, onMounted, ref } from 'vue';
|
|
35
36
|
|
|
36
37
|
import vClickaway from '../../../directives/clickaway/clickaway.js';
|
|
@@ -81,6 +82,14 @@ const v$ = useVuelidate(
|
|
|
81
82
|
// if not required, no need to validate
|
|
82
83
|
if (!questionModel.value.required) return true;
|
|
83
84
|
|
|
85
|
+
// For yes-type required questions, only "yes" (score === 1) is valid
|
|
86
|
+
if (
|
|
87
|
+
questionModel.value.type === EngineAuditQuestionType.QuestionYes
|
|
88
|
+
) {
|
|
89
|
+
return !!(value && value.score === 1);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// For other types, having a score is sufficient
|
|
84
93
|
if (value && value?.score != null) {
|
|
85
94
|
return true;
|
|
86
95
|
}
|