@webitel/ui-sdk 24.10.3 → 24.10.5
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.css +1 -1
- package/dist/ui-sdk.js +111 -114
- package/dist/ui-sdk.umd.cjs +8 -8
- package/package.json +6 -4
- package/src/api/axios/generateInstance.js +1 -4
- package/src/api/clients/agents/agents.js +31 -78
- package/src/api/clients/buckets/buckets.js +17 -57
- package/src/api/clients/calendars/calendars.js +18 -71
- package/src/api/clients/chatGateways/chatGateways.js +23 -61
- package/src/api/clients/chatGateways/defaults/webChatGateway.js +6 -8
- package/src/api/clients/chatGateways/enums/WebchatAlternativeChannel.enum.js +3 -3
- package/src/api/clients/communications/communications.js +20 -62
- package/src/api/clients/configurations/configurations.js +18 -3
- package/src/api/clients/flows/flow.js +17 -60
- package/src/api/clients/gateways/gateways.js +20 -59
- package/src/api/clients/index.js +1 -1
- package/src/api/clients/lists/blacklists.js +18 -60
- package/src/api/clients/media/media.js +13 -43
- package/src/api/clients/queues/defaults/processing.js +10 -6
- package/src/api/clients/queues/queues.js +21 -69
- package/src/api/clients/roles/roles.js +15 -33
- package/src/api/clients/users/__tests__/users.spec.js +43 -26
- package/src/api/clients/users/users.js +21 -56
- package/src/api/crm/contactChatMessagesHistory.js +8 -23
- package/src/api/crm/contacts.js +235 -0
- package/src/api/crm/enums/ContactsSearchMode.js +9 -0
- package/src/api/crm/index.js +2 -3
- package/src/api/defaults/getDefaultGetParams/getDefaultGetParams.js +1 -4
- package/src/api/defaults/getDefaultInstance/getDefaultInstance.js +10 -11
- package/src/api/defaults/getDefaultOpenAPIConfig/getDefaultOpenAPIConfig.js +6 -5
- package/src/api/defaults/index.js +2 -4
- package/src/api/history/index.js +1 -3
- package/src/api/history/transcript/callTranscript.js +10 -30
- package/src/api/interceptors/request/updateToken.interceptor.js +1 -2
- package/src/api/transformers/merge/merge.transformer.js +4 -1
- package/src/api/transformers/mergeEach/mergeEach.transformer.js +4 -4
- package/src/api/transformers/notify/notify.transformer.js +9 -6
- package/src/api/transformers/starToSearch/starToSearch.transformer.js +8 -6
- package/src/components/index.js +3 -6
- package/src/components/on-demand/wt-cc-agent-status-timers/__tests__/wt-cc-agent-status-timers.spec.js +2 -4
- package/src/components/transitions/wt-expand-transition.vue +2 -3
- package/src/components/wt-app-header/__tests__/WtAppNavigator.spec.js +1 -2
- package/src/components/wt-app-header/__tests__/WtHeaderActions.spec.js +1 -2
- package/src/components/wt-app-header/wt-app-navigator.vue +15 -9
- package/src/components/wt-avatar/wt-avatar.vue +8 -3
- package/src/components/wt-button/wt-button.vue +0 -1
- package/src/components/wt-button-select/__tests__/WtButtonSelect.spec.js +4 -5
- package/src/components/wt-button-select/wt-button-select.vue +0 -1
- package/src/components/wt-context-menu/wt-context-menu.vue +32 -35
- package/src/components/wt-dummy/wt-dummy.vue +2 -5
- package/src/components/wt-expansion-panel/wt-expansion-panel.vue +10 -7
- package/src/components/wt-filters-panel-wrapper/__tests__/WtFiltersPanelWrapper.spec.js +4 -8
- package/src/components/wt-icon/wt-icon.vue +0 -1
- package/src/components/wt-indicator/__tests__/WtIndicator.spec.js +3 -2
- package/src/components/wt-indicator/wt-indicator.vue +10 -1
- package/src/components/wt-input/wt-input.vue +7 -10
- package/src/components/wt-item-link/wt-item-link.vue +7 -4
- package/src/components/wt-navigation-bar/__tests__/WtNavigationBar.spec.js +7 -15
- package/src/components/wt-navigation-bar/wt-navigation-bar.vue +7 -7
- package/src/components/wt-notification/wt-notification.vue +1 -2
- package/src/components/wt-notifications-bar/__tests__/WtNotificationsBar.spec.js +6 -3
- package/src/components/wt-notifications-bar/wt-notifications-bar.vue +4 -1
- package/src/components/wt-page-wrapper/__tests__/WtPageWrapper.spec.js +1 -2
- package/src/components/wt-pagination/wt-pagination.vue +1 -3
- package/src/components/wt-player/scripts/__tests__/createPlyrURL.spec.js +4 -8
- package/src/components/wt-player/wt-player.vue +13 -4
- package/src/components/wt-popup/wt-popup.vue +2 -1
- package/src/components/wt-search-bar/wt-search-bar.vue +1 -1
- package/src/components/wt-select/mixins/multiselectMixin.js +2 -5
- package/src/components/wt-select/wt-select.vue +12 -11
- package/src/components/wt-slider/wt-slider.vue +4 -2
- package/src/components/wt-status-select/wt-status-select.vue +10 -6
- package/src/components/wt-stepper/wt-stepper.vue +6 -4
- package/src/components/wt-switcher/wt-switcher.vue +1 -3
- package/src/components/wt-table/__tests__/WtTable.spec.js +2 -5
- package/src/components/wt-table/wt-table.vue +18 -16
- package/src/components/wt-table-column-select/wt-table-column-select.vue +9 -8
- package/src/components/wt-tabs/wt-tabs.vue +1 -3
- package/src/components/wt-tags-input/mixin/taggableMixin.js +7 -7
- package/src/components/wt-textarea/__tests__/WtTextarea.spec.js +2 -4
- package/src/components/wt-textarea/wt-textarea.vue +3 -2
- package/src/components/wt-timepicker/wt-timepicker.vue +1 -3
- package/src/components/wt-tooltip/_internals/useTooltipTriggerSubscriptions.js +1 -3
- package/src/components/wt-tooltip/_internals/wt-tooltip-floating.vue +8 -12
- package/src/components/wt-tooltip/wt-tooltip.vue +13 -13
- package/src/composables/useCachedInterval/__tests__/useCachedInterval.spec.js +6 -4
- package/src/composables/useCachedInterval/useCachedInterval.js +3 -8
- package/src/composables/useRepresentableAgentPauseCause/__tests__/useRepresentableAgentPauseCause.spec.js +11 -33
- package/src/composables/useRepresentableAgentPauseCause/useRepresentableAgentPauseCause.js +11 -9
- package/src/enums/WebitelApplications/AdminSections.enum.js +28 -28
- package/src/enums/WebitelApplications/CrmSections.enum.js +1 -1
- package/src/locale/en/en.js +12 -15
- package/src/locale/es/es.js +4 -8
- package/src/locale/kz/kz.js +5 -7
- package/src/locale/ru/ru.js +7 -11
- package/src/locale/ua/ua.js +13 -17
- package/src/mixins/dataFilterMixins/__tests__/enumFilterMixin.spec.js +1 -2
- package/src/mixins/dataFilterMixins/__tests__/sortFilterMixin.spec.js +4 -2
- package/src/mixins/dataFilterMixins/__tests__/urlControllerMixin.spec.js +4 -1
- package/src/mixins/dataFilterMixins/_urlControllerMixin/_urlControllerMixin.js +1 -1
- package/src/mixins/dataFilterMixins/apiFilterMixin.js +1 -2
- package/src/mixins/dataFilterMixins/baseFilterMixin/baseFilterMixin.js +1 -2
- package/src/mixins/dataFilterMixins/enumFilterMixin.js +5 -6
- package/src/mixins/dataFilterMixins/paginationFilterMixin.js +1 -2
- package/src/mixins/dataFilterMixins/sortFilterMixin.js +1 -4
- package/src/mixins/validationMixin/__tests__/validationMixin.spec.js +1 -2
- package/src/mixins/validationMixin/useValidation.js +25 -19
- package/src/mixins/validationMixin/validationMixin.js +22 -10
- package/src/modules/AgentStatusSelect/api/pause-cause.js +3 -11
- package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +16 -18
- package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-pause-cause-popup.spec.js +1 -2
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +12 -12
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue +0 -1
- package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +20 -7
- package/src/modules/Appearance/components/__tests__/wt-dark-mode-switcher.spec.js +2 -4
- package/src/modules/Appearance/components/wt-dark-mode-switcher.vue +0 -1
- package/src/modules/AuditForm/components/__tests__/audit-form-question-read-wrapper.spec.js +1 -2
- package/src/modules/AuditForm/components/__tests__/audit-form-question-write-wrapper.spec.js +15 -25
- package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +11 -20
- package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +1 -4
- package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +4 -7
- package/src/modules/AuditForm/components/audit-form-question.vue +18 -17
- package/src/modules/AuditForm/components/audit-form.vue +12 -14
- package/src/modules/AuditForm/components/questions/options/__tests__/audit-form-question-options-write-row.spec.js +1 -2
- package/src/modules/AuditForm/components/questions/options/__tests__/audit-form-question-options.spec.js +1 -3
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +11 -15
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +1 -4
- package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +16 -20
- package/src/modules/AuditForm/schemas/AuditFormQuestionOptionsSchema.js +1 -3
- package/src/modules/CSVExport/CSVExport.js +3 -7
- package/src/modules/CSVExport/XLSExport.js +6 -7
- package/src/modules/CSVExport/__tests__/CSVExport.spec.js +1 -2
- package/src/modules/CSVExport/mixins/exportCSVMixin.js +2 -5
- package/src/modules/CSVExport/mixins/exportXLSMixin.js +2 -4
- package/src/modules/CardStoreModule/store/CardStoreModule.js +2 -6
- package/src/modules/DeleteConfirmationPopup/__tests__/delete-confirmation-popup.spec.js +13 -10
- package/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue +5 -14
- package/src/modules/FilesExport/FilesExport.js +4 -3
- package/src/modules/FilesExport/__tests__/FilesExport.spec.js +12 -12
- package/src/modules/FilesExport/mixins/exportFilesMixin.js +6 -7
- package/src/modules/FilesExport/scripts/generateMediaURL.js +1 -2
- package/src/modules/Filters/classes/BaseFilterSchema.js +21 -25
- package/src/modules/Filters/components/filter-pagination.vue +7 -3
- package/src/modules/Filters/components/filter-search.vue +21 -12
- package/src/modules/Filters/components/filter-table-fields.vue +1 -3
- package/src/modules/Filters/scripts/getters/index.js +1 -5
- package/src/modules/Filters/scripts/getters/queryGetter.js +2 -3
- package/src/modules/Filters/scripts/restores/index.js +1 -4
- package/src/modules/Filters/scripts/setters/index.js +1 -5
- package/src/modules/Filters/scripts/setters/querySetter.js +24 -22
- package/src/modules/Filters/scripts/utils/changeRouteQuery.js +16 -15
- package/src/modules/Filters/store/FiltersStoreModule.js +51 -45
- package/src/modules/Filters/store/__tests__/FiltersStoreModule.spec.js +51 -45
- package/src/modules/Notifications/store/NotificationsStoreModule.js +41 -38
- package/src/modules/Notifications/store/__tests__/NotificationsStoreModule.actions.spec.js +6 -6
- package/src/modules/QueryFilters/api/defaults.js +2 -3
- package/src/modules/QueryFilters/classes/ApiFilterSchema.js +1 -4
- package/src/modules/QueryFilters/classes/EnumFilterSchema.js +1 -4
- package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +1 -2
- package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +2 -4
- package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +2 -4
- package/src/modules/QueryFilters/components/filter-table-fields.vue +1 -5
- package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +4 -3
- package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +2 -4
- package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +4 -2
- package/src/modules/QueryFilters/mixins/__tests__/urlControllerMixin.spec.js +4 -1
- package/src/modules/QueryFilters/mixins/_urlControllerMixin/_urlControllerMixin.js +1 -1
- package/src/modules/QueryFilters/mixins/apiFilterMixin.js +1 -1
- package/src/modules/QueryFilters/mixins/baseFilterMixin/baseFilterMixin.js +4 -2
- package/src/modules/QueryFilters/mixins/enumFilterMixin.js +9 -11
- package/src/modules/QueryFilters/mixins/paginationFilterMixin.js +2 -4
- package/src/modules/QueryFilters/mixins/sortFilterMixin.js +2 -5
- package/src/modules/QueryFilters/store/QueryFiltersStoreModule.js +13 -17
- package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +15 -16
- package/src/modules/TableStoreModule/store/TableStoreModule.js +14 -33
- package/src/modules/TableStoreModule/store/__tests__/TableStoreModule.spec.js +69 -83
- package/src/modules/Userinfo/api/userinfo.js +6 -19
- package/src/modules/Userinfo/classes/ApplicationsAccess.js +5 -12
- package/src/modules/Userinfo/store/UserinfoStoreModule.js +38 -41
- package/src/plugins/breakpoint/breakpoint.plugin.js +11 -16
- package/src/scripts/__tests__/caseConverters.spec.js +1 -4
- package/src/scripts/__tests__/debounce.spec.js +3 -1
- package/src/scripts/__tests__/prettifyFileSize.spec.js +2 -2
- package/src/scripts/__tests__/preventHiddenPageCallsDecorator.spec.js +7 -4
- package/src/scripts/__tests__/updateObject.spec.js +3 -5
- package/src/scripts/caseConverters.js +22 -38
- package/src/scripts/debounce.js +1 -5
- package/src/scripts/editProxy.js +8 -7
- package/src/scripts/prettifyFileSize.js +1 -1
- package/src/scripts/preventHiddenPageCallsDecorator.js +3 -6
- package/src/store/BaseStoreModules/ApiStoreModule.js +7 -33
- package/src/store/BaseStoreModules/BaseStoreModule.js +14 -23
- package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +7 -28
- package/src/store/helpers/getNamespacedState.js +2 -4
- package/src/store/new/modules/apiStoreModule/apiStoreModule.js +7 -27
- package/src/store/new/modules/cardStoreModule/cardStoreModule.js +0 -1
- package/src/store/new/modules/tableStoreModule/__tests__/tableStoreModule.spec.js +64 -77
- package/src/store/new/modules/tableStoreModule/tableStoreModule.js +12 -29
- package/src/tests/mocks/axiosMock.js +25 -19
- package/src/validators/decimalValidator.js +5 -4
- package/src/validators/websocketValidator/__tests__/websocketValidator.spec.js +1 -2
- package/src/validators/websocketValidator/websocketValidator.js +1 -1
package/src/locale/en/en.js
CHANGED
|
@@ -5,18 +5,13 @@ import {
|
|
|
5
5
|
ChannelType,
|
|
6
6
|
EngineRoutingSchemaType,
|
|
7
7
|
} from 'webitel-sdk';
|
|
8
|
-
import ChatGatewayProvider
|
|
9
|
-
from '../../enums/ChatGatewayProvider/ChatGatewayProvider.enum.js';
|
|
8
|
+
import ChatGatewayProvider from '../../enums/ChatGatewayProvider/ChatGatewayProvider.enum.js';
|
|
10
9
|
import QueueType from '../../enums/QueueType/QueueType.enum.js';
|
|
11
|
-
import AdminSections
|
|
12
|
-
|
|
13
|
-
import AuditorSections
|
|
14
|
-
from '../../enums/WebitelApplications/AuditorSections.enum.js';
|
|
10
|
+
import AdminSections from '../../enums/WebitelApplications/AdminSections.enum.js';
|
|
11
|
+
import AuditorSections from '../../enums/WebitelApplications/AuditorSections.enum.js';
|
|
15
12
|
import CrmSections from '../../enums/WebitelApplications/CrmSections.enum.js';
|
|
16
|
-
import SupervisorSections
|
|
17
|
-
|
|
18
|
-
import WebitelApplications
|
|
19
|
-
from '../../enums/WebitelApplications/WebitelApplications.enum.js';
|
|
13
|
+
import SupervisorSections from '../../enums/WebitelApplications/SupervisorSections.enum.js';
|
|
14
|
+
import WebitelApplications from '../../enums/WebitelApplications/WebitelApplications.enum.js';
|
|
20
15
|
import { snakeToCamel } from '../../scripts/caseConverters.js';
|
|
21
16
|
|
|
22
17
|
export default {
|
|
@@ -57,7 +52,7 @@ export default {
|
|
|
57
52
|
retry: 'Retry',
|
|
58
53
|
downloadAll: 'Download all',
|
|
59
54
|
warning: 'Warning',
|
|
60
|
-
doNotSave:
|
|
55
|
+
doNotSave: "Don't save",
|
|
61
56
|
required: 'Required',
|
|
62
57
|
copy: 'Copy',
|
|
63
58
|
new: 'New',
|
|
@@ -340,8 +335,8 @@ export default {
|
|
|
340
335
|
text: 'Sorry, you have not enough privileges to see this page.',
|
|
341
336
|
},
|
|
342
337
|
page404: {
|
|
343
|
-
title:
|
|
344
|
-
text:
|
|
338
|
+
title: "Looks like you're lost",
|
|
339
|
+
text: "Sorry, we can't find the page you want.",
|
|
345
340
|
},
|
|
346
341
|
},
|
|
347
342
|
copyAction: {
|
|
@@ -362,7 +357,8 @@ export default {
|
|
|
362
357
|
},
|
|
363
358
|
deleteConfirmationPopup: {
|
|
364
359
|
title: 'Confirm deletion',
|
|
365
|
-
askingAlert:
|
|
360
|
+
askingAlert:
|
|
361
|
+
'Are you sure you want\n to delete {count} record? | Are you sure you want\n to delete {count} records?',
|
|
366
362
|
deleteAll: 'ALL',
|
|
367
363
|
},
|
|
368
364
|
dummy: {
|
|
@@ -376,7 +372,8 @@ export default {
|
|
|
376
372
|
},
|
|
377
373
|
statusSelectErrorPopup: {
|
|
378
374
|
title: 'Attention',
|
|
379
|
-
message:
|
|
375
|
+
message:
|
|
376
|
+
'The limit for agents to take a pause has been exceeded. The pause is unavailable right now.',
|
|
380
377
|
},
|
|
381
378
|
},
|
|
382
379
|
saveFailedPopup: {
|
package/src/locale/es/es.js
CHANGED
|
@@ -6,14 +6,10 @@ import {
|
|
|
6
6
|
EngineRoutingSchemaType,
|
|
7
7
|
} from 'webitel-sdk';
|
|
8
8
|
import QueueType from '../../enums/QueueType/QueueType.enum.js';
|
|
9
|
-
import AdminSections
|
|
10
|
-
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
import SupervisorSections
|
|
14
|
-
from '../../enums/WebitelApplications/SupervisorSections.enum.js';
|
|
15
|
-
import WebitelApplications
|
|
16
|
-
from '../../enums/WebitelApplications/WebitelApplications.enum.js';
|
|
9
|
+
import AdminSections from '../../enums/WebitelApplications/AdminSections.enum.js';
|
|
10
|
+
import AuditorSections from '../../enums/WebitelApplications/AuditorSections.enum.js';
|
|
11
|
+
import SupervisorSections from '../../enums/WebitelApplications/SupervisorSections.enum.js';
|
|
12
|
+
import WebitelApplications from '../../enums/WebitelApplications/WebitelApplications.enum.js';
|
|
17
13
|
import { snakeToCamel } from '../../scripts/caseConverters.js';
|
|
18
14
|
|
|
19
15
|
export default {
|
package/src/locale/kz/kz.js
CHANGED
|
@@ -6,13 +6,10 @@ import {
|
|
|
6
6
|
EngineRoutingSchemaType,
|
|
7
7
|
} from 'webitel-sdk';
|
|
8
8
|
import QueueType from '../../enums/QueueType/QueueType.enum.js';
|
|
9
|
-
import AdminSections
|
|
10
|
-
from '../../enums/WebitelApplications/AdminSections.enum.js';
|
|
9
|
+
import AdminSections from '../../enums/WebitelApplications/AdminSections.enum.js';
|
|
11
10
|
import CrmSections from '../../enums/WebitelApplications/CrmSections.enum.js';
|
|
12
|
-
import SupervisorSections
|
|
13
|
-
|
|
14
|
-
import WebitelApplications
|
|
15
|
-
from '../../enums/WebitelApplications/WebitelApplications.enum.js';
|
|
11
|
+
import SupervisorSections from '../../enums/WebitelApplications/SupervisorSections.enum.js';
|
|
12
|
+
import WebitelApplications from '../../enums/WebitelApplications/WebitelApplications.enum.js';
|
|
16
13
|
import { snakeToCamel } from '../../scripts/caseConverters.js';
|
|
17
14
|
|
|
18
15
|
export default {
|
|
@@ -311,7 +308,8 @@ export default {
|
|
|
311
308
|
},
|
|
312
309
|
deleteConfirmationPopup: {
|
|
313
310
|
title: 'Жоюды растаңыз',
|
|
314
|
-
askingAlert:
|
|
311
|
+
askingAlert:
|
|
312
|
+
'{count} жазбасын жойғыңыз келетініне сенімдісіз бе? | {count} жазбасын жойғыңыз келетініне сенімдісіз бе?',
|
|
315
313
|
undoneActionAlert: 'Бұл әрекетті қайтару мүмкін емес.',
|
|
316
314
|
deleteAll: 'БАРЛЫҒЫ',
|
|
317
315
|
},
|
package/src/locale/ru/ru.js
CHANGED
|
@@ -5,18 +5,13 @@ import {
|
|
|
5
5
|
ChannelType,
|
|
6
6
|
EngineRoutingSchemaType,
|
|
7
7
|
} from 'webitel-sdk';
|
|
8
|
-
import ChatGatewayProvider
|
|
9
|
-
from '../../enums/ChatGatewayProvider/ChatGatewayProvider.enum.js';
|
|
8
|
+
import ChatGatewayProvider from '../../enums/ChatGatewayProvider/ChatGatewayProvider.enum.js';
|
|
10
9
|
import QueueType from '../../enums/QueueType/QueueType.enum.js';
|
|
11
|
-
import AdminSections
|
|
12
|
-
|
|
13
|
-
import AuditorSections
|
|
14
|
-
from '../../enums/WebitelApplications/AuditorSections.enum.js';
|
|
10
|
+
import AdminSections from '../../enums/WebitelApplications/AdminSections.enum.js';
|
|
11
|
+
import AuditorSections from '../../enums/WebitelApplications/AuditorSections.enum.js';
|
|
15
12
|
import CrmSections from '../../enums/WebitelApplications/CrmSections.enum.js';
|
|
16
|
-
import SupervisorSections
|
|
17
|
-
|
|
18
|
-
import WebitelApplications
|
|
19
|
-
from '../../enums/WebitelApplications/WebitelApplications.enum.js';
|
|
13
|
+
import SupervisorSections from '../../enums/WebitelApplications/SupervisorSections.enum.js';
|
|
14
|
+
import WebitelApplications from '../../enums/WebitelApplications/WebitelApplications.enum.js';
|
|
20
15
|
import { snakeToCamel } from '../../scripts/caseConverters.js';
|
|
21
16
|
|
|
22
17
|
export default {
|
|
@@ -360,7 +355,8 @@ export default {
|
|
|
360
355
|
},
|
|
361
356
|
deleteConfirmationPopup: {
|
|
362
357
|
title: 'Подтвердите удаление',
|
|
363
|
-
askingAlert:
|
|
358
|
+
askingAlert:
|
|
359
|
+
'Вы уверенны, что хотите\n удалить {count} запись? | Вы уверенны, что хотите\n удалить {count} записей?',
|
|
364
360
|
deleteAll: 'ВСЕ',
|
|
365
361
|
},
|
|
366
362
|
dummy: {
|
package/src/locale/ua/ua.js
CHANGED
|
@@ -5,18 +5,13 @@ import {
|
|
|
5
5
|
ChannelType,
|
|
6
6
|
EngineRoutingSchemaType,
|
|
7
7
|
} from 'webitel-sdk';
|
|
8
|
-
import ChatGatewayProvider
|
|
9
|
-
from '../../enums/ChatGatewayProvider/ChatGatewayProvider.enum.js';
|
|
8
|
+
import ChatGatewayProvider from '../../enums/ChatGatewayProvider/ChatGatewayProvider.enum.js';
|
|
10
9
|
import QueueType from '../../enums/QueueType/QueueType.enum.js';
|
|
11
|
-
import AdminSections
|
|
12
|
-
|
|
13
|
-
import AuditorSections
|
|
14
|
-
from '../../enums/WebitelApplications/AuditorSections.enum.js';
|
|
10
|
+
import AdminSections from '../../enums/WebitelApplications/AdminSections.enum.js';
|
|
11
|
+
import AuditorSections from '../../enums/WebitelApplications/AuditorSections.enum.js';
|
|
15
12
|
import CrmSections from '../../enums/WebitelApplications/CrmSections.enum.js';
|
|
16
|
-
import SupervisorSections
|
|
17
|
-
|
|
18
|
-
import WebitelApplications
|
|
19
|
-
from '../../enums/WebitelApplications/WebitelApplications.enum.js';
|
|
13
|
+
import SupervisorSections from '../../enums/WebitelApplications/SupervisorSections.enum.js';
|
|
14
|
+
import WebitelApplications from '../../enums/WebitelApplications/WebitelApplications.enum.js';
|
|
20
15
|
import { snakeToCamel } from '../../scripts/caseConverters.js';
|
|
21
16
|
|
|
22
17
|
export default {
|
|
@@ -59,7 +54,7 @@ export default {
|
|
|
59
54
|
downloadAll: 'Завантажити все',
|
|
60
55
|
warning: 'Попередження',
|
|
61
56
|
doNotSave: 'Не зберігати',
|
|
62
|
-
required: '
|
|
57
|
+
required: "Обов'язковий",
|
|
63
58
|
copy: 'Скопіювати',
|
|
64
59
|
new: 'Новий',
|
|
65
60
|
createdAt: 'Створено',
|
|
@@ -118,7 +113,7 @@ export default {
|
|
|
118
113
|
supervisor: 'Супервізор | Супервізори',
|
|
119
114
|
auditor: 'Аудитор | Аудитори',
|
|
120
115
|
region: 'Регіон | Регіони',
|
|
121
|
-
communicationType:
|
|
116
|
+
communicationType: "Тип зв'язку | Типи зв'язку",
|
|
122
117
|
grantee: 'Отримувач | Отримувачі',
|
|
123
118
|
user: 'Користувач | Користувачі',
|
|
124
119
|
queue: {
|
|
@@ -128,7 +123,7 @@ export default {
|
|
|
128
123
|
[QueueType.OUTBOUND_IVR_QUEUE]: 'Вихідний IVR',
|
|
129
124
|
[QueueType.PREDICTIVE_DIALER]: 'Предиктивний обзвін',
|
|
130
125
|
[QueueType.PROGRESSIVE_DIALER]: 'Прогресивний обзвін',
|
|
131
|
-
[QueueType.PREVIEW_DIALER]: '
|
|
126
|
+
[QueueType.PREVIEW_DIALER]: "Прев'ю обзвін",
|
|
132
127
|
[QueueType.CHAT_INBOUND_QUEUE]: 'Черга чатів',
|
|
133
128
|
[QueueType.INBOUND_JOB_QUEUE]: 'Вхідна черга завдань',
|
|
134
129
|
[QueueType.OUTBOUND_JOB_QUEUE]: 'Вихідна черга завдань',
|
|
@@ -168,7 +163,7 @@ export default {
|
|
|
168
163
|
[ChannelState.Offering]: 'Розподіл',
|
|
169
164
|
[ChannelState.Answered]: 'Прийнятий',
|
|
170
165
|
[ChannelState.Active]: 'Активний',
|
|
171
|
-
[ChannelState.Bridged]: '
|
|
166
|
+
[ChannelState.Bridged]: "З'єднаний",
|
|
172
167
|
[ChannelState.Hold]: 'Утримання',
|
|
173
168
|
[ChannelState.Missed]: 'Пропущений',
|
|
174
169
|
[snakeToCamel(ChannelState.WrapTime)]: 'Постобробка',
|
|
@@ -230,7 +225,7 @@ export default {
|
|
|
230
225
|
[AdminSections.BLACKLIST]: 'Cписки',
|
|
231
226
|
[AdminSections.CALENDARS]: 'Календарі',
|
|
232
227
|
[AdminSections.REGIONS]: 'Розташування',
|
|
233
|
-
[AdminSections.COMMUNICATIONS]:
|
|
228
|
+
[AdminSections.COMMUNICATIONS]: "Типи зв'язку",
|
|
234
229
|
[AdminSections.PAUSE_CAUSE]: 'Статуси оператора',
|
|
235
230
|
[AdminSections.AGENTS]: 'Оператори',
|
|
236
231
|
[AdminSections.TEAMS]: 'Команди',
|
|
@@ -252,7 +247,7 @@ export default {
|
|
|
252
247
|
},
|
|
253
248
|
},
|
|
254
249
|
validation: {
|
|
255
|
-
required: '
|
|
250
|
+
required: "Обов'язкове поле",
|
|
256
251
|
numeric: 'Необхідно ввести цифрові значення',
|
|
257
252
|
email: 'Необхідно ввести адресу електронної пошти',
|
|
258
253
|
gatewayHostValidator: 'Необхідно ввести IPv4 або FQDN',
|
|
@@ -360,7 +355,8 @@ export default {
|
|
|
360
355
|
},
|
|
361
356
|
deleteConfirmationPopup: {
|
|
362
357
|
title: 'Підтвердіть видалення',
|
|
363
|
-
askingAlert:
|
|
358
|
+
askingAlert:
|
|
359
|
+
'Ви впевнені, що хочете\n видалити {count} запис? | Ви впевнені, що хочете\n видалити {count} записів?',
|
|
364
360
|
deleteAll: 'ВСІ',
|
|
365
361
|
},
|
|
366
362
|
dummy: {
|
|
@@ -13,7 +13,8 @@ const headers = [
|
|
|
13
13
|
show: true,
|
|
14
14
|
sort: null,
|
|
15
15
|
field: 'queue',
|
|
16
|
-
},
|
|
16
|
+
},
|
|
17
|
+
{
|
|
17
18
|
value: 'agents',
|
|
18
19
|
show: true,
|
|
19
20
|
sort: null,
|
|
@@ -27,7 +28,8 @@ const sortedHeaders = [
|
|
|
27
28
|
show: true,
|
|
28
29
|
sort: 'asc',
|
|
29
30
|
field: 'queue',
|
|
30
|
-
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
31
33
|
value: 'agents',
|
|
32
34
|
show: true,
|
|
33
35
|
sort: null,
|
|
@@ -26,7 +26,10 @@ describe('URL Controller mixin Set and Get operations', () => {
|
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
it('Array of objects', async () => {
|
|
29
|
-
const value = [
|
|
29
|
+
const value = [
|
|
30
|
+
{ name: 'team 1', id: '1' },
|
|
31
|
+
{ name: 'team 2', id: '2' },
|
|
32
|
+
];
|
|
30
33
|
await wrapper.vm.setValueToQuery({ filterQuery, value });
|
|
31
34
|
const queryValue = wrapper.vm.getValueFromQuery({ filterQuery });
|
|
32
35
|
expect(queryValue).toEqual(['1', '2']);
|
|
@@ -12,8 +12,7 @@ export default {
|
|
|
12
12
|
|
|
13
13
|
methods: {
|
|
14
14
|
async restoreValue(idList) {
|
|
15
|
-
this.value = idList
|
|
16
|
-
? await this.fetchSelected(idList) : this.defaultValue;
|
|
15
|
+
this.value = idList?.length ? await this.fetchSelected(idList) : this.defaultValue;
|
|
17
16
|
},
|
|
18
17
|
|
|
19
18
|
async fetchSelected(idList) {
|
|
@@ -22,8 +22,7 @@ export default {
|
|
|
22
22
|
|
|
23
23
|
methods: {
|
|
24
24
|
restore({ filterQuery }) {
|
|
25
|
-
const value = this.getValueFromQuery({ filterQuery }) ||
|
|
26
|
-
this.defaultValue;
|
|
25
|
+
const value = this.getValueFromQuery({ filterQuery }) || this.defaultValue;
|
|
27
26
|
this.restoreValue(value);
|
|
28
27
|
},
|
|
29
28
|
},
|
|
@@ -19,13 +19,12 @@ export default {
|
|
|
19
19
|
methods: {
|
|
20
20
|
restoreValue(value) {
|
|
21
21
|
if (Array.isArray(value)) {
|
|
22
|
-
this.value = this.options
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
this.value = this.options.filter((option) =>
|
|
23
|
+
value.some((value) => `${value}` === option[this.storedProp]),
|
|
24
|
+
);
|
|
25
25
|
} else {
|
|
26
|
-
this.value =
|
|
27
|
-
.find((option) => option[this.storedProp] === value) ||
|
|
28
|
-
this.defaultValue;
|
|
26
|
+
this.value =
|
|
27
|
+
this.options.find((option) => option[this.storedProp] === value) || this.defaultValue;
|
|
29
28
|
}
|
|
30
29
|
},
|
|
31
30
|
},
|
|
@@ -18,8 +18,7 @@ export default {
|
|
|
18
18
|
watch: {
|
|
19
19
|
'$route.query': {
|
|
20
20
|
handler(newValue, oldValue) {
|
|
21
|
-
if (newValue.page !== oldValue.page
|
|
22
|
-
|| newValue.size !== oldValue.size) {
|
|
21
|
+
if (newValue.page !== oldValue.page || newValue.size !== oldValue.size) {
|
|
23
22
|
this.restore();
|
|
24
23
|
}
|
|
25
24
|
},
|
|
@@ -41,10 +41,7 @@ const queryToSortAdapter = (order) => {
|
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
const encodeSortQuery = ({
|
|
45
|
-
column,
|
|
46
|
-
order,
|
|
47
|
-
}) => (`${sortToQueryAdapter(order)}${column.field}`);
|
|
44
|
+
const encodeSortQuery = ({ column, order }) => `${sortToQueryAdapter(order)}${column.field}`;
|
|
48
45
|
|
|
49
46
|
const decodeSortQuery = ({ value }) => {
|
|
50
47
|
const sort = queryToSortAdapter(value.slice(0, 1));
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { computed, isReactive } from 'vue';
|
|
2
2
|
import { useI18n } from 'vue-i18n';
|
|
3
3
|
|
|
4
|
-
export function useValidation({
|
|
5
|
-
v: inputV,
|
|
6
|
-
customValidators: inputCustomValidators,
|
|
7
|
-
}) {
|
|
4
|
+
export function useValidation({ v: inputV, customValidators: inputCustomValidators }) {
|
|
8
5
|
const { t } = useI18n();
|
|
9
6
|
|
|
10
7
|
// support vue options api, where v is a reactive, not ref
|
|
@@ -17,8 +14,7 @@ export function useValidation({
|
|
|
17
14
|
}
|
|
18
15
|
// end
|
|
19
16
|
|
|
20
|
-
const isValidation = computed(() => !!v && !!v.value &&
|
|
21
|
-
!!Object.keys(v.value).length);
|
|
17
|
+
const isValidation = computed(() => !!v && !!v.value && !!Object.keys(v.value).length);
|
|
22
18
|
const invalid = computed(() => isValidation.value && v.value.$error);
|
|
23
19
|
|
|
24
20
|
const validationText = computed(() => {
|
|
@@ -27,26 +23,36 @@ export function useValidation({
|
|
|
27
23
|
if (v.value.required?.$invalid) validationText = t('validation.required');
|
|
28
24
|
else if (v.value.numeric?.$invalid) validationText = t('validation.numeric');
|
|
29
25
|
else if (v.value.email?.$invalid) validationText = t('validation.email');
|
|
30
|
-
else if (v.value.gatewayHostValidator?.$invalid)
|
|
26
|
+
else if (v.value.gatewayHostValidator?.$invalid)
|
|
27
|
+
validationText = t('validation.gatewayHostValidator');
|
|
31
28
|
else if (v.value.ipValidator?.$invalid) validationText = t('validation.ipValidator');
|
|
32
29
|
else if (v.value.macValidator?.$invalid) validationText = t('validation.macValidator');
|
|
33
|
-
else if (v.value.minValue?.$invalid)
|
|
34
|
-
|
|
35
|
-
else if (v.value.
|
|
36
|
-
|
|
30
|
+
else if (v.value.minValue?.$invalid)
|
|
31
|
+
validationText = `${t('validation.minValue')} ${v.value.minValue.$params.min}`;
|
|
32
|
+
else if (v.value.maxValue?.$invalid)
|
|
33
|
+
validationText = `${t('validation.maxValue')} ${v.value.maxValue.$params.max}`;
|
|
34
|
+
else if (v.value.sipAccountValidator?.$invalid)
|
|
35
|
+
validationText = t('validation.sipAccountValidator');
|
|
36
|
+
else if (v.value.minLength?.$invalid)
|
|
37
|
+
validationText = `${t('validation.minLength')} ${v.value.minLength.$params.min}`;
|
|
37
38
|
else if (v.value.url?.$invalid) validationText = `${t('validation.url')}`;
|
|
38
|
-
else if (v.value.regExpValidator?.$invalid)
|
|
39
|
+
else if (v.value.regExpValidator?.$invalid)
|
|
40
|
+
validationText = `${t('validation.regExpValidator')}`;
|
|
39
41
|
else if (v.value.sameAs?.$invalid) validationText = `${t('validation.sameAs')}`;
|
|
40
|
-
else if (v.value.domainValidator?.$invalid)
|
|
41
|
-
|
|
42
|
-
else if (v.value.
|
|
42
|
+
else if (v.value.domainValidator?.$invalid)
|
|
43
|
+
validationText = `${t('validation.domainValidator')}`;
|
|
44
|
+
else if (v.value.decimalValidator?.$invalid)
|
|
45
|
+
validationText = `${t('validation.decimalValidator')} ${v.value.decimalValidator.$params.count}`;
|
|
46
|
+
else if (v.value.websocketValidator?.$invalid)
|
|
47
|
+
validationText = `${t('validation.websocketValidator')}`;
|
|
43
48
|
else if (v.value.integer?.$invalid) validationText = `${t('validation.integer')}`;
|
|
44
|
-
else if (v.value.regex?.$invalid)
|
|
45
|
-
|
|
49
|
+
else if (v.value.regex?.$invalid)
|
|
50
|
+
validationText =
|
|
51
|
+
v.value.regex?.$message ||
|
|
52
|
+
`${t('validation.isRegExpMatched')} ${v.value.regex?.$params?.regex}`;
|
|
46
53
|
}
|
|
47
54
|
|
|
48
|
-
if (customValidators
|
|
49
|
-
|
|
55
|
+
if (customValidators?.value) {
|
|
50
56
|
for (const { name, text } of customValidators.value) {
|
|
51
57
|
if (v.value[name]?.$invalid) validationText = text;
|
|
52
58
|
}
|
|
@@ -22,21 +22,33 @@ export default {
|
|
|
22
22
|
if (this.v.required?.$invalid) validationText = this.$t('validation.required');
|
|
23
23
|
else if (this.v.numeric?.$invalid) validationText = this.$t('validation.numeric');
|
|
24
24
|
else if (this.v.email?.$invalid) validationText = this.$t('validation.email');
|
|
25
|
-
else if (this.v.gatewayHostValidator?.$invalid)
|
|
25
|
+
else if (this.v.gatewayHostValidator?.$invalid)
|
|
26
|
+
validationText = this.$t('validation.gatewayHostValidator');
|
|
26
27
|
else if (this.v.ipValidator?.$invalid) validationText = this.$t('validation.ipValidator');
|
|
27
28
|
else if (this.v.macValidator?.$invalid) validationText = this.$t('validation.macValidator');
|
|
28
|
-
else if (this.v.minValue?.$invalid)
|
|
29
|
-
|
|
30
|
-
else if (this.v.
|
|
31
|
-
|
|
29
|
+
else if (this.v.minValue?.$invalid)
|
|
30
|
+
validationText = `${this.$t('validation.minValue')} ${this.v.minValue.$params.min}`;
|
|
31
|
+
else if (this.v.maxValue?.$invalid)
|
|
32
|
+
validationText = `${this.$t('validation.maxValue')} ${this.v.maxValue.$params.max}`;
|
|
33
|
+
else if (this.v.sipAccountValidator?.$invalid)
|
|
34
|
+
validationText = this.$t('validation.sipAccountValidator');
|
|
35
|
+
else if (this.v.minLength?.$invalid)
|
|
36
|
+
validationText = `${this.$t('validation.minLength')} ${this.v.minLength.$params.min}`;
|
|
32
37
|
else if (this.v.url?.$invalid) validationText = `${this.$t('validation.url')}`;
|
|
33
|
-
else if (this.v.regExpValidator?.$invalid)
|
|
38
|
+
else if (this.v.regExpValidator?.$invalid)
|
|
39
|
+
validationText = `${this.$t('validation.regExpValidator')}`;
|
|
34
40
|
else if (this.v.sameAs?.$invalid) validationText = `${this.$t('validation.sameAs')}`;
|
|
35
|
-
else if (this.v.domainValidator?.$invalid)
|
|
36
|
-
|
|
37
|
-
else if (this.v.
|
|
41
|
+
else if (this.v.domainValidator?.$invalid)
|
|
42
|
+
validationText = `${this.$t('validation.domainValidator')}`;
|
|
43
|
+
else if (this.v.decimalValidator?.$invalid)
|
|
44
|
+
validationText = `${this.$t('validation.decimalValidator')} ${this.v.decimalValidator.$params.count}`;
|
|
45
|
+
else if (this.v.websocketValidator?.$invalid)
|
|
46
|
+
validationText = `${this.$t('validation.websocketValidator')}`;
|
|
38
47
|
else if (this.v.integer?.$invalid) validationText = `${this.$t('validation.integer')}`;
|
|
39
|
-
else if (this.v.isRegExpMatched?.$invalid)
|
|
48
|
+
else if (this.v.isRegExpMatched?.$invalid)
|
|
49
|
+
validationText =
|
|
50
|
+
this.v.isRegExpMatched?.$params?.errorMessage ||
|
|
51
|
+
`${t('validation.isRegExpMatched')} ${this.v.isRegExpMatched?.$params?.regExp}`;
|
|
40
52
|
}
|
|
41
53
|
|
|
42
54
|
for (const { name, text } of this.customValidators) {
|
|
@@ -8,7 +8,6 @@ import applyTransform, {
|
|
|
8
8
|
} from '../../../api/transformers/index.js';
|
|
9
9
|
|
|
10
10
|
const PauseCauseAPIFactory = ({ instance, OpenAPIConfig }) => {
|
|
11
|
-
|
|
12
11
|
const service = new AgentServiceApiFactory(OpenAPIConfig, '', instance);
|
|
13
12
|
|
|
14
13
|
const getList = async ({ agentId }) => {
|
|
@@ -20,24 +19,17 @@ const PauseCauseAPIFactory = ({ instance, OpenAPIConfig }) => {
|
|
|
20
19
|
|
|
21
20
|
const allowChange = true;
|
|
22
21
|
try {
|
|
23
|
-
const response = await service.searchPauseCauseForAgent(
|
|
24
|
-
agentId,
|
|
25
|
-
allowChange,
|
|
26
|
-
);
|
|
22
|
+
const response = await service.searchPauseCauseForAgent(agentId, allowChange);
|
|
27
23
|
const { items, next } = applyTransform(response.data, [
|
|
28
24
|
snakeToCamel(),
|
|
29
25
|
merge(getDefaultGetListResponse()),
|
|
30
26
|
]);
|
|
31
27
|
return {
|
|
32
|
-
items: applyTransform(items, [
|
|
33
|
-
mergeEach(defaultObject),
|
|
34
|
-
]),
|
|
28
|
+
items: applyTransform(items, [mergeEach(defaultObject)]),
|
|
35
29
|
next,
|
|
36
30
|
};
|
|
37
31
|
} catch (err) {
|
|
38
|
-
throw applyTransform(err, [
|
|
39
|
-
notify,
|
|
40
|
-
]);
|
|
32
|
+
throw applyTransform(err, [notify]);
|
|
41
33
|
}
|
|
42
34
|
};
|
|
43
35
|
|
package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js
CHANGED
|
@@ -8,13 +8,13 @@ import WtCcAgentStatusSelect from '../wt-cc-agent-status-select.vue';
|
|
|
8
8
|
const pauseCauses = [{ name: 'jest1' }, { name: 'jest2' }];
|
|
9
9
|
const getAgentPauseCausesMock = vi.fn(() => ({ items: pauseCauses }));
|
|
10
10
|
// https://stackoverflow.com/a/63727813
|
|
11
|
-
vi.spyOn(PauseCauseAPIFactory, 'default')
|
|
12
|
-
|
|
11
|
+
vi.spyOn(PauseCauseAPIFactory, 'default').mockImplementation(() => ({
|
|
12
|
+
getList: getAgentPauseCausesMock,
|
|
13
|
+
}));
|
|
13
14
|
|
|
14
15
|
const agentStatusMock = vi.fn(() => {});
|
|
15
16
|
// https://stackoverflow.com/a/63727813
|
|
16
|
-
vi.spyOn(AgentStatusAPIFactory, 'default')
|
|
17
|
-
.mockImplementation(() => ({ patch: agentStatusMock }));
|
|
17
|
+
vi.spyOn(AgentStatusAPIFactory, 'default').mockImplementation(() => ({ patch: agentStatusMock }));
|
|
18
18
|
|
|
19
19
|
const agent = {
|
|
20
20
|
status: '',
|
|
@@ -38,36 +38,33 @@ describe('Wt Cc Agent Status Select', () => {
|
|
|
38
38
|
});
|
|
39
39
|
it('renders a component', () => {
|
|
40
40
|
const wrapper = shallowMount(WtCcAgentStatusSelect, mountOptions);
|
|
41
|
-
expect(wrapper.exists())
|
|
42
|
-
.toBe(true);
|
|
41
|
+
expect(wrapper.exists()).toBe(true);
|
|
43
42
|
});
|
|
44
43
|
it(`at wt-status-select "change" to "online" event, triggers agent status patch
|
|
45
44
|
with "online" status`, () => {
|
|
46
45
|
const wrapper = shallowMount(WtCcAgentStatusSelect, mountOptions);
|
|
47
|
-
wrapper.findComponent({ name: 'wt-status-select' })
|
|
48
|
-
.vm.$emit('change', AgentStatus.ONLINE);
|
|
46
|
+
wrapper.findComponent({ name: 'wt-status-select' }).vm.$emit('change', AgentStatus.ONLINE);
|
|
49
47
|
const reqPayload = {
|
|
50
|
-
status: AgentStatus.ONLINE,
|
|
48
|
+
status: AgentStatus.ONLINE,
|
|
49
|
+
agentId: agent.agentId,
|
|
50
|
+
payload: undefined,
|
|
51
51
|
};
|
|
52
52
|
expect(agentStatusMock).toHaveBeenCalledWith(reqPayload);
|
|
53
53
|
});
|
|
54
54
|
it('at wt-status-select "change" to "pause" event, pause causes are loaded', async () => {
|
|
55
55
|
const wrapper = shallowMount(WtCcAgentStatusSelect, mountOptions);
|
|
56
|
-
wrapper.findComponent({ name: 'wt-status-select' })
|
|
57
|
-
.vm.$emit('change', AgentStatus.PAUSE);
|
|
56
|
+
wrapper.findComponent({ name: 'wt-status-select' }).vm.$emit('change', AgentStatus.PAUSE);
|
|
58
57
|
await wrapper.vm.$nextTick();
|
|
59
58
|
expect(getAgentPauseCausesMock).toHaveBeenCalled();
|
|
60
59
|
});
|
|
61
60
|
it(`at wt-status-select "change" to "pause" event and pause causes truthy response,
|
|
62
61
|
pause-cause-popup appears`, async () => {
|
|
63
62
|
const wrapper = mount(WtCcAgentStatusSelect, mountOptions);
|
|
64
|
-
wrapper.findComponent({ name: 'wt-status-select' })
|
|
65
|
-
.vm.$emit('change', AgentStatus.PAUSE);
|
|
63
|
+
wrapper.findComponent({ name: 'wt-status-select' }).vm.$emit('change', AgentStatus.PAUSE);
|
|
66
64
|
await wrapper.vm.$nextTick(); // load pause causes
|
|
67
65
|
await wrapper.vm.$nextTick();
|
|
68
66
|
await wrapper.vm.$nextTick(); // render popup
|
|
69
|
-
expect(wrapper.findComponent({ name: 'pause-cause-popup' }).isVisible())
|
|
70
|
-
.toBe(true);
|
|
67
|
+
expect(wrapper.findComponent({ name: 'pause-cause-popup' }).isVisible()).toBe(true);
|
|
71
68
|
});
|
|
72
69
|
it(`at pause-cause-popup "change" event, triggers patch agent status
|
|
73
70
|
with "pause" status and passed pauseCause`, async () => {
|
|
@@ -76,10 +73,11 @@ describe('Wt Cc Agent Status Select', () => {
|
|
|
76
73
|
wrapper.vm.openPauseCausePopup();
|
|
77
74
|
await wrapper.vm.$nextTick();
|
|
78
75
|
await wrapper.vm.$nextTick();
|
|
79
|
-
wrapper.findComponent({ name: 'pause-cause-popup' })
|
|
80
|
-
.vm.$emit('change', pauseCause);
|
|
76
|
+
wrapper.findComponent({ name: 'pause-cause-popup' }).vm.$emit('change', pauseCause);
|
|
81
77
|
const reqPayload = {
|
|
82
|
-
status: AgentStatus.PAUSE,
|
|
78
|
+
status: AgentStatus.PAUSE,
|
|
79
|
+
agentId: agent.agentId,
|
|
80
|
+
pauseCause,
|
|
83
81
|
};
|
|
84
82
|
expect(agentStatusMock).toHaveBeenCalledWith(reqPayload);
|
|
85
83
|
});
|
|
@@ -4,8 +4,7 @@ import WtCcPauseCausePopup from '../_internals/wt-cc-pause-cause-popup.vue';
|
|
|
4
4
|
describe('Pause cause popup', () => {
|
|
5
5
|
it('renders a component', () => {
|
|
6
6
|
const wrapper = shallowMount(WtCcPauseCausePopup);
|
|
7
|
-
expect(wrapper.exists())
|
|
8
|
-
.toBe(true);
|
|
7
|
+
expect(wrapper.exists()).toBe(true);
|
|
9
8
|
});
|
|
10
9
|
it('at option input event, sets "selected" its value', () => {
|
|
11
10
|
const value = 'jest';
|