@webitel/ui-sdk 26.8.131 → 26.8.133
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/{clients-CK-bThbs.js → clients-BVxipio3.js} +466 -452
- package/dist/{components-BF21ppoM.js → components-Bp-9Pd3E.js} +513 -508
- package/dist/{convertDuration-B7EyPh1B.js → convertDuration-r4cKShcD.js} +1 -1
- package/dist/{enums-Qt_FgVQw.js → enums-De3aMU0v.js} +10 -3
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +15 -15
- package/dist/ui-sdk.umd.cjs +264 -264
- package/dist/{useValidation-Doxk7u8O.js → useValidation-DVMLhp7P.js} +1 -1
- package/dist/{utils-g-eGs-rV.js → utils-DDzzeDYC.js} +1 -1
- package/dist/{wt-action-bar-CY9H27Ec.js → wt-action-bar-Bmam7PTX.js} +2 -2
- package/dist/{wt-badge-Dyvw8SJe.js → wt-badge-B2sYDOIO.js} +1 -1
- package/dist/{wt-button-qmvx3hrn.js → wt-button-CnE463wN.js} +2 -2
- package/dist/{wt-chat-emoji-Cx8k9m9H.js → wt-chat-emoji-57Q-4jDY.js} +4 -4
- package/dist/{wt-datepicker-Da7l0Gm1.js → wt-datepicker-BMD_vwhp.js} +6 -6
- package/dist/{wt-display-chip-items-AZ9DiSV4.js → wt-display-chip-items-DUKofLnh.js} +2 -2
- package/dist/{wt-dual-panel-DliLMQ_m.js → wt-dual-panel-BLvpBVYd.js} +1 -1
- package/dist/{wt-expansion-card-CcziJa7V.js → wt-expansion-card-BtjKjHn7.js} +1 -1
- package/dist/{wt-expansion-panel-Y3eYALow.js → wt-expansion-panel-B1ELycoD.js} +1 -1
- package/dist/{wt-icon-oMc-wpjH.js → wt-icon-DcUiwhds.js} +3 -3
- package/dist/{wt-icon-action-BIO8dR4s.js → wt-icon-action-D81WgIrd.js} +2 -19
- package/dist/{wt-icon-btn-D0co3nt5.js → wt-icon-btn-nXKOrltT.js} +1 -1
- package/dist/{wt-notifications-bar-CC48Ce7a.js → wt-notifications-bar-PZDG_jxU.js} +2 -2
- package/dist/{wt-player-CjAl-XrU.js → wt-player-D8dtW7Vv.js} +3 -3
- package/dist/{wt-screen-recordings-action-Dwj649Zu.js → wt-screen-recordings-action-BSVE_Bnb.js} +1 -1
- package/dist/{wt-search-bar-B9iP5zrT.js → wt-search-bar-BHKUUhH-.js} +1 -1
- package/dist/{wt-send-message-popup-BjI9PKzi.js → wt-send-message-popup-CXPAarjJ.js} +3 -3
- package/dist/{wt-status-select-C5YdvKpM.js → wt-status-select-D73ufZVN.js} +2 -2
- package/dist/{wt-table-CsGUHe1D.js → wt-table-C_MUE0EP.js} +3 -3
- package/dist/{wt-timepicker-DcoIUiO-.js → wt-timepicker-D1dciWJ0.js} +4 -4
- package/dist/{wt-toast-DGtljpcq.js → wt-toast-C8mbYaNa.js} +10 -10
- package/dist/{wt-tree-table-DnvAUSXr.js → wt-tree-table-DluG-JAm.js} +1 -1
- package/dist/{wt-type-extension-value-input-C6Mq2QeU.js → wt-type-extension-value-input-C2A0Pk2o.js} +1846 -1774
- package/dist/{wt-vidstack-player-D_N5CdUm.js → wt-vidstack-player-CQOGC3TS.js} +5 -5
- package/package.json +1 -1
- package/src/components/wt-app-header/__tests__/WtAppNavigator.spec.js +47 -0
- package/src/components/wt-app-header/assets/wfm-dark.svg +118 -0
- package/src/components/wt-app-header/assets/wfm-light.svg +118 -0
- package/src/components/wt-app-header/wt-app-navigator.vue +9 -0
- package/src/components/wt-icon-action/wt-icon-action.vue +1 -19
- package/src/enums/WebitelApplications/WfmSections.ts +6 -1
- package/src/locale/en/en.js +7 -0
- package/src/locale/es/es.js +7 -0
- package/src/locale/kz/kz.js +7 -0
- package/src/locale/pl/pl.js +7 -0
- package/src/locale/ro/ro.js +7 -0
- package/src/locale/ru/ru.js +7 -0
- package/src/locale/uk/uk.js +7 -0
- package/src/locale/uz/uz.js +7 -0
- package/src/locale/vi/vi.js +7 -0
- package/src/modules/Userinfo/classes/ApplicationsAccess.ts +20 -0
- package/src/modules/Userinfo/classes/__tests__/ApplicationsAccess.spec.ts +54 -0
- package/src/modules/Userinfo/mappings/__tests__/mappings.spec.ts +32 -0
- package/src/modules/Userinfo/mappings/mappings.ts +8 -2
- package/src/modules/Userinfo/types/UserAccess.ts +3 -1
- package/types/.tsbuildinfo +1 -1
- package/types/enums/WebitelApplications/WfmSections.d.ts +4 -1
- package/types/locale/en/en.d.ts +6 -0
- package/types/locale/es/es.d.ts +8 -0
- package/types/locale/i18n.d.ts +54 -0
- package/types/locale/index.d.ts +54 -0
- package/types/locale/kz/kz.d.ts +8 -0
- package/types/locale/pl/pl.d.ts +8 -0
- package/types/locale/ro/ro.d.ts +8 -0
- package/types/locale/ru/ru.d.ts +8 -0
- package/types/locale/uk/uk.d.ts +8 -0
- package/types/locale/uz/uz.d.ts +8 -0
- package/types/locale/vi/vi.d.ts +8 -0
- package/types/modules/Userinfo/classes/ApplicationsAccess.d.ts +3 -1
- package/types/modules/Userinfo/mappings/mappings.d.ts +3 -2
- package/types/modules/Userinfo/types/UserAccess.d.ts +2 -2
package/src/locale/vi/vi.js
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
QueueType,
|
|
18
18
|
RelativeDatetimeValue,
|
|
19
19
|
SupervisorSections,
|
|
20
|
+
WfmSections,
|
|
20
21
|
WtApplication,
|
|
21
22
|
} from '../../enums';
|
|
22
23
|
import { AccessMode } from '../../modules/ObjectPermissions/enums/AccessMode.enum';
|
|
@@ -455,6 +456,11 @@ export default {
|
|
|
455
456
|
},
|
|
456
457
|
[WtApplication.Wfm]: {
|
|
457
458
|
name: 'WFM',
|
|
459
|
+
sections: {
|
|
460
|
+
[WfmSections.Agents]: 'Đại lý',
|
|
461
|
+
[WfmSections.Schedules]: 'Lịch trình',
|
|
462
|
+
[WfmSections.ForecastCalculation]: 'Tính toán dự báo',
|
|
463
|
+
},
|
|
458
464
|
},
|
|
459
465
|
[WtApplication.Meet]: {
|
|
460
466
|
theCameraIsTurnedOff: 'Camera đã được tắt',
|
|
@@ -549,6 +555,7 @@ export default {
|
|
|
549
555
|
history: 'Lịch sử',
|
|
550
556
|
grafana: 'Grafana',
|
|
551
557
|
crm: 'CRM',
|
|
558
|
+
wfm: 'WFM',
|
|
552
559
|
},
|
|
553
560
|
headerActions: {
|
|
554
561
|
account: 'Tài khoản',
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
AuditorSections,
|
|
8
8
|
CrmSections,
|
|
9
9
|
SupervisorSections,
|
|
10
|
+
WfmSections,
|
|
10
11
|
WtApplication,
|
|
11
12
|
} from '../../../enums';
|
|
12
13
|
|
|
@@ -33,6 +34,9 @@ export type ApplicationsAccessSchema = {
|
|
|
33
34
|
} & {
|
|
34
35
|
[WtApplication.Crm]: BaseAccessSchema &
|
|
35
36
|
Partial<Record<CrmSections, BaseAccessSchema>>;
|
|
37
|
+
} & {
|
|
38
|
+
[WtApplication.Wfm]: BaseAccessSchema &
|
|
39
|
+
Partial<Record<WfmSections, BaseAccessSchema>>;
|
|
36
40
|
};
|
|
37
41
|
|
|
38
42
|
const applicationsAccess = (value = true): ApplicationsAccessSchema => ({
|
|
@@ -280,6 +284,22 @@ const applicationsAccess = (value = true): ApplicationsAccessSchema => ({
|
|
|
280
284
|
_locale: `WtApplication.overrideApplicationsAccess.${WtApplication.Crm}.sections.${CrmSections.CustomLookups}`,
|
|
281
285
|
},
|
|
282
286
|
},
|
|
287
|
+
[WtApplication.Wfm]: {
|
|
288
|
+
_enabled: value,
|
|
289
|
+
_locale: `WtApplication.${WtApplication.Wfm}.name`,
|
|
290
|
+
[WfmSections.Agents]: {
|
|
291
|
+
_enabled: value,
|
|
292
|
+
_locale: `WtApplication.${WtApplication.Wfm}.sections.${WfmSections.Agents}`,
|
|
293
|
+
},
|
|
294
|
+
[WfmSections.Schedules]: {
|
|
295
|
+
_enabled: value,
|
|
296
|
+
_locale: `WtApplication.${WtApplication.Wfm}.sections.${WfmSections.Schedules}`,
|
|
297
|
+
},
|
|
298
|
+
[WfmSections.ForecastCalculation]: {
|
|
299
|
+
_enabled: value,
|
|
300
|
+
_locale: `WtApplication.${WtApplication.Wfm}.sections.${WfmSections.ForecastCalculation}`,
|
|
301
|
+
},
|
|
302
|
+
},
|
|
283
303
|
});
|
|
284
304
|
|
|
285
305
|
/**
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import { WfmSections, WtApplication } from '../../../../enums';
|
|
4
|
+
import ApplicationsAccess from '../ApplicationsAccess';
|
|
5
|
+
|
|
6
|
+
const wfmSections = [
|
|
7
|
+
WfmSections.Agents,
|
|
8
|
+
WfmSections.Schedules,
|
|
9
|
+
WfmSections.ForecastCalculation,
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
describe('ApplicationsAccess', () => {
|
|
13
|
+
it('includes WFM application with its sections', () => {
|
|
14
|
+
const { access } = new ApplicationsAccess();
|
|
15
|
+
|
|
16
|
+
expect(access[WtApplication.Wfm]._enabled).toBe(true);
|
|
17
|
+
expect(access[WtApplication.Wfm]._locale).toBe(
|
|
18
|
+
`WtApplication.${WtApplication.Wfm}.name`,
|
|
19
|
+
);
|
|
20
|
+
wfmSections.forEach((section) => {
|
|
21
|
+
expect(access[WtApplication.Wfm][section]).toEqual({
|
|
22
|
+
_enabled: true,
|
|
23
|
+
_locale: `WtApplication.${WtApplication.Wfm}.sections.${section}`,
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('does not include lookups that are not moved to WFM yet', () => {
|
|
29
|
+
const { access } = new ApplicationsAccess();
|
|
30
|
+
|
|
31
|
+
expect(
|
|
32
|
+
access[WtApplication.Wfm][WfmSections.ShiftTemplates],
|
|
33
|
+
).toBeUndefined();
|
|
34
|
+
expect(
|
|
35
|
+
access[WtApplication.Wfm][WfmSections.PauseTemplates],
|
|
36
|
+
).toBeUndefined();
|
|
37
|
+
expect(
|
|
38
|
+
access[WtApplication.Wfm][WfmSections.WorkingConditions],
|
|
39
|
+
).toBeUndefined();
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it('restores WFM as disabled when it is missing from saved access', () => {
|
|
43
|
+
const { access } = new ApplicationsAccess({
|
|
44
|
+
access: {
|
|
45
|
+
[WtApplication.Crm]: {
|
|
46
|
+
_enabled: true,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
expect(access[WtApplication.Wfm]._enabled).toBe(false);
|
|
52
|
+
expect(access[WtApplication.Wfm][WfmSections.Agents]?._enabled).toBe(false);
|
|
53
|
+
});
|
|
54
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
AdminSections,
|
|
5
|
+
WfmSections,
|
|
6
|
+
WtApplication,
|
|
7
|
+
WtObject,
|
|
8
|
+
} from '../../../../enums';
|
|
9
|
+
import { castWtObjectToUiSection } from '../../scripts/utils';
|
|
10
|
+
|
|
11
|
+
describe('mapWtObjectToUiSection', () => {
|
|
12
|
+
it('maps agents to WFM Agents section', () => {
|
|
13
|
+
expect(castWtObjectToUiSection(WtApplication.Wfm, WtObject.Agent)).toBe(
|
|
14
|
+
WfmSections.Agents,
|
|
15
|
+
);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('keeps Admin mapping for lookups that are not moved to WFM yet', () => {
|
|
19
|
+
expect(
|
|
20
|
+
castWtObjectToUiSection(WtApplication.Admin, WtObject.ShiftTemplate),
|
|
21
|
+
).toBe(AdminSections.ShiftTemplates);
|
|
22
|
+
expect(
|
|
23
|
+
castWtObjectToUiSection(WtApplication.Admin, WtObject.PauseTemplate),
|
|
24
|
+
).toBe(AdminSections.PauseTemplates);
|
|
25
|
+
expect(
|
|
26
|
+
castWtObjectToUiSection(WtApplication.Admin, WtObject.WorkingCondition),
|
|
27
|
+
).toBe(AdminSections.WorkingConditions);
|
|
28
|
+
expect(
|
|
29
|
+
castWtObjectToUiSection(WtApplication.Wfm, WtObject.ShiftTemplate),
|
|
30
|
+
).toBeUndefined();
|
|
31
|
+
});
|
|
32
|
+
});
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
CrmSections,
|
|
7
7
|
CrudAction,
|
|
8
8
|
SupervisorSections,
|
|
9
|
+
WfmSections,
|
|
9
10
|
WtApplication,
|
|
10
11
|
WtObject,
|
|
11
12
|
} from '../../../enums';
|
|
@@ -202,7 +203,8 @@ type UiSection =
|
|
|
202
203
|
| AdminSections
|
|
203
204
|
| AuditorSections
|
|
204
205
|
| CrmSections
|
|
205
|
-
| SupervisorSections
|
|
206
|
+
| SupervisorSections
|
|
207
|
+
| WfmSections;
|
|
206
208
|
export const mapWtObjectToUiSection: Partial<
|
|
207
209
|
Record<WtApplication, Partial<Record<WtObject, UiSection>>>
|
|
208
210
|
> = {
|
|
@@ -274,7 +276,10 @@ export const mapWtObjectToUiSection: Partial<
|
|
|
274
276
|
[WtObject.Communication]: SupervisorSections.ActiveCalls,
|
|
275
277
|
},
|
|
276
278
|
|
|
277
|
-
|
|
279
|
+
// Wfm sections
|
|
280
|
+
[WtApplication.Wfm]: {
|
|
281
|
+
[WtObject.Agent]: WfmSections.Agents,
|
|
282
|
+
},
|
|
278
283
|
};
|
|
279
284
|
|
|
280
285
|
export const mapUiSectionToWtObject = invert(mapWtObjectToUiSection);
|
|
@@ -283,3 +288,4 @@ export const AdminSectionsValues = invert(AdminSections);
|
|
|
283
288
|
export const AuditorSectionsValues = invert(AuditorSections);
|
|
284
289
|
export const CrmSectionsValues = invert(CrmSections);
|
|
285
290
|
export const SupervisorSectionsValues = invert(SupervisorSections);
|
|
291
|
+
export const WfmSectionsValues = invert(WfmSections);
|
|
@@ -6,6 +6,7 @@ import type {
|
|
|
6
6
|
CrmSections,
|
|
7
7
|
CrudAction,
|
|
8
8
|
SupervisorSections,
|
|
9
|
+
WfmSections,
|
|
9
10
|
WtApplication,
|
|
10
11
|
WtObject,
|
|
11
12
|
} from '../../../enums';
|
|
@@ -25,7 +26,8 @@ export type UiSection =
|
|
|
25
26
|
| AdminSections
|
|
26
27
|
| AuditorSections
|
|
27
28
|
| SupervisorSections
|
|
28
|
-
| CrmSections
|
|
29
|
+
| CrmSections
|
|
30
|
+
| WfmSections;
|
|
29
31
|
|
|
30
32
|
export type FullUiSectionName = `${WtApplication}/${UiSection}`;
|
|
31
33
|
|