@webitel/ui-sdk 23.12.39-vite-6 → 23.12.40
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/demo.html +1 -0
- package/dist/img/sprite/index.js +1 -147
- package/dist/ui-sdk.common.js +43304 -0
- package/dist/ui-sdk.common.js.map +1 -0
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +43303 -18
- package/dist/ui-sdk.umd.js.map +1 -0
- package/dist/ui-sdk.umd.min.js +35 -0
- package/dist/ui-sdk.umd.min.js.map +1 -0
- package/package.json +38 -20
- package/src/components/on-demand/wt-cc-agent-status-timers/wt-cc-agent-status-timers.vue +3 -3
- package/src/components/on-demand/wt-save-failed-popup/__tests__/WtPopup.spec.js +9 -0
- package/src/components/on-demand/wt-save-failed-popup/wt-save-failed-popup.vue +70 -0
- package/src/components/transitions/wt-expand-transition.vue +2 -2
- package/src/components/wt-app-header/wt-app-header.vue +2 -2
- package/src/components/wt-app-header/wt-app-navigator.vue +5 -6
- package/src/components/wt-app-header/wt-header-actions.vue +14 -30
- package/src/components/wt-avatar/wt-avatar.vue +2 -2
- package/src/components/wt-badge/wt-badge.vue +3 -3
- package/src/components/wt-button/wt-button.vue +3 -5
- package/src/components/wt-button-select/__tests__/WtButtonSelect.spec.js +4 -4
- package/src/components/wt-button-select/wt-button-select.vue +3 -3
- package/src/components/wt-checkbox/wt-checkbox.vue +7 -12
- package/src/components/wt-chip/wt-chip.vue +3 -6
- package/src/components/wt-context-menu/wt-context-menu.vue +4 -4
- package/src/components/wt-copy-action/wt-copy-action.vue +6 -6
- package/src/components/wt-datepicker/wt-datepicker.vue +12 -14
- package/src/components/wt-divider/wt-divider.vue +1 -1
- package/src/components/wt-dummy/wt-dummy.vue +2 -6
- package/src/components/wt-error-page/wt-error-page.vue +4 -10
- package/src/components/wt-expansion-panel/wt-expansion-panel.vue +4 -4
- package/src/components/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +4 -7
- package/src/components/wt-headline/wt-headline.vue +4 -4
- package/src/components/wt-headline-nav/wt-headline-nav.vue +4 -11
- package/src/components/wt-hint/wt-hint.vue +4 -4
- package/src/components/wt-icon/wt-icon.vue +5 -5
- package/src/components/wt-icon-action/_internals/wt-add-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-delete-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-download-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-edit-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-history-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-refresh-icon-action.vue +2 -2
- package/src/components/wt-icon-action/wt-icon-action.vue +1 -1
- package/src/components/wt-icon-btn/wt-icon-btn.vue +1 -1
- package/src/components/wt-indicator/wt-indicator.vue +3 -6
- package/src/components/wt-input/wt-input.vue +182 -193
- package/src/components/wt-input-info/wt-input-info.vue +2 -2
- package/src/components/wt-item-link/wt-item-link.vue +1 -1
- package/src/components/wt-label/wt-label.vue +2 -2
- package/src/components/wt-load-bar/wt-load-bar.vue +2 -5
- package/src/components/wt-loader/_internals/wt-loader--md.vue +2 -11
- package/src/components/wt-loader/_internals/wt-loader--sm.vue +2 -9
- package/src/components/wt-loader/wt-loader.vue +3 -10
- package/src/components/wt-navigation-bar/wt-navigation-bar.vue +8 -16
- package/src/components/wt-notification/wt-notification.vue +3 -3
- package/src/components/wt-notifications-bar/wt-notifications-bar.vue +5 -9
- package/src/components/wt-page-header/wt-page-header.vue +8 -7
- package/src/components/wt-page-wrapper/wt-page-wrapper.vue +5 -8
- package/src/components/wt-pagination/wt-pagination.vue +15 -17
- package/src/components/wt-player/wt-player.vue +16 -16
- package/src/components/wt-popup/wt-popup.vue +7 -13
- package/src/components/wt-progress-bar/wt-progress-bar.vue +7 -11
- package/src/components/wt-radio/wt-radio.vue +7 -15
- package/src/components/wt-rounded-action/wt-rounded-action.vue +2 -2
- package/src/components/wt-search-bar/__tests__/WtSearchBar.spec.js +1 -1
- package/src/components/wt-search-bar/wt-search-bar.vue +5 -6
- package/src/components/wt-select/_multiselect.scss +1 -0
- package/src/components/wt-select/wt-select.vue +19 -33
- package/src/components/wt-slider/wt-slider.vue +5 -5
- package/src/components/wt-status-select/wt-status-select.vue +9 -9
- package/src/components/wt-stepper/wt-stepper.vue +6 -8
- package/src/components/wt-switcher/wt-switcher.vue +7 -12
- package/src/components/wt-table/wt-table.vue +72 -110
- package/src/components/wt-table-actions/wt-table-actions.vue +14 -14
- package/src/components/wt-table-column-select/wt-table-column-select.vue +26 -28
- package/src/components/wt-tabs/wt-tabs.vue +7 -7
- package/src/components/wt-tags-input/wt-tags-input.vue +15 -23
- package/src/components/wt-textarea/wt-textarea.vue +10 -15
- package/src/components/wt-time-input/wt-time-input.vue +4 -7
- package/src/components/wt-timepicker/wt-timepicker.vue +15 -19
- package/src/components/wt-tooltip/_internals/wt-tooltip-floating.vue +2 -2
- package/src/components/wt-tooltip/wt-tooltip.vue +4 -4
- package/src/composables/useCachedInterval/__tests__/useCachedInterval.spec.js +5 -5
- package/src/css/styleguide/colors/_colors.scss +8 -9
- package/src/locale/en/en.js +5 -0
- package/src/locale/i18n.js +1 -1
- package/src/locale/kz/kz.js +5 -0
- package/src/locale/ru/ru.js +5 -0
- package/src/locale/ua/ua.js +5 -0
- package/src/mixins/validationMixin/useValidation.js +2 -2
- package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +4 -4
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +9 -11
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue +5 -6
- package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +3 -3
- package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +1 -1
- package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +6 -10
- package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +8 -8
- package/src/modules/AuditForm/components/audit-form-question.vue +8 -8
- package/src/modules/AuditForm/components/audit-form.vue +5 -6
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +4 -4
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +4 -7
- package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +3 -3
- package/src/modules/CSVExport/__tests__/CSVExport.spec.js +2 -2
- package/src/modules/DeleteConfirmationPopup/__tests__/delete-confirmation-popup.spec.js +6 -6
- package/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue +6 -13
- package/src/modules/FilesExport/__tests__/FilesExport.spec.js +3 -3
- package/src/modules/Filters/components/filter-pagination.vue +1 -1
- package/src/modules/Filters/components/filter-table-fields.vue +1 -1
- package/src/modules/Notifications/store/__tests__/NotificationsStoreModule.actions.spec.js +3 -3
- package/src/modules/QueryFilters/classes/__tests__/ApiFilterSchema.spec.js +1 -1
- package/src/modules/QueryFilters/components/__tests__/abstract-api-filter.spec.js +4 -4
- package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +2 -2
- package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +4 -4
- package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +2 -2
- package/src/modules/QueryFilters/components/abstract-api-filter.vue +2 -2
- package/src/modules/QueryFilters/components/abstract-enum-filter.vue +2 -2
- package/src/modules/QueryFilters/components/filter-datetime.vue +2 -2
- package/src/modules/QueryFilters/components/filter-from-to.vue +10 -12
- package/src/modules/QueryFilters/components/filter-search.vue +2 -2
- package/src/modules/QueryFilters/components/filter-table-fields.vue +7 -7
- package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +1 -1
- package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +2 -2
- package/src/modules/QueryFilters/mixins/__tests__/paginationFilterMixin.spec.js +2 -2
- package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +1 -1
- package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +2 -2
- package/src/modules/Userinfo/components/__tests__/auth.spec.js +4 -4
- package/src/modules/Userinfo/components/the-auth.vue +4 -7
- package/src/scripts/saveAsJSON.js +7 -0
- package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +6 -6
- package/dist/favicon.ico +0 -0
- package/dist/plyr.svg +0 -70
- package/dist/ui-sdk.mjs +0 -22678
- package/src/components/wt-input/Readme.md +0 -96
- package/src/css/styleguide/colors/reusable/_text-field.scss +0 -20
- package/src/locale/.DS_Store +0 -0
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
}"
|
|
9
9
|
>
|
|
10
10
|
<wt-label
|
|
11
|
-
v-if="hasLabel"
|
|
12
11
|
v-bind="labelProps"
|
|
12
|
+
v-if="hasLabel"
|
|
13
13
|
:for="name"
|
|
14
14
|
:outline="outline"
|
|
15
15
|
:disabled="disabled"
|
|
@@ -19,9 +19,7 @@
|
|
|
19
19
|
<slot
|
|
20
20
|
v-bind="{ label }"
|
|
21
21
|
name="label"
|
|
22
|
-
>
|
|
23
|
-
{{ label }}
|
|
24
|
-
</slot>
|
|
22
|
+
>{{ label }}</slot>
|
|
25
23
|
</wt-label>
|
|
26
24
|
<div class="wt-time-input__wrapper">
|
|
27
25
|
<input
|
|
@@ -38,8 +36,7 @@
|
|
|
38
36
|
<wt-input-info
|
|
39
37
|
v-if="showInfo"
|
|
40
38
|
:invalid="invalid"
|
|
41
|
-
>
|
|
42
|
-
{{ validationText }}
|
|
39
|
+
>{{ validationText }}
|
|
43
40
|
</wt-input-info>
|
|
44
41
|
</div>
|
|
45
42
|
</template>
|
|
@@ -48,7 +45,7 @@
|
|
|
48
45
|
import validationMixin from '../../mixins/validationMixin/validationMixin';
|
|
49
46
|
|
|
50
47
|
export default {
|
|
51
|
-
name: '
|
|
48
|
+
name: 'wt-time-input',
|
|
52
49
|
mixins: [validationMixin],
|
|
53
50
|
props: {
|
|
54
51
|
/**
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="wt-timepicker"
|
|
4
|
-
:class="{'wt-timepicker--invalid': invalid}"
|
|
5
|
-
>
|
|
2
|
+
<div class="wt-timepicker" :class="{'wt-timepicker--invalid': invalid}">
|
|
6
3
|
<wt-label
|
|
7
|
-
v-if="label"
|
|
8
4
|
v-bind="labelProps"
|
|
5
|
+
v-if="label"
|
|
9
6
|
:invalid="invalid"
|
|
10
7
|
>
|
|
11
8
|
{{ `${label} (${format})` }}
|
|
@@ -16,37 +13,36 @@
|
|
|
16
13
|
:value="hour"
|
|
17
14
|
:v="v"
|
|
18
15
|
:label="label ? null : $t('webitelUI.timepicker.hour') "
|
|
19
|
-
:
|
|
16
|
+
:maxValue="dateMode ? null : 23"
|
|
20
17
|
:disabled="disabled"
|
|
21
18
|
hide-input-info
|
|
22
19
|
@input="hour = $event"
|
|
23
|
-
|
|
20
|
+
></wt-time-input>
|
|
24
21
|
<wt-time-input
|
|
25
22
|
v-if="isMin"
|
|
26
23
|
:value="min"
|
|
27
24
|
:v="v"
|
|
28
25
|
:label="label ? null : $t('webitelUI.timepicker.min')"
|
|
29
|
-
:
|
|
26
|
+
:maxValue="59"
|
|
30
27
|
:disabled="disabled"
|
|
31
28
|
hide-input-info
|
|
32
29
|
@input="min = $event"
|
|
33
|
-
|
|
30
|
+
></wt-time-input>
|
|
34
31
|
<wt-time-input
|
|
35
32
|
v-if="isSec"
|
|
36
33
|
:value="sec"
|
|
37
34
|
:v="v"
|
|
38
|
-
:label="label ? null :
|
|
39
|
-
:
|
|
35
|
+
:label="label ? null : $t('webitelUI.timepicker.sec')"
|
|
36
|
+
:maxValue="59"
|
|
40
37
|
:disabled="disabled"
|
|
41
38
|
hide-input-info
|
|
42
39
|
@input="sec = $event"
|
|
43
|
-
|
|
40
|
+
></wt-time-input>
|
|
44
41
|
</div>
|
|
45
42
|
<wt-input-info
|
|
46
43
|
v-if="isValidation"
|
|
47
44
|
:invalid="invalid"
|
|
48
|
-
>
|
|
49
|
-
{{ validationText }}
|
|
45
|
+
>{{ validationText }}
|
|
50
46
|
</wt-input-info>
|
|
51
47
|
</div>
|
|
52
48
|
</template>
|
|
@@ -58,12 +54,8 @@ const SEC_IN_HOUR = 60 * 60;
|
|
|
58
54
|
const SEC_IN_MIN = 60;
|
|
59
55
|
|
|
60
56
|
export default {
|
|
61
|
-
name: '
|
|
57
|
+
name: 'wt-timepicker',
|
|
62
58
|
mixins: [validationMixin],
|
|
63
|
-
model: {
|
|
64
|
-
prop: 'value',
|
|
65
|
-
event: 'input',
|
|
66
|
-
},
|
|
67
59
|
props: {
|
|
68
60
|
value: {
|
|
69
61
|
type: [String, Number],
|
|
@@ -90,6 +82,10 @@ export default {
|
|
|
90
82
|
description: 'Object with props, passed down to wt-label as props',
|
|
91
83
|
},
|
|
92
84
|
},
|
|
85
|
+
model: {
|
|
86
|
+
prop: 'value',
|
|
87
|
+
event: 'input',
|
|
88
|
+
},
|
|
93
89
|
|
|
94
90
|
computed: {
|
|
95
91
|
isHour() {
|
|
@@ -3,27 +3,27 @@
|
|
|
3
3
|
:class="{
|
|
4
4
|
'wt-tooltip--contrast': contrast,
|
|
5
5
|
'wt-tooltip--visible': isVisible,
|
|
6
|
-
|
|
6
|
+
}"
|
|
7
7
|
class="wt-tooltip"
|
|
8
8
|
>
|
|
9
9
|
<div
|
|
10
10
|
ref="activator"
|
|
11
11
|
class="wt-tooltip__activator"
|
|
12
12
|
>
|
|
13
|
-
<slot name="activator"
|
|
13
|
+
<slot name="activator"></slot>
|
|
14
14
|
</div>
|
|
15
15
|
<wt-tooltip-floating
|
|
16
16
|
v-if="isVisible"
|
|
17
17
|
ref="floating"
|
|
18
|
-
v-clickaway="hideTooltip"
|
|
19
18
|
class="wt-tooltip__floating"
|
|
19
|
+
v-clickaway="hideTooltip"
|
|
20
20
|
:class="[popperClass]"
|
|
21
21
|
:style="floatingStyles"
|
|
22
22
|
:triggers="popperTriggers"
|
|
23
23
|
@show="showTooltip"
|
|
24
24
|
@hide="hideTooltip"
|
|
25
25
|
>
|
|
26
|
-
<slot v-bind="{ hide: hideTooltip }"
|
|
26
|
+
<slot v-bind="{ hide: hideTooltip }"></slot>
|
|
27
27
|
</wt-tooltip-floating>
|
|
28
28
|
</div>
|
|
29
29
|
</template>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useCachedInterval } from '../useCachedInterval';
|
|
2
2
|
|
|
3
3
|
describe('useCachedInterval', () => {
|
|
4
|
-
it('subscribe',
|
|
5
|
-
const callback =
|
|
4
|
+
it('subscribe', (done) => {
|
|
5
|
+
const callback = jest.fn();
|
|
6
6
|
const { subscribe } = useCachedInterval({ timeout: 10 });
|
|
7
7
|
subscribe(callback);
|
|
8
8
|
expect(callback).toHaveBeenCalledTimes(1);
|
|
9
|
-
|
|
9
|
+
setTimeout(() => {
|
|
10
10
|
expect(callback).toHaveBeenCalledTimes(2);
|
|
11
|
-
|
|
12
|
-
}, 10)
|
|
11
|
+
done();
|
|
12
|
+
}, 10);
|
|
13
13
|
});
|
|
14
14
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
@import './deprecated';
|
|
2
2
|
@import './palette';
|
|
3
|
-
@import './reusable/text-field';
|
|
4
3
|
|
|
5
4
|
:root {
|
|
6
5
|
// dp colors
|
|
@@ -85,10 +84,10 @@
|
|
|
85
84
|
--sub-accent-color: var(--indigo-darken-3);
|
|
86
85
|
|
|
87
86
|
// typography colors
|
|
88
|
-
--text-
|
|
89
|
-
--text-disabled-color: var(--grey-lighten-1);
|
|
90
|
-
--text-
|
|
91
|
-
--
|
|
87
|
+
--main-text-color: var(--grey-darken-3);
|
|
88
|
+
--main-text-disabled-color: var(--grey-lighten-1);
|
|
89
|
+
--negative-text-color: var(--error-color);
|
|
90
|
+
--link-color: var(--info-color);
|
|
92
91
|
}
|
|
93
92
|
|
|
94
93
|
:root.theme--dark {
|
|
@@ -174,8 +173,8 @@
|
|
|
174
173
|
--sub-accent-color: var(--indigo-darken-3);
|
|
175
174
|
|
|
176
175
|
// typography colors
|
|
177
|
-
--text-
|
|
178
|
-
--text-disabled-color: var(--grey-darken-1);
|
|
179
|
-
--text-
|
|
180
|
-
--
|
|
176
|
+
--main-text-color: var(--grey-lighten-3);
|
|
177
|
+
--main-text-disabled-color: var(--grey-darken-1);
|
|
178
|
+
--negative-text-color: var(--error-color);
|
|
179
|
+
--link-color: var(--info-color);
|
|
181
180
|
}
|
package/src/locale/en/en.js
CHANGED
|
@@ -359,5 +359,10 @@ export default {
|
|
|
359
359
|
message: 'The limit for agents to take a pause has been exceeded. The pause is unavailable right now.',
|
|
360
360
|
},
|
|
361
361
|
},
|
|
362
|
+
saveFailedPopup: {
|
|
363
|
+
title: 'Save failed',
|
|
364
|
+
label: 'Something went wrong, please try again',
|
|
365
|
+
exportToJson: 'Export to JSON',
|
|
366
|
+
},
|
|
362
367
|
},
|
|
363
368
|
};
|
package/src/locale/i18n.js
CHANGED
package/src/locale/kz/kz.js
CHANGED
package/src/locale/ru/ru.js
CHANGED
|
@@ -357,5 +357,10 @@ export default {
|
|
|
357
357
|
message: 'Лимит операторов в паузе превышен. Перерыв сейчас недоступен.',
|
|
358
358
|
},
|
|
359
359
|
},
|
|
360
|
+
saveFailedPopup: {
|
|
361
|
+
title: 'Ошибка сохранения',
|
|
362
|
+
label: 'Что-то пошло не так. Пожалуйста, попробуйте еще раз',
|
|
363
|
+
exportToJson: 'Экспортировать в JSON',
|
|
364
|
+
},
|
|
360
365
|
},
|
|
361
366
|
};
|
package/src/locale/ua/ua.js
CHANGED
|
@@ -357,5 +357,10 @@ export default {
|
|
|
357
357
|
message: 'Ліміт операторів в паузі перевищено. Перерва наразі недоступна.',
|
|
358
358
|
},
|
|
359
359
|
},
|
|
360
|
+
saveFailedPopup: {
|
|
361
|
+
title: 'Помилка збереження',
|
|
362
|
+
label: 'Щось пішло не так. Будь ласка, спробуйте ще раз',
|
|
363
|
+
exportToJson: 'Експортувати в JSON',
|
|
364
|
+
},
|
|
360
365
|
},
|
|
361
366
|
};
|
|
@@ -3,12 +3,12 @@ import { useI18n } from 'vue-i18n';
|
|
|
3
3
|
|
|
4
4
|
export function useValidation({ v, customValidators }) {
|
|
5
5
|
const { t } = useI18n();
|
|
6
|
-
const isValidation = computed(() => !!v
|
|
6
|
+
const isValidation = computed(() => !!v.value && !!Object.keys(v.value).length);
|
|
7
7
|
const invalid = computed(() => isValidation.value && v.value.$error);
|
|
8
8
|
|
|
9
9
|
const validationText = computed(() => {
|
|
10
10
|
let validationText = '';
|
|
11
|
-
if (isValidation
|
|
11
|
+
if (isValidation && invalid) {
|
|
12
12
|
if (v.value.required?.$invalid) validationText = t('validation.required');
|
|
13
13
|
else if (v.value.numeric?.$invalid) validationText = t('validation.numeric');
|
|
14
14
|
else if (v.value.email?.$invalid) validationText = t('validation.email');
|
package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js
CHANGED
|
@@ -6,13 +6,13 @@ import * as PauseCauseAPIFactory from '../../api/pause-cause';
|
|
|
6
6
|
import WtCcAgentStatusSelect from '../wt-cc-agent-status-select.vue';
|
|
7
7
|
|
|
8
8
|
const pauseCauses = [{ name: 'jest1' }, { name: 'jest2' }];
|
|
9
|
-
const getAgentPauseCausesMock =
|
|
9
|
+
const getAgentPauseCausesMock = jest.fn(() => ({ items: pauseCauses }));
|
|
10
10
|
// https://stackoverflow.com/a/63727813
|
|
11
|
-
|
|
11
|
+
jest.spyOn(PauseCauseAPIFactory, 'default').mockImplementation(() => ({ getList: getAgentPauseCausesMock }));
|
|
12
12
|
|
|
13
|
-
const agentStatusMock =
|
|
13
|
+
const agentStatusMock = jest.fn(() => {});
|
|
14
14
|
// https://stackoverflow.com/a/63727813
|
|
15
|
-
|
|
15
|
+
jest.spyOn(AgentStatusAPIFactory, 'default').mockImplementation(() => ({ patch: agentStatusMock }));
|
|
16
16
|
|
|
17
17
|
const agent = {
|
|
18
18
|
status: '',
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
min-width="480"
|
|
5
5
|
@close="close"
|
|
6
6
|
>
|
|
7
|
-
<template
|
|
7
|
+
<template v-slot:title>
|
|
8
8
|
{{ $t('webitelUI.agentStatusSelect.pauseCausePopup.title') }}
|
|
9
9
|
</template>
|
|
10
|
-
<template
|
|
10
|
+
<template v-slot:main>
|
|
11
11
|
<form @submit.prevent="setPause">
|
|
12
12
|
<ul>
|
|
13
13
|
<li
|
|
14
|
+
class="wt-cc-pause-cause-popup-option"
|
|
14
15
|
v-for="(option) of pauseCause"
|
|
15
16
|
:key="option.id"
|
|
16
|
-
class="wt-cc-pause-cause-popup-option"
|
|
17
17
|
>
|
|
18
18
|
<wt-radio
|
|
19
19
|
class="wt-cc-pause-cause-popup-option__radio"
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
:value="option.id"
|
|
22
22
|
:label="option.name"
|
|
23
23
|
@input="select(option)"
|
|
24
|
-
|
|
24
|
+
></wt-radio>
|
|
25
25
|
<div class="wt-cc-pause-cause-popup-option__limits-wrapper">
|
|
26
26
|
<span
|
|
27
27
|
:class="{
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
'wt-cc-pause-cause-popup-option__duration--overflow': option.isOverflow,
|
|
29
|
+
}"
|
|
30
30
|
>
|
|
31
31
|
{{ option.duration }}
|
|
32
32
|
</span>
|
|
@@ -37,18 +37,16 @@
|
|
|
37
37
|
</ul>
|
|
38
38
|
</form>
|
|
39
39
|
</template>
|
|
40
|
-
<template
|
|
40
|
+
<template v-slot:actions>
|
|
41
41
|
<wt-button
|
|
42
42
|
:disabled="!selected"
|
|
43
43
|
@click="setPause"
|
|
44
|
-
>
|
|
45
|
-
{{ $t('reusable.ok') }}
|
|
44
|
+
>{{ $t('reusable.ok') }}
|
|
46
45
|
</wt-button>
|
|
47
46
|
<wt-button
|
|
48
47
|
color="secondary"
|
|
49
48
|
@click="close"
|
|
50
|
-
>
|
|
51
|
-
{{ $t('reusable.cancel') }}
|
|
49
|
+
>{{ $t('reusable.cancel') }}
|
|
52
50
|
</wt-button>
|
|
53
51
|
</template>
|
|
54
52
|
</wt-popup>
|
package/src/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue
CHANGED
|
@@ -4,26 +4,25 @@
|
|
|
4
4
|
min-width="480"
|
|
5
5
|
@close="close"
|
|
6
6
|
>
|
|
7
|
-
<template
|
|
7
|
+
<template v-slot:header>
|
|
8
8
|
{{ $t('webitelUI.agentStatusSelect.statusSelectErrorPopup.title') }}
|
|
9
9
|
</template>
|
|
10
|
-
<template
|
|
10
|
+
<template v-slot:main>
|
|
11
11
|
<article class="wt-cc-status-select-error-popup__main-wrapper">
|
|
12
12
|
<wt-icon
|
|
13
13
|
icon="attention"
|
|
14
14
|
color="danger"
|
|
15
|
-
|
|
15
|
+
></wt-icon>
|
|
16
16
|
<p class="wt-cc-status-select-error-popup__message">
|
|
17
17
|
{{ $t('webitelUI.agentStatusSelect.statusSelectErrorPopup.message') }}
|
|
18
18
|
</p>
|
|
19
19
|
</article>
|
|
20
20
|
</template>
|
|
21
|
-
<template
|
|
21
|
+
<template v-slot:actions>
|
|
22
22
|
<wt-button
|
|
23
23
|
color="secondary"
|
|
24
24
|
@click="close"
|
|
25
|
-
>
|
|
26
|
-
{{ $t('reusable.ok') }}
|
|
25
|
+
>{{ $t('reusable.ok') }}
|
|
27
26
|
</wt-button>
|
|
28
27
|
</template>
|
|
29
28
|
</wt-popup>
|
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
:status="status"
|
|
5
5
|
:status-duration="statusDuration"
|
|
6
6
|
@change="handleStatusSelectInput"
|
|
7
|
-
|
|
7
|
+
></wt-status-select>
|
|
8
8
|
<pause-cause-popup
|
|
9
9
|
v-if="isPauseCausePopup"
|
|
10
10
|
:options="pauseCauses"
|
|
11
11
|
@change="handlePauseCauseInput"
|
|
12
12
|
@close="closePauseCausePopup"
|
|
13
|
-
|
|
13
|
+
></pause-cause-popup>
|
|
14
14
|
<status-select-error-popup
|
|
15
15
|
v-if="error"
|
|
16
16
|
:error="error"
|
|
17
17
|
@close="error = null"
|
|
18
|
-
|
|
18
|
+
></status-select-error-popup>
|
|
19
19
|
</article>
|
|
20
20
|
</template>
|
|
21
21
|
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
useDestroyableSortable,
|
|
7
7
|
} from '../../../../composables/useDestroyableSortable/useDestroyableSortable';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
jest.mock('../../../../composables/useDestroyableSortable/useDestroyableSortable');
|
|
10
10
|
|
|
11
11
|
useDestroyableSortable.mockImplementation(() => ({ reloadSortable: ref(false) }));
|
|
12
12
|
|
|
@@ -14,14 +14,12 @@
|
|
|
14
14
|
:class="{
|
|
15
15
|
'audit-form-question-read-text--required': question.required,
|
|
16
16
|
}"
|
|
17
|
-
>
|
|
18
|
-
{{ question.question }}
|
|
19
|
-
</p>
|
|
17
|
+
>{{ question.question }}</p>
|
|
20
18
|
<wt-icon
|
|
21
|
-
v-if="!disableDragging && !first"
|
|
22
19
|
class="audit-form-question-read__drag-icon"
|
|
20
|
+
v-if="!disableDragging && !first"
|
|
23
21
|
icon="move"
|
|
24
|
-
|
|
22
|
+
></wt-icon>
|
|
25
23
|
</header>
|
|
26
24
|
<section class="audit-form-question-read-content">
|
|
27
25
|
<component
|
|
@@ -30,14 +28,12 @@
|
|
|
30
28
|
:result="result"
|
|
31
29
|
mode="read"
|
|
32
30
|
@change:result="!readonly && emit('change:result', $event)"
|
|
33
|
-
|
|
31
|
+
></component>
|
|
34
32
|
<div
|
|
35
33
|
v-show="isResult"
|
|
36
34
|
class="audit-form-question--clear"
|
|
37
35
|
@click="emit('change:result', {})"
|
|
38
|
-
>
|
|
39
|
-
{{ $t('webitelUI.auditForm.clearSelection') }}
|
|
40
|
-
</div>
|
|
36
|
+
>{{ $t('webitelUI.auditForm.clearSelection') }}</div>
|
|
41
37
|
</section>
|
|
42
38
|
</article>
|
|
43
39
|
</template>
|
|
@@ -130,6 +126,6 @@ const isResult = computed(() => !isEmpty(props.result));
|
|
|
130
126
|
.audit-form-question--clear {
|
|
131
127
|
margin-top: var(--spacing-sm);;
|
|
132
128
|
cursor: pointer;
|
|
133
|
-
color: var(--
|
|
129
|
+
color: var(--link-color);
|
|
134
130
|
}
|
|
135
131
|
</style>
|
|
@@ -6,24 +6,24 @@
|
|
|
6
6
|
:label="$t('reusable.required')"
|
|
7
7
|
:disabled="first"
|
|
8
8
|
@change="updateQuestion({ path: 'required', value: $event })"
|
|
9
|
-
|
|
9
|
+
></wt-switcher>
|
|
10
10
|
<div class="audit-form-question-write-header__actions">
|
|
11
11
|
<wt-tooltip>
|
|
12
|
-
<template
|
|
12
|
+
<template v-slot:activator>
|
|
13
13
|
<wt-icon-btn
|
|
14
14
|
icon="copy"
|
|
15
15
|
@click="emit('copy')"
|
|
16
|
-
|
|
16
|
+
></wt-icon-btn>
|
|
17
17
|
</template>
|
|
18
18
|
{{ $t('reusable.copy') }}
|
|
19
19
|
</wt-tooltip>
|
|
20
20
|
<wt-tooltip>
|
|
21
|
-
<template
|
|
21
|
+
<template v-slot:activator>
|
|
22
22
|
<wt-icon-btn
|
|
23
23
|
icon="bucket"
|
|
24
24
|
:disabled="first"
|
|
25
25
|
@click="emit('delete')"
|
|
26
|
-
|
|
26
|
+
></wt-icon-btn>
|
|
27
27
|
</template>
|
|
28
28
|
{{ $t('reusable.delete') }}
|
|
29
29
|
</wt-tooltip>
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
required
|
|
39
39
|
prevent-trim
|
|
40
40
|
@input="updateQuestion({ path: 'question', value: $event })"
|
|
41
|
-
|
|
41
|
+
></wt-input>
|
|
42
42
|
<wt-select
|
|
43
43
|
:value="prettifiedQuestionType"
|
|
44
44
|
:options="QuestionType"
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
:clearable="false"
|
|
47
47
|
:label="$t('webitelUI.auditForm.answerType')"
|
|
48
48
|
@input="handleQuestionTypeChange($event.value)"
|
|
49
|
-
|
|
49
|
+
></wt-select>
|
|
50
50
|
</div>
|
|
51
51
|
<component
|
|
52
52
|
:is="QuestionTypeComponent"
|
|
53
53
|
:question="question"
|
|
54
54
|
mode="write"
|
|
55
55
|
@change:question="emit('change:question', $event)"
|
|
56
|
-
|
|
56
|
+
></component>
|
|
57
57
|
</section>
|
|
58
58
|
</article>
|
|
59
59
|
</template>
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
:is="component"
|
|
4
4
|
v-clickaway="saveQuestion"
|
|
5
5
|
:class="[
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
`audit-form-question--mode-${mode}`,
|
|
7
|
+
{
|
|
8
|
+
'audit-form-question--answered': isResult,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
'audit-form-question--sort-ignore': first && mode === 'fill'
|
|
12
|
+
}
|
|
13
13
|
]"
|
|
14
14
|
:disable-dragging="mode === 'fill'"
|
|
15
15
|
:first="first"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
@delete="emits('delete')"
|
|
24
24
|
@change:question="emits('update:question', $event)"
|
|
25
25
|
@change:result="emits('update:result', $event)"
|
|
26
|
-
|
|
26
|
+
></component>
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<script setup>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section class="audit-form">
|
|
3
3
|
<div
|
|
4
|
-
v-if="!reloadSortable"
|
|
5
|
-
ref="sortableWrapper"
|
|
6
4
|
class="audit-form__sortable-wrapper"
|
|
5
|
+
ref="sortableWrapper"
|
|
6
|
+
v-if="!reloadSortable"
|
|
7
7
|
>
|
|
8
8
|
<audit-form-question
|
|
9
9
|
v-for="(question, key) of questions"
|
|
@@ -18,15 +18,14 @@
|
|
|
18
18
|
@delete="deleteQuestion({ question, key})"
|
|
19
19
|
@update:question="handleQuestionUpdate({ key, value: $event })"
|
|
20
20
|
@update:result="handleResultUpdate({ key, value: $event })"
|
|
21
|
-
|
|
21
|
+
></audit-form-question>
|
|
22
22
|
</div>
|
|
23
23
|
<wt-button
|
|
24
|
-
v-if="mode === 'create' && !readonly"
|
|
25
24
|
class="audit-form__add-button"
|
|
25
|
+
v-if="mode === 'create' && !readonly"
|
|
26
26
|
:disabled="isInvalidForm"
|
|
27
27
|
@click="addQuestion"
|
|
28
|
-
>
|
|
29
|
-
{{ $t('webitelUI.auditForm.addQuestion') }}
|
|
28
|
+
>{{ $t('webitelUI.auditForm.addQuestion') }}
|
|
30
29
|
</wt-button>
|
|
31
30
|
</section>
|
|
32
31
|
</template>
|
package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue
CHANGED
|
@@ -6,21 +6,21 @@
|
|
|
6
6
|
:v="v$.option.name"
|
|
7
7
|
prevent-trim
|
|
8
8
|
@input="emit('update:option', { name: $event, score: option.score })"
|
|
9
|
-
|
|
9
|
+
></wt-input>
|
|
10
10
|
<wt-input
|
|
11
11
|
:label="$t('webitelUI.auditForm.score', 1)"
|
|
12
12
|
:value="option.score"
|
|
13
13
|
:v="v$.option.score"
|
|
14
14
|
type="number"
|
|
15
15
|
@input="emit('update:option', { name: option.name, score: $event })"
|
|
16
|
-
|
|
16
|
+
></wt-input>
|
|
17
17
|
<wt-tooltip class="audit-form-question-options-write-row__tooltip">
|
|
18
|
-
<template
|
|
18
|
+
<template v-slot:activator>
|
|
19
19
|
<wt-icon-btn
|
|
20
20
|
:disabled="first"
|
|
21
21
|
icon="bucket"
|
|
22
22
|
@click="emit('delete')"
|
|
23
|
-
|
|
23
|
+
></wt-icon-btn>
|
|
24
24
|
</template>
|
|
25
25
|
{{ $t('reusable.delete') }}
|
|
26
26
|
</wt-tooltip>
|
|
@@ -11,12 +11,11 @@
|
|
|
11
11
|
:first="key === 0"
|
|
12
12
|
@update:option="updateQuestion({ path: `options[${key}]`, value: $event })"
|
|
13
13
|
@delete="deleteQuestionOption({ key })"
|
|
14
|
-
|
|
14
|
+
></options-write-row>
|
|
15
15
|
<wt-button
|
|
16
16
|
class="audit-form-question-options-write__add-button"
|
|
17
17
|
@click="addQuestionOption"
|
|
18
|
-
>
|
|
19
|
-
{{ $t('reusable.add') }}
|
|
18
|
+
>{{ $t('reusable.add') }}
|
|
20
19
|
</wt-button>
|
|
21
20
|
</div>
|
|
22
21
|
<div
|
|
@@ -30,11 +29,9 @@
|
|
|
30
29
|
:selected="result"
|
|
31
30
|
:value="opt"
|
|
32
31
|
@input="emit('change:result', $event)"
|
|
33
|
-
|
|
34
|
-
</div>
|
|
35
|
-
<div v-else>
|
|
36
|
-
Unknown mode: {{ mode }}
|
|
32
|
+
></wt-radio>
|
|
37
33
|
</div>
|
|
34
|
+
<div v-else>Unknown mode: {{ mode }}</div>
|
|
38
35
|
</article>
|
|
39
36
|
</template>
|
|
40
37
|
|