@webitel/ui-sdk 3.1.78 → 3.1.80
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/dist/ui-sdk.common.js +10 -10
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +13 -13
- package/dist/ui-sdk.umd.js.map +1 -1
- package/dist/ui-sdk.umd.min.js +1 -1
- package/dist/ui-sdk.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/organisms/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +6 -6
- package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +1 -1
- package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +4 -1
- package/src/modules/AuditForm/components/audit-form-question.vue +4 -1
- package/src/modules/AuditForm/components/audit-form.vue +1 -1
- package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +4 -1
package/package.json
CHANGED
|
@@ -93,7 +93,7 @@ $filter-gap: 10px; // var(--spacing-xs)
|
|
|
93
93
|
& {
|
|
94
94
|
grid-template-columns: repeat(5, 1fr);
|
|
95
95
|
|
|
96
|
-
> *:nth-child(n+6) {
|
|
96
|
+
:deep(> *:nth-child(n+6)) {
|
|
97
97
|
display: none;
|
|
98
98
|
}
|
|
99
99
|
}
|
|
@@ -103,7 +103,7 @@ $filter-gap: 10px; // var(--spacing-xs)
|
|
|
103
103
|
& {
|
|
104
104
|
grid-template-columns: repeat(4, 1fr);
|
|
105
105
|
|
|
106
|
-
> *:nth-child(n+5) {
|
|
106
|
+
:deep(> *:nth-child(n+5)) {
|
|
107
107
|
display: none;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
@@ -113,7 +113,7 @@ $filter-gap: 10px; // var(--spacing-xs)
|
|
|
113
113
|
& {
|
|
114
114
|
grid-template-columns: repeat(3, 1fr);
|
|
115
115
|
|
|
116
|
-
> *:nth-child(n+4) {
|
|
116
|
+
:deep(> *:nth-child(n+4)) {
|
|
117
117
|
display: none;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
@@ -123,7 +123,7 @@ $filter-gap: 10px; // var(--spacing-xs)
|
|
|
123
123
|
& {
|
|
124
124
|
grid-template-columns: repeat(2, 1fr);
|
|
125
125
|
|
|
126
|
-
> *:nth-child(n+3) {
|
|
126
|
+
:deep(> *:nth-child(n+3)) {
|
|
127
127
|
display: none;
|
|
128
128
|
}
|
|
129
129
|
}
|
|
@@ -133,14 +133,14 @@ $filter-gap: 10px; // var(--spacing-xs)
|
|
|
133
133
|
& {
|
|
134
134
|
grid-template-columns: repeat(1, 1fr);
|
|
135
135
|
|
|
136
|
-
> *:nth-child(n+2) {
|
|
136
|
+
:deep(> *:nth-child(n+2)) {
|
|
137
137
|
display: none;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
.filters-panel-wrapper--opened .filters-wrap > * {
|
|
143
|
+
.filters-panel-wrapper--opened .filters-wrap :deep(> *) {
|
|
144
144
|
display: block;
|
|
145
145
|
}
|
|
146
146
|
</style>
|
|
@@ -61,6 +61,6 @@ describe('AuditForm', () => {
|
|
|
61
61
|
questions: [generateQuestionSchema(), generateQuestionSchema(), generateQuestionSchema()],
|
|
62
62
|
},
|
|
63
63
|
});
|
|
64
|
-
expect(wrapper.emitted()['update:result'][0][0]).toEqual([
|
|
64
|
+
expect(wrapper.emitted()['update:result'][0][0]).toEqual([{}, {}, {}]);
|
|
65
65
|
});
|
|
66
66
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<article
|
|
3
3
|
class="audit-form-question-read"
|
|
4
4
|
:class="{
|
|
5
|
-
'audit-form-question-read--filled':
|
|
5
|
+
'audit-form-question-read--filled': isResult && result.score != null,
|
|
6
6
|
'audit-form-question-read--readonly': readonly,
|
|
7
7
|
}"
|
|
8
8
|
@keyup.enter="emit('activate')"
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
<script setup>
|
|
38
38
|
import { computed } from 'vue';
|
|
39
39
|
import { EngineAuditQuestionType } from 'webitel-sdk';
|
|
40
|
+
import isEmpty from '../../../scripts/isEmpty';
|
|
40
41
|
import AuditFormQuestionOptions from './questions/options/audit-form-question-options.vue';
|
|
41
42
|
import AuditFormQuestionScore from './questions/score/audit-form-question-score.vue';
|
|
42
43
|
import WtIcon from '../../../components/atoms/wt-icon/wt-icon.vue';
|
|
@@ -70,6 +71,8 @@ const QuestionTypeComponent = computed(() => {
|
|
|
70
71
|
if (props.question.type === EngineAuditQuestionType.Score) return AuditFormQuestionScore;
|
|
71
72
|
return null;
|
|
72
73
|
});
|
|
74
|
+
|
|
75
|
+
const isResult = computed(() => !isEmpty(props.result));
|
|
73
76
|
</script>
|
|
74
77
|
|
|
75
78
|
<style lang="scss" scoped>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
:class="[
|
|
6
6
|
`audit-form-question--mode-${mode}`,
|
|
7
7
|
{
|
|
8
|
-
'audit-form-question--answered':
|
|
8
|
+
'audit-form-question--answered': isResult,
|
|
9
9
|
},
|
|
10
10
|
]"
|
|
11
11
|
:disable-dragging="mode === 'fill'"
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
import { useVuelidate } from '@vuelidate/core';
|
|
28
28
|
import { required } from '@vuelidate/validators';
|
|
29
29
|
import { computed, onMounted, ref, toRefs } from 'vue';
|
|
30
|
+
import isEmpty from '../../../scripts/isEmpty';
|
|
30
31
|
import vClickaway from '../../../directives/clickaway/clickaway';
|
|
31
32
|
import QuestionRead from './audit-form-question-read-wrapper.vue';
|
|
32
33
|
import QuestionWrite from './audit-form-question-write-wrapper.vue';
|
|
@@ -90,6 +91,8 @@ const component = computed(() => {
|
|
|
90
91
|
return QuestionRead;
|
|
91
92
|
});
|
|
92
93
|
|
|
94
|
+
const isResult = computed(() => !isEmpty(props.result));
|
|
95
|
+
|
|
93
96
|
function saveQuestion() {
|
|
94
97
|
state.value = QuestionState.SAVED;
|
|
95
98
|
}
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
:key="value"
|
|
35
35
|
:label="`${value}`"
|
|
36
36
|
:value="value"
|
|
37
|
-
:selected="
|
|
37
|
+
:selected="isResult ? result.score : null"
|
|
38
38
|
@input="emit('change:result', { score: value })"
|
|
39
39
|
></wt-radio>
|
|
40
40
|
</div>
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
import { useVuelidate } from '@vuelidate/core';
|
|
46
46
|
import { maxValue, minValue, required } from '@vuelidate/validators';
|
|
47
47
|
import { computed, onMounted, toRefs } from 'vue';
|
|
48
|
+
import isEmpty from '../../../../../scripts/isEmpty';
|
|
48
49
|
import updateObject from '../../../../../scripts/updateObject';
|
|
49
50
|
import WtRadio from '../../../../../components/molecules/wt-radio/wt-radio.vue';
|
|
50
51
|
import WtInput from '../../../../../components/molecules/wt-input/wt-input.vue';
|
|
@@ -103,6 +104,8 @@ const scoreRange = computed(() => {
|
|
|
103
104
|
return result;
|
|
104
105
|
});
|
|
105
106
|
|
|
107
|
+
const isResult = computed(() => !isEmpty(props.result));
|
|
108
|
+
|
|
106
109
|
function updateQuestion({ path, value }) {
|
|
107
110
|
emit('change:question', updateObject({ obj: props.question, path, value }));
|
|
108
111
|
}
|