@webitel/ui-sdk 26.8.30 → 26.8.32
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.umd.cjs +40 -40
- package/package.json +1 -1
- package/src/enums/WebitelApplications/AdminSections.ts +1 -0
- package/src/enums/WtObject/WtObject.ts +1 -0
- package/src/locale/en/en.js +1 -0
- package/src/locale/es/es.js +1 -0
- package/src/locale/kz/kz.js +1 -0
- package/src/locale/pl/pl.js +1 -0
- package/src/locale/ro/ro.js +1 -0
- package/src/locale/ru/ru.js +1 -0
- package/src/locale/uk/uk.js +1 -0
- package/src/locale/uz/uz.js +1 -0
- package/src/locale/vi/vi.js +1 -0
- package/src/modules/AgentPdfs/components/agent-pdfs-tab.vue +54 -5
- package/src/modules/Userinfo/classes/ApplicationsAccess.ts +4 -0
- package/src/modules/Userinfo/mappings/mappings.ts +2 -0
- package/types/.tsbuildinfo +1 -1
- package/types/enums/WebitelApplications/AdminSections.d.ts +1 -0
- package/types/enums/WtObject/WtObject.d.ts +1 -0
- package/types/locale/en/en.d.ts +1 -0
- package/types/locale/es/es.d.ts +1 -0
- package/types/locale/i18n.d.ts +9 -0
- package/types/locale/index.d.ts +9 -0
- package/types/locale/kz/kz.d.ts +1 -0
- package/types/locale/pl/pl.d.ts +1 -0
- package/types/locale/ro/ro.d.ts +1 -0
- package/types/locale/ru/ru.d.ts +1 -0
- package/types/locale/uk/uk.d.ts +1 -0
- package/types/locale/uz/uz.d.ts +1 -0
- package/types/locale/vi/vi.d.ts +1 -0
- package/types/modules/AgentPdfs/components/agent-pdfs-tab.vue.d.ts +10 -8
package/package.json
CHANGED
package/src/locale/en/en.js
CHANGED
|
@@ -427,6 +427,7 @@ export default deepmerge(
|
|
|
427
427
|
[AdminSections.Configuration]: 'Configuration',
|
|
428
428
|
[AdminSections.GlobalVariables]: 'Global variables',
|
|
429
429
|
[AdminSections.QuickReplies]: 'Quick replies',
|
|
430
|
+
[AdminSections.ActivityTypes]: 'Activity Types',
|
|
430
431
|
},
|
|
431
432
|
},
|
|
432
433
|
[WtApplication.Wfm]: {
|
package/src/locale/es/es.js
CHANGED
|
@@ -417,6 +417,7 @@ export default {
|
|
|
417
417
|
[AdminSections.Configuration]: 'Configuración',
|
|
418
418
|
[AdminSections.GlobalVariables]: 'Variables globales',
|
|
419
419
|
[AdminSections.QuickReplies]: 'Respuestas rápidas',
|
|
420
|
+
[AdminSections.ActivityTypes]: 'Tipos de actividad',
|
|
420
421
|
},
|
|
421
422
|
},
|
|
422
423
|
[WtApplication.Wfm]: {
|
package/src/locale/kz/kz.js
CHANGED
|
@@ -420,6 +420,7 @@ export default {
|
|
|
420
420
|
[AdminSections.Configuration]: 'Конфигурация',
|
|
421
421
|
[AdminSections.GlobalVariables]: 'Жалпы айнымалылар',
|
|
422
422
|
[AdminSections.QuickReplies]: 'Жылдам жауаптар',
|
|
423
|
+
[AdminSections.ActivityTypes]: 'Әрекет түрлері',
|
|
423
424
|
},
|
|
424
425
|
},
|
|
425
426
|
[WtApplication.Wfm]: {
|
package/src/locale/pl/pl.js
CHANGED
|
@@ -420,6 +420,7 @@ export default {
|
|
|
420
420
|
[AdminSections.Configuration]: 'Konfiguracja',
|
|
421
421
|
[AdminSections.GlobalVariables]: 'Zmienne globalne',
|
|
422
422
|
[AdminSections.QuickReplies]: 'Szybkie odpowiedzi',
|
|
423
|
+
[AdminSections.ActivityTypes]: 'Typy aktywności',
|
|
423
424
|
},
|
|
424
425
|
},
|
|
425
426
|
[WtApplication.Wfm]: {
|
package/src/locale/ro/ro.js
CHANGED
|
@@ -424,6 +424,7 @@ export default {
|
|
|
424
424
|
[AdminSections.Configuration]: 'Configurație',
|
|
425
425
|
[AdminSections.GlobalVariables]: 'Variabile globale',
|
|
426
426
|
[AdminSections.QuickReplies]: 'Răspunsuri rapide',
|
|
427
|
+
[AdminSections.ActivityTypes]: 'Tipuri de activitate',
|
|
427
428
|
},
|
|
428
429
|
},
|
|
429
430
|
[WtApplication.Wfm]: {
|
package/src/locale/ru/ru.js
CHANGED
|
@@ -419,6 +419,7 @@ export default {
|
|
|
419
419
|
[AdminSections.Configuration]: 'Конфигурация',
|
|
420
420
|
[AdminSections.GlobalVariables]: 'Глобальные переменные',
|
|
421
421
|
[AdminSections.QuickReplies]: 'Быстрые ответы',
|
|
422
|
+
[AdminSections.ActivityTypes]: 'Типы активности',
|
|
422
423
|
},
|
|
423
424
|
},
|
|
424
425
|
[WtApplication.Wfm]: {
|
package/src/locale/uk/uk.js
CHANGED
|
@@ -418,6 +418,7 @@ export default {
|
|
|
418
418
|
[AdminSections.Configuration]: 'Конфігурація',
|
|
419
419
|
[AdminSections.GlobalVariables]: 'Глобальні змінні',
|
|
420
420
|
[AdminSections.QuickReplies]: 'Швидкі відповіді',
|
|
421
|
+
[AdminSections.ActivityTypes]: 'Типи активності',
|
|
421
422
|
},
|
|
422
423
|
},
|
|
423
424
|
[WtApplication.Wfm]: {
|
package/src/locale/uz/uz.js
CHANGED
|
@@ -424,6 +424,7 @@ export default {
|
|
|
424
424
|
[AdminSections.Configuration]: 'Konfiguratsiya',
|
|
425
425
|
[AdminSections.GlobalVariables]: "Global o'zgaruvchilar",
|
|
426
426
|
[AdminSections.QuickReplies]: 'Tezkor javoblar',
|
|
427
|
+
[AdminSections.ActivityTypes]: 'Faoliyat turlari',
|
|
427
428
|
},
|
|
428
429
|
},
|
|
429
430
|
[WtApplication.Wfm]: {
|
package/src/locale/vi/vi.js
CHANGED
|
@@ -424,6 +424,7 @@ export default {
|
|
|
424
424
|
[AdminSections.Configuration]: 'Cấu hình',
|
|
425
425
|
[AdminSections.GlobalVariables]: 'Biến toàn cục',
|
|
426
426
|
[AdminSections.QuickReplies]: 'Trả lời nhanh',
|
|
427
|
+
[AdminSections.ActivityTypes]: 'Loại hoạt động',
|
|
427
428
|
},
|
|
428
429
|
},
|
|
429
430
|
[WtApplication.Wfm]: {
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
:load-data-list="loadDataList"
|
|
7
7
|
:ask-delete-confirmation="askDeleteConfirmation"
|
|
8
8
|
:handle-delete="handleDelete"
|
|
9
|
+
:download-archive="downloadArchive"
|
|
10
|
+
:is-downloading-archive="isDownloadingArchive"
|
|
9
11
|
/>
|
|
10
12
|
|
|
11
13
|
<delete-confirmation-popup
|
|
@@ -110,18 +112,23 @@ import {
|
|
|
110
112
|
type WebitelMediaExporterExportRecord,
|
|
111
113
|
WebitelMediaExporterExportStatus,
|
|
112
114
|
} from '@webitel/api-services/gen/models';
|
|
115
|
+
import {
|
|
116
|
+
downloadFile as downloadArchiveFile,
|
|
117
|
+
FileFormat,
|
|
118
|
+
} from '@webitel/api-services/scripts';
|
|
113
119
|
import { WtEmpty } from '@webitel/ui-sdk/components';
|
|
114
120
|
import { getEndOfDay, getStartOfDay } from '@webitel/ui-sdk/scripts';
|
|
115
121
|
import DeleteConfirmationPopup from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
|
|
116
122
|
import { useDeleteConfirmationPopup } from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
|
|
117
123
|
import { useTableEmpty } from '@webitel/ui-sdk/src/modules/TableComponentModule/composables/useTableEmpty';
|
|
118
124
|
import { storeToRefs } from 'pinia';
|
|
119
|
-
import { computed } from 'vue';
|
|
125
|
+
import { computed, ref } from 'vue';
|
|
120
126
|
import { DatetimeFormat } from 'vue-i18n';
|
|
121
127
|
|
|
122
128
|
import { CrudAction } from '../../../enums';
|
|
123
129
|
import { FormatDateMode } from '../../../enums/FormatDateMode/FormatDateMode';
|
|
124
130
|
import { formatDate } from '../../../utils/formatDate';
|
|
131
|
+
import type { AskDeleteConfirmationParams } from '../../DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
|
|
125
132
|
import PdfStatus from './pdf-status.vue';
|
|
126
133
|
import PdfStatusPreview from './pdf-status-preview.vue';
|
|
127
134
|
|
|
@@ -134,6 +141,17 @@ const props = defineProps<{
|
|
|
134
141
|
access?: Partial<Record<CrudAction, boolean>>;
|
|
135
142
|
}>();
|
|
136
143
|
|
|
144
|
+
defineSlots<{
|
|
145
|
+
header(props: {
|
|
146
|
+
selected: WebitelMediaExporterExportRecord[];
|
|
147
|
+
loadDataList: () => Promise<void>;
|
|
148
|
+
askDeleteConfirmation: (params: AskDeleteConfirmationParams) => void;
|
|
149
|
+
handleDelete: (items: WebitelMediaExporterExportRecord[]) => Promise<void>;
|
|
150
|
+
downloadArchive: () => Promise<void>;
|
|
151
|
+
isDownloadingArchive: boolean;
|
|
152
|
+
}): unknown;
|
|
153
|
+
}>();
|
|
154
|
+
|
|
137
155
|
const tableStore = props.store;
|
|
138
156
|
|
|
139
157
|
const {
|
|
@@ -238,10 +256,10 @@ const {
|
|
|
238
256
|
isLoading,
|
|
239
257
|
});
|
|
240
258
|
|
|
241
|
-
const handleDelete = async (items: []) => {
|
|
242
|
-
const deleteEl = (el) => {
|
|
259
|
+
const handleDelete = async (items: WebitelMediaExporterExportRecord[]) => {
|
|
260
|
+
const deleteEl = (el: WebitelMediaExporterExportRecord) => {
|
|
243
261
|
// If status is failed, use deletePdfExportRecord with the export id
|
|
244
|
-
if (el.status === WebitelMediaExporterExportStatus.Failed) {
|
|
262
|
+
if (el.status === WebitelMediaExporterExportStatus.Failed && el.id) {
|
|
245
263
|
return PdfServicesAPI.delete(el.id);
|
|
246
264
|
}
|
|
247
265
|
// Otherwise, use custom delete function if provided
|
|
@@ -249,8 +267,11 @@ const handleDelete = async (items: []) => {
|
|
|
249
267
|
return props.onDeleteItem(el);
|
|
250
268
|
}
|
|
251
269
|
// Fallback to default implementation
|
|
270
|
+
if (!el.fileId) return Promise.resolve();
|
|
252
271
|
return FileServicesAPI.deleteScreenRecordingsByAgent({
|
|
253
|
-
id:
|
|
272
|
+
id: [
|
|
273
|
+
el.fileId,
|
|
274
|
+
],
|
|
254
275
|
agentId: props.entityIdValue,
|
|
255
276
|
});
|
|
256
277
|
};
|
|
@@ -271,6 +292,34 @@ const downloadPdf = async (id: string) => {
|
|
|
271
292
|
await downloadFile(id);
|
|
272
293
|
};
|
|
273
294
|
|
|
295
|
+
const isDownloadingArchive = ref(false);
|
|
296
|
+
|
|
297
|
+
const downloadArchive = async () => {
|
|
298
|
+
if (!props.entityIdValue) return;
|
|
299
|
+
|
|
300
|
+
isDownloadingArchive.value = true;
|
|
301
|
+
try {
|
|
302
|
+
const fileIds = selected.value.length
|
|
303
|
+
? selected.value.map(
|
|
304
|
+
(item: WebitelMediaExporterExportRecord) => item.fileId,
|
|
305
|
+
)
|
|
306
|
+
: undefined;
|
|
307
|
+
|
|
308
|
+
const response = await PdfServicesAPI.downloadCallArchive({
|
|
309
|
+
callId: props.entityIdValue,
|
|
310
|
+
fileIds,
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
downloadArchiveFile({
|
|
314
|
+
response,
|
|
315
|
+
fileFormat: FileFormat.ZIP,
|
|
316
|
+
filename: `pdfs-${props.entityIdValue}`,
|
|
317
|
+
});
|
|
318
|
+
} finally {
|
|
319
|
+
isDownloadingArchive.value = false;
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
|
|
274
323
|
const openPdfInNewWindow = (fileId: string) => {
|
|
275
324
|
try {
|
|
276
325
|
const pdfUrl = getMediaUrl(fileId);
|
|
@@ -127,6 +127,10 @@ const applicationsAccess = (value = true): ApplicationsAccessSchema => ({
|
|
|
127
127
|
_enabled: value,
|
|
128
128
|
_locale: `WtApplication.${WtApplication.Admin}.sections.${AdminSections.PauseCause}`,
|
|
129
129
|
},
|
|
130
|
+
[AdminSections.ActivityTypes]: {
|
|
131
|
+
_enabled: value,
|
|
132
|
+
_locale: `WtApplication.${WtApplication.Admin}.sections.${AdminSections.ActivityTypes}`,
|
|
133
|
+
},
|
|
130
134
|
[AdminSections.Media]: {
|
|
131
135
|
_enabled: value,
|
|
132
136
|
_locale: `WtApplication.${WtApplication.Admin}.sections.${AdminSections.Media}`,
|
|
@@ -56,6 +56,7 @@ export const mapScopeClassToWtObjects: Partial<Record<ScopeClass, WtObject[]>> =
|
|
|
56
56
|
],
|
|
57
57
|
[ScopeClass.Skills]: [
|
|
58
58
|
WtObject.Skill,
|
|
59
|
+
WtObject.ActivityType,
|
|
59
60
|
],
|
|
60
61
|
[ScopeClass.Calendars]: [
|
|
61
62
|
WtObject.Calendar,
|
|
@@ -237,6 +238,7 @@ export const mapWtObjectToUiSection: Partial<
|
|
|
237
238
|
[WtObject.WorkingCondition]: AdminSections.WorkingConditions,
|
|
238
239
|
[WtObject.Member]: AdminSections.Members,
|
|
239
240
|
[WtObject.QuickReply]: AdminSections.QuickReplies,
|
|
241
|
+
[WtObject.ActivityType]: AdminSections.ActivityTypes,
|
|
240
242
|
},
|
|
241
243
|
|
|
242
244
|
// Auditor sections
|