@webitel/ui-sdk 25.6.7 → 25.6.9
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/CHANGELOG.md +20 -0
- package/dist/types/modules/AuditForm/components/form/form-footer/audit-form-footer.vue.d.ts +1 -0
- package/dist/types/modules/AuditForm/components/form-questions/score/audit-form-question-score.vue.d.ts +33 -10
- package/package.json +3 -3
- package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +3 -4
- package/src/modules/AuditForm/components/audit-form.vue +15 -2
- package/src/modules/AuditForm/components/form/form-footer/audit-form-footer.vue +3 -2
- package/src/modules/AuditForm/components/form-questions/score/audit-form-question-score.vue +17 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [v25.6.8] - 2025-05-12
|
|
2
|
+
### :bug: Bug Fixes
|
|
3
|
+
- [`7872386`](https://github.com/webitel/webitel-ui-sdk/commit/78723867f12069376e0c6232c7b59e727359ef23) - small audit fixes [WTEL-6873](https://webitel.atlassian.net/browse/WTEL-6873)[WTEL-6875](https://webitel.atlassian.net/browse/WTEL-6875)[WTEL-6876](https://webitel.atlassian.net/browse/WTEL-6876)[WTEL-6879](https://webitel.atlassian.net/browse/WTEL-6879)[WTEL-6880](https://webitel.atlassian.net/browse/WTEL-6880) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## [v25.6.7] - 2025-05-08
|
|
7
|
+
### :sparkles: New Features
|
|
8
|
+
- [`cf7f6a7`](https://github.com/webitel/webitel-ui-sdk/commit/cf7f6a7b15d03779422f0b07ca4a5cc3a6f1acbd) - enhance audit-form components with improved styling and layout [WTEL-5679](https://webitel.atlassian.net/browse/WTEL-5679) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
|
|
9
|
+
- [`4adcd22`](https://github.com/webitel/webitel-ui-sdk/commit/4adcd2287c9cafb043350107b7fb8b9981b15abc) - small audit form result ui improvements and fixes [WTEL-5679](https://webitel.atlassian.net/browse/WTEL-5679) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
|
|
10
|
+
- [`5cf68bf`](https://github.com/webitel/webitel-ui-sdk/commit/5cf68bff9e9601955ad55430de5bdcdf48bde59d) - implemented audit form crud, still needs refactors and minor fixes [WTEL-5679](https://webitel.atlassian.net/browse/WTEL-5679) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
|
|
11
|
+
- [`8dca647`](https://github.com/webitel/webitel-ui-sdk/commit/8dca647d49a8124f837502d1423483c06b45e24d) - audit form editing in progress [WTEL-5679](https://webitel.atlassian.net/browse/WTEL-5679) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
|
|
12
|
+
|
|
13
|
+
### :recycle: Refactors
|
|
14
|
+
- [`d739383`](https://github.com/webitel/webitel-ui-sdk/commit/d739383afbfd47ec5bfeb2431ae97393921ae758) - refactors and fixes to use audit-form in auditor app [WTEL-5679](https://webitel.atlassian.net/browse/WTEL-5679) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
|
|
15
|
+
- [`0723bf0`](https://github.com/webitel/webitel-ui-sdk/commit/0723bf0229d6981a3f272261a6b7fd178481d758) - audit-related values added WtObject and ScopeClass enums [WTEL-5679](https://webitel.atlassian.net/browse/WTEL-5679) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
|
|
16
|
+
- [`4fc05fe`](https://github.com/webitel/webitel-ui-sdk/commit/4fc05feff5253e44eb57b4d7a5e8bcab98a0bc49) - audit form refactors [WTEL-5679](https://webitel.atlassian.net/browse/WTEL-5679) *(commit by [@dlohvinov](https://github.com/dlohvinov))*
|
|
17
|
+
|
|
18
|
+
|
|
1
19
|
## [v25.6.6] - 2025-05-07
|
|
2
20
|
### :bug: Bug Fixes
|
|
3
21
|
- [`0c370cd`](https://github.com/webitel/webitel-ui-sdk/commit/0c370cdfe2543d6fc41c38650bbd4455b263b942) - fixed search for get sys type records list [WTEL-6851](https://webitel.atlassian.net/browse/WTEL-6851) *(commit by [@plnnsimon](https://github.com/plnnsimon))*
|
|
@@ -2092,3 +2110,5 @@
|
|
|
2092
2110
|
[v25.6.4]: https://github.com/webitel/webitel-ui-sdk/compare/v25.6.3...v25.6.4
|
|
2093
2111
|
[v25.6.5]: https://github.com/webitel/webitel-ui-sdk/compare/v25.6.4...v25.6.5
|
|
2094
2112
|
[v25.6.6]: https://github.com/webitel/webitel-ui-sdk/compare/v25.6.5...v25.6.6
|
|
2113
|
+
[v25.6.7]: https://github.com/webitel/webitel-ui-sdk/compare/v25.6.6...v25.6.7
|
|
2114
|
+
[v25.6.8]: https://github.com/webitel/webitel-ui-sdk/compare/v25.6.7...v25.6.8
|
|
@@ -1,12 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { EngineQuestionAnswer } from 'webitel-sdk';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
question: {
|
|
4
|
+
type: ObjectConstructor;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
mode: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
answer: {
|
|
12
|
+
type: import("vue").PropType<EngineQuestionAnswer>;
|
|
13
|
+
};
|
|
14
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
"change:question": (...args: any[]) => void;
|
|
16
|
+
"update:answer": (value: EngineQuestionAnswer) => void;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
question: {
|
|
19
|
+
type: ObjectConstructor;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
mode: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
answer: {
|
|
27
|
+
type: import("vue").PropType<EngineQuestionAnswer>;
|
|
28
|
+
};
|
|
29
|
+
}>> & Readonly<{
|
|
30
|
+
"onUpdate:answer"?: (value: EngineQuestionAnswer) => any;
|
|
31
|
+
"onChange:question"?: (...args: any[]) => any;
|
|
32
|
+
}>, {
|
|
3
33
|
mode: string;
|
|
4
|
-
|
|
5
|
-
result?: Record<string, any>;
|
|
6
|
-
$props: {
|
|
7
|
-
readonly mode?: string;
|
|
8
|
-
readonly question?: Record<string, any>;
|
|
9
|
-
readonly result?: Record<string, any>;
|
|
10
|
-
};
|
|
11
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
35
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-sdk",
|
|
3
|
-
"version": "25.6.
|
|
3
|
+
"version": "25.6.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "npm run docs:dev",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"orval": "orval",
|
|
17
17
|
"utils:link": "npm link",
|
|
18
18
|
"utils:update-node": "nvm install --lts && nvm alias default node",
|
|
19
|
-
"utils:i": "npm install"
|
|
19
|
+
"utils:i": "npm install --install-links"
|
|
20
20
|
},
|
|
21
21
|
"main": "./dist/ui-sdk.js",
|
|
22
22
|
"type": "module",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"vue-multiselect": "^3.1.0",
|
|
109
109
|
"vue-observe-visibility": "^2.0.0-alpha.1",
|
|
110
110
|
"vue-router": "^4.5.0",
|
|
111
|
-
"webitel-sdk": "^25.
|
|
111
|
+
"webitel-sdk": "^25.4.3",
|
|
112
112
|
"xlsx": "0.18.5",
|
|
113
113
|
"zod": "^3.24.2"
|
|
114
114
|
},
|
|
@@ -28,9 +28,7 @@
|
|
|
28
28
|
:is="QuestionTypeComponent"
|
|
29
29
|
v-model:answer="answerModel"
|
|
30
30
|
:question="question"
|
|
31
|
-
:result="answerModel /* compat, should use 'answer' */"
|
|
32
31
|
mode="read"
|
|
33
|
-
@change:result="updateAnswer /* compat, should use 'answer' */"
|
|
34
32
|
/>
|
|
35
33
|
<div
|
|
36
34
|
v-show="isAnswer"
|
|
@@ -41,8 +39,9 @@
|
|
|
41
39
|
</div>
|
|
42
40
|
<wt-input
|
|
43
41
|
v-if="answerModel?.createdAt"
|
|
44
|
-
|
|
42
|
+
:model-value="answerModel.comment"
|
|
45
43
|
:label="t('reusable.comment')"
|
|
44
|
+
@update:model-value="updateAnswer({ comment: $event })"
|
|
46
45
|
/>
|
|
47
46
|
</section>
|
|
48
47
|
|
|
@@ -96,7 +95,7 @@ const updateAnswer = (value: EngineQuestionAnswer) => {
|
|
|
96
95
|
if (readonly.value) return; // if ... then in preview mode
|
|
97
96
|
|
|
98
97
|
// coz only some properties of answer may be patched
|
|
99
|
-
const newAnswer =
|
|
98
|
+
const newAnswer = { ...answerModel.value, value };
|
|
100
99
|
answerModel.value = newAnswer;
|
|
101
100
|
};
|
|
102
101
|
|
|
@@ -20,13 +20,16 @@
|
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
22
|
<wt-textarea
|
|
23
|
-
v-
|
|
23
|
+
v-if="mode === AuditFormMode.Fill"
|
|
24
|
+
:value="resultCommentModel"
|
|
24
25
|
class="call-evaluation-form__comment"
|
|
25
26
|
:label="$t('reusable.comment')"
|
|
27
|
+
@input="handleResultCommentUpdate"
|
|
26
28
|
/>
|
|
27
29
|
|
|
28
30
|
<audit-form-footer
|
|
29
31
|
:invalid="isInvalidForm"
|
|
32
|
+
:disabled-save="!isAnswersTouched"
|
|
30
33
|
@fill:save="saveEvaluation"
|
|
31
34
|
@fill:cancel="cancelEvaluation"
|
|
32
35
|
@create:add="addQuestion"
|
|
@@ -43,6 +46,7 @@ import {
|
|
|
43
46
|
onMounted,
|
|
44
47
|
provide,
|
|
45
48
|
reactive,
|
|
49
|
+
ref,
|
|
46
50
|
useTemplateRef,
|
|
47
51
|
watch,
|
|
48
52
|
} from 'vue';
|
|
@@ -89,6 +93,8 @@ const v$ = useVuelidate();
|
|
|
89
93
|
const auditQuestions = useTemplateRef('auditQuestions');
|
|
90
94
|
const isQuestionAdded = reactive({ value: false, index: null });
|
|
91
95
|
|
|
96
|
+
const isAnswersTouched = ref(false);
|
|
97
|
+
|
|
92
98
|
provide('readonly', props.readonly);
|
|
93
99
|
provide('mode', props.mode);
|
|
94
100
|
|
|
@@ -101,7 +107,7 @@ async function addQuestion({ index, question } = {}) {
|
|
|
101
107
|
else questions.push(newQuestion);
|
|
102
108
|
isQuestionAdded.value = true;
|
|
103
109
|
isQuestionAdded.index = index || 'last';
|
|
104
|
-
|
|
110
|
+
emit('update:questions', questions);
|
|
105
111
|
}
|
|
106
112
|
|
|
107
113
|
function handleQuestionUpdate({ key, value }) {
|
|
@@ -134,6 +140,8 @@ function handleAnswerUpdate({ key, value }) {
|
|
|
134
140
|
const answer = [...answersModel.value];
|
|
135
141
|
answer[key] = value;
|
|
136
142
|
answersModel.value = answer;
|
|
143
|
+
|
|
144
|
+
isAnswersTouched.value = true;
|
|
137
145
|
}
|
|
138
146
|
|
|
139
147
|
function initAnswers() {
|
|
@@ -172,6 +180,11 @@ async function atQuestionAdded() {
|
|
|
172
180
|
isQuestionAdded.index = null;
|
|
173
181
|
}
|
|
174
182
|
|
|
183
|
+
function handleResultCommentUpdate(value) {
|
|
184
|
+
resultCommentModel.value = value;
|
|
185
|
+
isAnswersTouched.value = true;
|
|
186
|
+
}
|
|
187
|
+
|
|
175
188
|
const sortableWrapper = useTemplateRef('sortableWrapper');
|
|
176
189
|
|
|
177
190
|
const { reloadSortable } = useDestroyableSortable(sortableWrapper, {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
v-if="mode === 'fill'"
|
|
5
5
|
>
|
|
6
6
|
<wt-button
|
|
7
|
-
:disabled="props.invalid"
|
|
7
|
+
:disabled="props.invalid || disabledSave"
|
|
8
8
|
@click="emit('fill:save')"
|
|
9
9
|
>
|
|
10
10
|
{{ t('reusable.save') }}
|
|
@@ -40,6 +40,7 @@ const readonly = inject('readonly');
|
|
|
40
40
|
|
|
41
41
|
const props = defineProps<{
|
|
42
42
|
invalid: boolean;
|
|
43
|
+
disabledSave?: boolean;
|
|
43
44
|
}>();
|
|
44
45
|
|
|
45
46
|
const emit = defineEmits<{
|
|
@@ -60,6 +61,6 @@ const { t } = useI18n();
|
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
.audit-form-footer-create-question-action {
|
|
63
|
-
|
|
64
|
+
margin-left: auto;
|
|
64
65
|
}
|
|
65
66
|
</style>
|
|
@@ -30,35 +30,34 @@
|
|
|
30
30
|
class="audit-form-question-score-read"
|
|
31
31
|
>
|
|
32
32
|
<wt-radio
|
|
33
|
-
v-for="
|
|
34
|
-
:key="
|
|
35
|
-
:label="`${
|
|
36
|
-
:selected="
|
|
37
|
-
:value="
|
|
38
|
-
@input="
|
|
33
|
+
v-for="score of scoreRange"
|
|
34
|
+
:key="score"
|
|
35
|
+
:label="`${score}`"
|
|
36
|
+
:selected="answerModel?.score"
|
|
37
|
+
:value="score"
|
|
38
|
+
@input="updateAnswer"
|
|
39
39
|
/>
|
|
40
40
|
</div>
|
|
41
41
|
</article>
|
|
42
42
|
</template>
|
|
43
43
|
|
|
44
|
-
<script setup>
|
|
44
|
+
<script lang="ts" setup>
|
|
45
45
|
import { useVuelidate } from '@vuelidate/core';
|
|
46
46
|
import { integer, maxValue, minValue, required } from '@vuelidate/validators';
|
|
47
47
|
import { computed, onMounted, toRefs } from 'vue';
|
|
48
|
+
import { EngineQuestionAnswer } from 'webitel-sdk';
|
|
48
49
|
|
|
49
50
|
import WtInput from '../../../../../components/wt-input/wt-input.vue';
|
|
50
51
|
import WtRadio from '../../../../../components/wt-radio/wt-radio.vue';
|
|
51
|
-
import isEmpty from '../../../../../scripts/isEmpty.js';
|
|
52
52
|
import updateObject from '../../../../../scripts/updateObject.js';
|
|
53
53
|
|
|
54
|
+
const answerModel = defineModel<EngineQuestionAnswer | null>('answer');
|
|
55
|
+
|
|
54
56
|
const props = defineProps({
|
|
55
57
|
question: {
|
|
56
58
|
type: Object,
|
|
57
59
|
required: true,
|
|
58
60
|
},
|
|
59
|
-
result: {
|
|
60
|
-
type: Object,
|
|
61
|
-
},
|
|
62
61
|
mode: {
|
|
63
62
|
// options: ['read', 'write']
|
|
64
63
|
type: String,
|
|
@@ -66,7 +65,7 @@ const props = defineProps({
|
|
|
66
65
|
},
|
|
67
66
|
});
|
|
68
67
|
|
|
69
|
-
const emit = defineEmits(['change:question'
|
|
68
|
+
const emit = defineEmits(['change:question']);
|
|
70
69
|
|
|
71
70
|
// is needed for useVuelidate, because props.question/props.result isn't reactive
|
|
72
71
|
const { question } = toRefs(props);
|
|
@@ -103,7 +102,12 @@ const scoreRange = computed(() => {
|
|
|
103
102
|
return result;
|
|
104
103
|
});
|
|
105
104
|
|
|
106
|
-
|
|
105
|
+
function updateAnswer(score) {
|
|
106
|
+
answerModel.value = answerModel.value ? {
|
|
107
|
+
...answerModel.value,
|
|
108
|
+
score,
|
|
109
|
+
} : { score };
|
|
110
|
+
}
|
|
107
111
|
|
|
108
112
|
function updateQuestion({ path, value }) {
|
|
109
113
|
emit('change:question', updateObject({ obj: props.question, path, value }));
|