diff --git a/src/app/mixins/baseMixins/baseTableMixin/deleteMixin/deleteConfirmationMixin.js b/src/app/mixins/baseMixins/baseTableMixin/deleteMixin/deleteConfirmationMixin.js
deleted file mode 100644
index c976fbea1..000000000
--- a/src/app/mixins/baseMixins/baseTableMixin/deleteMixin/deleteConfirmationMixin.js
+++ /dev/null
@@ -1,30 +0,0 @@
-import DeleteConfirmationPopup
- from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
-
-export default {
- components: {
- DeleteConfirmationPopup,
- },
- data: () => ({
- isDeleteConfirmation: true,
- deleteConfirmation: {
- isDeleteConfirmationPopup: false,
- deleteCount: null,
- callback: null,
- },
- }),
- methods: {
- askDeleteConfirmation({ deleted, callback }) {
- if (Array.isArray(deleted)) this.deleteConfirmation.deleteCount = deleted.length;
- else this.deleteConfirmation.deleteCount = 1;
- this.deleteConfirmation.isDeleteConfirmationPopup = true;
- this.deleteConfirmation.callback = callback;
- },
- confirmDelete() {
- this.deleteConfirmation.callback();
- },
- closeDelete() {
- this.deleteConfirmation.isDeleteConfirmationPopup = false;
- },
- },
-};
diff --git a/src/app/mixins/baseMixins/baseTableMixin/deleteMixin/tableDeleteMixin.js b/src/app/mixins/baseMixins/baseTableMixin/deleteMixin/tableDeleteMixin.js
index 8bf92fe22..d74b7935d 100644
--- a/src/app/mixins/baseMixins/baseTableMixin/deleteMixin/tableDeleteMixin.js
+++ b/src/app/mixins/baseMixins/baseTableMixin/deleteMixin/tableDeleteMixin.js
@@ -1,17 +1,6 @@
-import deleteConfirmationMixin from './deleteConfirmationMixin';
-
export default {
- mixins: [deleteConfirmationMixin],
methods: {
- callDelete(deleted) {
- if (this.isDeleteConfirmation) {
- this.askDeleteConfirmation({
- deleted,
- callback: this.makeDelete.bind(this, deleted),
- });
- } else this.makeDelete(deleted);
- },
- makeDelete(deleted) {
+ deleteData(deleted) {
return this.dispatchDelete(deleted);
},
dispatchDelete() {
diff --git a/src/modules/contact-center/modules/agents/components/the-agents.vue b/src/modules/contact-center/modules/agents/components/the-agents.vue
index cfec64ff6..b16a544dd 100644
--- a/src/modules/contact-center/modules/agents/components/the-agents.vue
+++ b/src/modules/contact-center/modules/agents/components/the-agents.vue
@@ -11,9 +11,9 @@
@@ -43,7 +43,10 @@
v-if="hasDeleteAccess"
:class="{'hidden': anySelected}"
:selected-count="selectedRows.length"
- @click="callDelete(selectedRows)"
+ @click="askDeleteConfirmation({
+ deleted: selectedRows,
+ callback: () => deleteData(selectedRows),
+ })"
/>
@@ -106,7 +109,10 @@
v-if="hasDeleteAccess"
action="delete"
class="table-action"
- @click="callDelete(item)"
+ @click="askDeleteConfirmation({
+ deleted: [item],
+ callback: () => deleteData(item),
+ })"
/>
@@ -135,17 +141,38 @@ import tableComponentMixin from '../../../../../app/mixins/objectPagesMixins/obj
import RouteNames from '../../../../../app/router/_internals/RouteNames.enum';
import agentStatusMixin from '../../../mixins/agentStatusMixin';
import HistoryPopup from './agent-history-popup.vue';
+import DeleteConfirmationPopup
+ from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
+import { useDeleteConfirmationPopup } from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
+
const namespace = 'ccenter/agents';
export default {
name: 'TheAgents',
- components: { HistoryPopup },
+ components: { HistoryPopup, DeleteConfirmationPopup },
mixins: [tableComponentMixin, agentStatusMixin],
setup() {
const { dummy } = useDummy({ namespace, showAction: true });
- return { dummy };
+ const {
+ isVisible: isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ } = useDeleteConfirmationPopup();
+
+ return {
+ dummy,
+ isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ };
},
data: () => ({
diff --git a/src/modules/contact-center/modules/queues/components/the-queues.vue b/src/modules/contact-center/modules/queues/components/the-queues.vue
index fe3c3c5bc..ee14b6d14 100644
--- a/src/modules/contact-center/modules/queues/components/the-queues.vue
+++ b/src/modules/contact-center/modules/queues/components/the-queues.vue
@@ -17,9 +17,9 @@
@close="isQueueSelectPopup = false"
/>
@@ -44,8 +44,12 @@
v-if="hasDeleteAccess"
:class="{'hidden': anySelected}"
:selected-count="selectedRows.length"
- @click="callDelete(selectedRows)"
+ @click="askDeleteConfirmation({
+ deleted: selectedRows,
+ callback: () => deleteData(selectedRows),
+ })"
/>
+
@@ -123,7 +127,10 @@
v-if="hasDeleteAccess"
action="delete"
class="table-action"
- @click="callDelete(item)"
+ @click="askDeleteConfirmation({
+ deleted: [item],
+ callback: () => deleteData(item),
+ })"
/>
@@ -149,18 +156,39 @@ import tableComponentMixin from '../../../../../app/mixins/objectPagesMixins/obj
import RouteNames from '../../../../../app/router/_internals/RouteNames.enum';
import QueueTypeProperties from '../lookups/QueueTypeProperties.lookup';
import QueuePopup from './create-queue-popup.vue';
+import DeleteConfirmationPopup
+ from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
+import { useDeleteConfirmationPopup } from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
const namespace = 'ccenter/queues';
export default {
name: 'TheQueues',
- components: { QueuePopup },
+ components: { QueuePopup, DeleteConfirmationPopup },
mixins: [tableComponentMixin],
setup() {
const { dummy } = useDummy({ namespace, showAction: true });
- return { dummy };
+ const {
+ isVisible: isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ } = useDeleteConfirmationPopup();
+
+ return {
+ dummy,
+ isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ };
},
+
data: () => ({
namespace,
isQueueSelectPopup: false,
diff --git a/src/modules/contact-center/modules/queues/modules/members/components/communications/opened-queue-member-communication.vue b/src/modules/contact-center/modules/queues/modules/members/components/communications/opened-queue-member-communication.vue
index 96ef97057..506af9ad2 100644
--- a/src/modules/contact-center/modules/queues/modules/members/components/communications/opened-queue-member-communication.vue
+++ b/src/modules/contact-center/modules/queues/modules/members/components/communications/opened-queue-member-communication.vue
@@ -7,9 +7,9 @@
/>
@@ -25,7 +25,10 @@
v-if="!disableUserInput"
:class="{'hidden': anySelected}"
:selected-count="selectedRows.length"
- @click="callDelete(selectedRows)"
+ @click="askDeleteConfirmation({
+ deleted: selectedRows,
+ callback: () => deleteData(selectedRows),
+ })"
/>
deleteData(item),
+ })"
/>
@@ -79,11 +85,34 @@ import { mapActions, mapState } from 'vuex';
import openedObjectTableTabMixin
from '../../../../../../../../app/mixins/objectPagesMixins/openedObjectTableTabMixin/openedObjectTableTabMixin';
import CommunicationPopup from './opened-queue-member-communication-popup.vue';
+import DeleteConfirmationPopup
+ from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
+import { useDeleteConfirmationPopup } from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
+
export default {
name: 'OpenedQueueMemberCommunication',
- components: { CommunicationPopup },
+ components: { CommunicationPopup, DeleteConfirmationPopup },
mixins: [openedObjectTableTabMixin],
+ setup() {
+ const {
+ isVisible: isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ } = useDeleteConfirmationPopup();
+
+ return {
+ isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ };
+ },
data: () => ({
dataListValue: [],
searchValue: '',
diff --git a/src/modules/contact-center/modules/queues/modules/members/components/the-queue-members.vue b/src/modules/contact-center/modules/queues/modules/members/components/the-queue-members.vue
index 689e59e98..2ac24007c 100644
--- a/src/modules/contact-center/modules/queues/modules/members/components/the-queue-members.vue
+++ b/src/modules/contact-center/modules/queues/modules/members/components/the-queue-members.vue
@@ -45,9 +45,9 @@
/>
@@ -172,7 +172,10 @@
deleteData(item),
+ })"
/>
@@ -203,6 +206,9 @@ import TheQueueMembersFilters from '../modules/filters/components/the-queue-memb
import destinationsPopup from './communications/opened-queue-member-destinations-popup.vue';
import ResetPopup from './reset-members-popup.vue';
import uploadPopup from './upload-members-popup.vue';
+import DeleteConfirmationPopup
+ from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
+import { useDeleteConfirmationPopup } from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
export default {
name: 'TheQueueMembers',
@@ -212,8 +218,30 @@ export default {
destinationsPopup,
ResetPopup,
TheQueueMembersFilters,
+ DeleteConfirmationPopup,
},
mixins: [tableComponentMixin],
+
+ setup() {
+ const {
+ isVisible: isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ } = useDeleteConfirmationPopup();
+
+ return {
+ isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ };
+ },
+
data: () => ({
namespace: 'ccenter/queues/members',
isUploadPopup: false,
diff --git a/src/modules/contact-center/modules/resource-groups/components/the-resource-groups.vue b/src/modules/contact-center/modules/resource-groups/components/the-resource-groups.vue
index 461ecb15a..e2ecb2b81 100644
--- a/src/modules/contact-center/modules/resource-groups/components/the-resource-groups.vue
+++ b/src/modules/contact-center/modules/resource-groups/components/the-resource-groups.vue
@@ -11,9 +11,9 @@
@@ -38,7 +38,10 @@
v-if="hasDeleteAccess"
:class="{'hidden': anySelected}"
:selected-count="selectedRows.length"
- @click="callDelete(selectedRows)"
+ @click="askDeleteConfirmation({
+ deleted: selectedRows,
+ callback: () => deleteData(selectedRows),
+ })"
/>
@@ -90,7 +93,10 @@
v-if="hasDeleteAccess"
action="delete"
class="table-action"
- @click="callDelete(item)"
+ @click="askDeleteConfirmation({
+ deleted: [item],
+ callback: () => deleteData(item),
+ })"
/>
@@ -114,16 +120,37 @@
import { useDummy } from '../../../../../app/composables/useDummy';
import tableComponentMixin from '../../../../../app/mixins/objectPagesMixins/objectTableMixin/tableComponentMixin';
import RouteNames from '../../../../../app/router/_internals/RouteNames.enum';
+import DeleteConfirmationPopup
+ from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
+import { useDeleteConfirmationPopup } from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
const namespace = 'ccenter/resGroups';
export default {
name: 'TheResourceGroups',
+ components: { DeleteConfirmationPopup },
mixins: [tableComponentMixin],
setup() {
const { dummy } = useDummy({ namespace, showAction: true });
- return { dummy };
+ const {
+ isVisible: isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ } = useDeleteConfirmationPopup();
+
+ return {
+ dummy,
+ isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ };
},
data: () => ({
namespace,
diff --git a/src/modules/contact-center/modules/resource-groups/modules/resources/components/opened-resource-group-resources.vue b/src/modules/contact-center/modules/resource-groups/modules/resources/components/opened-resource-group-resources.vue
index 692cae4c1..20d716f8a 100644
--- a/src/modules/contact-center/modules/resource-groups/modules/resources/components/opened-resource-group-resources.vue
+++ b/src/modules/contact-center/modules/resource-groups/modules/resources/components/opened-resource-group-resources.vue
@@ -5,9 +5,9 @@
@close="closePopup"
/>
@@ -31,7 +31,10 @@
v-if="!disableUserInput"
:class="{'hidden': anySelected}"
:selected-count="selectedRows.length"
- @click="callDelete(selectedRows)"
+ @click="askDeleteConfirmation({
+ deleted: selectedRows,
+ callback: () => deleteData(selectedRows),
+ })"
/>
deleteData(item),
+ })"
/>
@@ -110,17 +116,37 @@ import { useDummy } from '../../../../../../../app/composables/useDummy';
import openedObjectTableTabMixin
from '../../../../../../../app/mixins/objectPagesMixins/openedObjectTableTabMixin/openedObjectTableTabMixin';
import ResPopup from './opened-resource-group-resource-popup.vue';
+import DeleteConfirmationPopup
+ from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
+import { useDeleteConfirmationPopup } from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
const namespace = 'ccenter/resGroups';
const subNamespace = 'res';
export default {
name: 'OpenedResourceGroupResources',
- components: { ResPopup },
+ components: { ResPopup, DeleteConfirmationPopup },
mixins: [openedObjectTableTabMixin],
setup() {
const { dummy } = useDummy({ namespace: `${namespace}/${subNamespace}`, hiddenText: true });
- return { dummy };
+ const {
+ isVisible: isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ } = useDeleteConfirmationPopup();
+
+ return {
+ dummy,
+ isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ };
},
data: () => ({
namespace,
diff --git a/src/modules/contact-center/modules/resources/components/the-resources.vue b/src/modules/contact-center/modules/resources/components/the-resources.vue
index 515b1765f..a56fdf387 100644
--- a/src/modules/contact-center/modules/resources/components/the-resources.vue
+++ b/src/modules/contact-center/modules/resources/components/the-resources.vue
@@ -11,9 +11,9 @@
@@ -38,7 +38,10 @@
v-if="hasDeleteAccess"
:class="{'hidden': anySelected}"
:selected-count="selectedRows.length"
- @click="callDelete(selectedRows)"
+ @click="askDeleteConfirmation({
+ deleted: selectedRows,
+ callback: () => deleteData(selectedRows),
+ })"
/>
@@ -92,7 +95,10 @@
v-if="hasDeleteAccess"
action="delete"
class="table-action"
- @click="callDelete(item)"
+ @click="askDeleteConfirmation({
+ deleted: [item],
+ callback: () => deleteData(item),
+ })"
/>
@@ -116,16 +122,37 @@
import { useDummy } from '../../../../../app/composables/useDummy';
import tableComponentMixin from '../../../../../app/mixins/objectPagesMixins/objectTableMixin/tableComponentMixin';
import RouteNames from '../../../../../app/router/_internals/RouteNames.enum';
+import DeleteConfirmationPopup
+ from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
+import { useDeleteConfirmationPopup } from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
const namespace = 'ccenter/res';
export default {
name: 'TheResources',
+ components: { DeleteConfirmationPopup },
mixins: [tableComponentMixin],
setup() {
const { dummy } = useDummy({ namespace, showAction: true });
- return { dummy };
+ const {
+ isVisible: isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ } = useDeleteConfirmationPopup();
+
+ return {
+ dummy,
+ isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ };
},
data: () => ({
namespace,
diff --git a/src/modules/contact-center/modules/resources/modules/display/components/opened-resource-numbers.vue b/src/modules/contact-center/modules/resources/modules/display/components/opened-resource-numbers.vue
index a058e5d1b..b0e108d90 100644
--- a/src/modules/contact-center/modules/resources/modules/display/components/opened-resource-numbers.vue
+++ b/src/modules/contact-center/modules/resources/modules/display/components/opened-resource-numbers.vue
@@ -5,9 +5,9 @@
@close="closePopup"
/>
@@ -31,7 +31,10 @@
v-if="!disableUserInput"
:class="{'hidden': anySelected}"
:selected-count="selectedRows.length"
- @click="callDelete(selectedRows)"
+ @click="askDeleteConfirmation({
+ deleted: selectedRows,
+ callback: () => deleteData(selectedRows),
+ })"
/>
deleteData(item),
+ })"
/>
@@ -95,19 +101,40 @@ import { useDummy } from '../../../../../../../app/composables/useDummy';
import openedObjectTableTabMixin
from '../../../../../../../app/mixins/objectPagesMixins/openedObjectTableTabMixin/openedObjectTableTabMixin';
import NumberPopup from './opened-resource-numbers-popup.vue';
+import DeleteConfirmationPopup
+ from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
+import { useDeleteConfirmationPopup } from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
const namespace = 'ccenter/res';
const subNamespace = 'numbers';
export default {
name: 'OpenedResourceNumber',
- components: { NumberPopup },
+ components: { NumberPopup, DeleteConfirmationPopup },
mixins: [openedObjectTableTabMixin],
setup() {
const { dummy } = useDummy({ namespace: `${namespace}/${subNamespace}`, hiddenText: true });
- return { dummy };
+ const {
+ isVisible: isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ } = useDeleteConfirmationPopup();
+
+ return {
+ dummy,
+ isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ };
},
+
data: () => ({
namespace,
subNamespace,
diff --git a/src/modules/contact-center/modules/teams/components/the-teams.vue b/src/modules/contact-center/modules/teams/components/the-teams.vue
index be6b58d4a..6b1b0c6b9 100644
--- a/src/modules/contact-center/modules/teams/components/the-teams.vue
+++ b/src/modules/contact-center/modules/teams/components/the-teams.vue
@@ -11,9 +11,9 @@
@@ -38,7 +38,10 @@
v-if="hasDeleteAccess"
:class="{'hidden': anySelected}"
:selected-count="selectedRows.length"
- @click="callDelete(selectedRows)"
+ @click="askDeleteConfirmation({
+ deleted: selectedRows,
+ callback: () => deleteData(selectedRows),
+ })"
/>
@@ -82,7 +85,10 @@
v-if="hasDeleteAccess"
action="delete"
class="table-action"
- @click="callDelete(item)"
+ @click="askDeleteConfirmation({
+ deleted: [item],
+ callback: () => deleteData(item),
+ })"
/>
@@ -107,16 +113,37 @@ import { kebabToCamel } from '@webitel/ui-sdk/src/scripts/caseConverters';
import { useDummy } from '../../../../../app/composables/useDummy';
import tableComponentMixin from '../../../../../app/mixins/objectPagesMixins/objectTableMixin/tableComponentMixin';
import RouteNames from '../../../../../app/router/_internals/RouteNames.enum';
+import DeleteConfirmationPopup
+ from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
+import { useDeleteConfirmationPopup } from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
const namespace = 'ccenter/teams';
export default {
name: 'TheTeams',
+ components: { DeleteConfirmationPopup },
mixins: [tableComponentMixin],
setup() {
const { dummy } = useDummy({ namespace, showAction: true });
- return { dummy };
+ const {
+ isVisible: isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ } = useDeleteConfirmationPopup();
+
+ return {
+ dummy,
+ isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ };
},
data: () => ({
namespace,
diff --git a/src/modules/contact-center/modules/teams/modules/agents/components/opened-team-agents.vue b/src/modules/contact-center/modules/teams/modules/agents/components/opened-team-agents.vue
index 1bee1cc36..c10a73482 100644
--- a/src/modules/contact-center/modules/teams/modules/agents/components/opened-team-agents.vue
+++ b/src/modules/contact-center/modules/teams/modules/agents/components/opened-team-agents.vue
@@ -5,9 +5,9 @@
@close="closePopup"
/>
deleteData(selectedRows),
+ })"
/>
deleteData(item),
+ })"
/>
@@ -137,18 +143,38 @@ import RouteNames from '../../../../../../../app/router/_internals/RouteNames.en
import agentStatusMixin from '../../../../../mixins/agentStatusMixin';
import agentSupervisorsAndSkillsPopupMixin from '../../../../../mixins/agentSupervisorsAndSkillsPopupMixin';
import AgentPopup from './opened-team-agent-popup.vue';
+import DeleteConfirmationPopup
+ from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
+import { useDeleteConfirmationPopup } from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
const namespace = 'ccenter/teams';
const subNamespace = 'agents';
export default {
name: 'OpenedTeamAgents',
- components: { AgentPopup, ObjectListPopup },
+ components: { AgentPopup, ObjectListPopup, DeleteConfirmationPopup },
mixins: [openedObjectTableTabMixin, agentSupervisorsAndSkillsPopupMixin, agentStatusMixin],
setup() {
const { dummy } = useDummy({ namespace: `${namespace}/${subNamespace}`, hiddenText: true });
- return { dummy };
+ const {
+ isVisible: isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ } = useDeleteConfirmationPopup();
+
+ return {
+ dummy,
+ isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ };
},
data: () => ({
namespace,
diff --git a/src/modules/contact-center/modules/teams/modules/supervisors/components/opened-team-supervisors.vue b/src/modules/contact-center/modules/teams/modules/supervisors/components/opened-team-supervisors.vue
index a227e0ea1..00678577d 100644
--- a/src/modules/contact-center/modules/teams/modules/supervisors/components/opened-team-supervisors.vue
+++ b/src/modules/contact-center/modules/teams/modules/supervisors/components/opened-team-supervisors.vue
@@ -10,9 +10,9 @@
@close="closeSubordinates"
/>
@@ -36,7 +36,10 @@
v-if="!disableUserInput"
:class="{'hidden': anySelected}"
:selected-count="selectedRows.length"
- @click="callDelete(selectedRows)"
+ @click="askDeleteConfirmation({
+ deleted: selectedRows,
+ callback: () => deleteData(selectedRows),
+ })"
/>
deleteData(item),
+ })"
/>
@@ -117,18 +123,42 @@ import openedObjectTableTabMixin
import RouteNames from '../../../../../../../app/router/_internals/RouteNames.enum';
import SupervisorSubordinatesPopup from './opened-team-supervisor-subordinates-popup.vue';
import SupervisorPopup from './opened-team-supervisors-popup.vue';
+import DeleteConfirmationPopup
+ from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
+import { useDeleteConfirmationPopup } from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
const namespace = 'ccenter/teams';
const subNamespace = 'supervisors';
export default {
name: 'OpenedTeamSupervisors',
- components: { SupervisorPopup, SupervisorSubordinatesPopup },
+ components: {
+ SupervisorPopup,
+ SupervisorSubordinatesPopup,
+ DeleteConfirmationPopup,
+ },
mixins: [openedObjectTableTabMixin],
setup() {
const { dummy } = useDummy({ namespace: `${namespace}/${subNamespace}`, hiddenText: true });
- return { dummy };
+ const {
+ isVisible: isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ } = useDeleteConfirmationPopup();
+
+ return {
+ dummy,
+ isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ };
},
data: () => ({
namespace,
diff --git a/src/modules/directory/modules/devices/components/the-devices.vue b/src/modules/directory/modules/devices/components/the-devices.vue
index 43618e2b8..55c35289a 100644
--- a/src/modules/directory/modules/devices/components/the-devices.vue
+++ b/src/modules/directory/modules/devices/components/the-devices.vue
@@ -30,9 +30,9 @@
/>
@@ -57,7 +57,10 @@
v-if="hasDeleteAccess"
:class="{'hidden': anySelected}"
:selected-count="selectedRows.length"
- @click="callDelete(selectedRows)"
+ @click="askDeleteConfirmation({
+ deleted: selectedRows,
+ callback: () => deleteData(selectedRows),
+ })"
/>
deleteData(item),
+ })"
/>
@@ -162,6 +168,9 @@ import RouteNames from '../../../../../app/router/_internals/RouteNames.enum';
import DevicePopup from './create-device-popup.vue';
import HistoryPopup from './device-history-popup.vue';
import UploadPopup from './upload-devices-popup.vue';
+import DeleteConfirmationPopup
+ from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
+import { useDeleteConfirmationPopup } from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
const namespace = 'directory/devices';
@@ -172,12 +181,30 @@ export default {
UploadPopup,
DevicePopup,
UploadFileIconBtn,
+ DeleteConfirmationPopup,
},
mixins: [tableComponentMixin],
setup() {
const { dummy } = useDummy({ namespace, showAction: true });
- return { dummy };
+ const {
+ isVisible: isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ } = useDeleteConfirmationPopup();
+
+ return {
+ dummy,
+ isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ };
},
data: () => ({
namespace,
diff --git a/src/modules/directory/modules/users/components/the-users.vue b/src/modules/directory/modules/users/components/the-users.vue
index 5be6dfb9d..d36045b91 100644
--- a/src/modules/directory/modules/users/components/the-users.vue
+++ b/src/modules/directory/modules/users/components/the-users.vue
@@ -18,9 +18,9 @@
@close="closeCSVPopup"
/>
@@ -45,7 +45,10 @@
v-if="hasDeleteAccess"
:class="{'hidden': anySelected}"
:selected-count="selectedRows.length"
- @click="callDelete(selectedRows)"
+ @click="askDeleteConfirmation({
+ deleted: selectedRows,
+ callback: () => deleteData(selectedRows),
+ })"
/>
deleteData(item),
+ })"
/>
@@ -134,17 +140,42 @@ import tableComponentMixin from '../../../../../app/mixins/objectPagesMixins/obj
import RouteNames from '../../../../../app/router/_internals/RouteNames.enum';
import UserStatus from './_internals/user-status-chips.vue';
import UploadPopup from './upload-users-popup.vue';
+import DeleteConfirmationPopup
+from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
+import { useDeleteConfirmationPopup } from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
const namespace = 'directory/users';
export default {
name: 'TheUsers',
- components: { UploadPopup, UserStatus, UploadFileIconBtn },
+ components: {
+ UploadPopup,
+ UserStatus,
+ UploadFileIconBtn,
+ DeleteConfirmationPopup
+ },
mixins: [tableComponentMixin],
setup() {
const { dummy } = useDummy({ namespace, hiddenText: true });
- return { dummy };
+ const {
+ isVisible: isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ } = useDeleteConfirmationPopup();
+
+ return {
+ dummy,
+ isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ };
},
data: () => ({
isUploadPopup: false,
diff --git a/src/modules/directory/modules/users/modules/tokens/components/opened-user-token.vue b/src/modules/directory/modules/users/modules/tokens/components/opened-user-token.vue
index 133185cac..689e042de 100644
--- a/src/modules/directory/modules/users/modules/tokens/components/opened-user-token.vue
+++ b/src/modules/directory/modules/users/modules/tokens/components/opened-user-token.vue
@@ -10,9 +10,9 @@
@close="closeTokenCreatedPopup"
/>
@@ -29,7 +29,10 @@
v-if="!disableUserInput"
:class="{'hidden': anySelected}"
:selected-count="selectedRows.length"
- @click="callDelete(selectedRows)"
+ @click="askDeleteConfirmation({
+ deleted: selectedRows,
+ callback: () => deleteData(selectedRows),
+ })"
/>
deleteData(item),
+ })"
/>
@@ -88,11 +94,39 @@ import openedObjectTableTabMixin
from '../../../../../../../app/mixins/objectPagesMixins/openedObjectTableTabMixin/openedObjectTableTabMixin';
import TokenCreatedPopup from './opened-user-token-created-popup.vue';
import TokenPopup from './opened-user-token-popup.vue';
+import DeleteConfirmationPopup
+ from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
+import { useDeleteConfirmationPopup } from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
export default {
name: 'OpenedUserTokens',
- components: { TokenPopup, TokenCreatedPopup },
+ components: {
+ TokenPopup,
+ TokenCreatedPopup,
+ DeleteConfirmationPopup,
+ },
mixins: [openedObjectTableTabMixin],
+
+ setup() {
+ const {
+ isVisible: isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ } = useDeleteConfirmationPopup();
+
+ return {
+ isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ };
+ },
+
data: () => ({
subNamespace: 'tokens',
isPopup: false,
diff --git a/src/modules/integrations/modules/cognitive-profiles/components/the-cognitive-profiles.vue b/src/modules/integrations/modules/cognitive-profiles/components/the-cognitive-profiles.vue
index b60f9c3b7..d4c5a30f7 100644
--- a/src/modules/integrations/modules/cognitive-profiles/components/the-cognitive-profiles.vue
+++ b/src/modules/integrations/modules/cognitive-profiles/components/the-cognitive-profiles.vue
@@ -15,9 +15,9 @@
@close="isCognitiveProfilePopup = false"
/>
@@ -47,7 +47,10 @@
v-if="hasDeleteAccess"
:class="{'hidden': anySelected}"
:selected-count="selectedRows.length"
- @click="callDelete(selectedRows)"
+ @click="askDeleteConfirmation({
+ deleted: selectedRows,
+ callback: () => deleteData(selectedRows),
+ })"
/>
@@ -109,7 +112,10 @@
v-if="hasDeleteAccess"
action="delete"
class="table-action"
- @click="callDelete(item)"
+ @click="askDeleteConfirmation({
+ deleted: [item],
+ callback: () => deleteData(item),
+ })"
/>
@@ -135,6 +141,9 @@ import tableComponentMixin from '../../../../../app/mixins/objectPagesMixins/obj
import RouteNames from '../../../../../app/router/_internals/RouteNames.enum';
import dummyPic from '../assets/adm-dummy-cognitive-profiles.svg';
import CreateCognitiveProfilePopup from './create-cognitive-profile-popup.vue';
+import DeleteConfirmationPopup
+ from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
+import { useDeleteConfirmationPopup } from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
const namespace = 'integrations/cognitiveProfiles';
@@ -142,6 +151,7 @@ export default {
name: 'TheCognitiveProfiles',
components: {
CreateCognitiveProfilePopup,
+ DeleteConfirmationPopup,
},
mixins: [tableComponentMixin],
@@ -152,7 +162,24 @@ export default {
dummyPic,
dummyText: 'objects.integrations.emptyWorkspace',
});
- return { dummy };
+ const {
+ isVisible: isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ } = useDeleteConfirmationPopup();
+
+ return {
+ dummy,
+ isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ };
},
data: () => ({
namespace,
diff --git a/src/modules/integrations/modules/email-profiles/components/the-email-profiles.vue b/src/modules/integrations/modules/email-profiles/components/the-email-profiles.vue
index 3647150a3..dd277c691 100644
--- a/src/modules/integrations/modules/email-profiles/components/the-email-profiles.vue
+++ b/src/modules/integrations/modules/email-profiles/components/the-email-profiles.vue
@@ -11,9 +11,9 @@
@@ -43,7 +43,10 @@
v-if="hasDeleteAccess"
:class="{'hidden': anySelected}"
:selected-count="selectedRows.length"
- @click="callDelete(selectedRows)"
+ @click="askDeleteConfirmation({
+ deleted: selectedRows,
+ callback: () => deleteData(selectedRows),
+ })"
/>
@@ -96,7 +99,10 @@
v-if="hasDeleteAccess"
action="delete"
class="table-action"
- @click="callDelete(item)"
+ @click="askDeleteConfirmation({
+ deleted: [item],
+ callback: () => deleteData(item),
+ })"
/>
@@ -121,11 +127,15 @@ import { useDummy } from '../../../../../app/composables/useDummy';
import tableComponentMixin from '../../../../../app/mixins/objectPagesMixins/objectTableMixin/tableComponentMixin';
import RouteNames from '../../../../../app/router/_internals/RouteNames.enum';
import dummyPic from '../assets/adm-dummy-email-profile.svg';
+import DeleteConfirmationPopup
+ from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
+import { useDeleteConfirmationPopup } from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
const namespace = 'integrations/emailProfiles';
export default {
name: 'TheEmailProfiles',
+ components: { DeleteConfirmationPopup },
mixins: [tableComponentMixin],
setup() {
@@ -135,7 +145,24 @@ export default {
dummyPic,
dummyText: 'objects.integrations.emptyWorkspace',
});
- return { dummy };
+ const {
+ isVisible: isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ } = useDeleteConfirmationPopup();
+
+ return {
+ dummy,
+ isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ };
},
data: () => ({
namespace,
diff --git a/src/modules/integrations/modules/import-csv/components/the-import-csv.vue b/src/modules/integrations/modules/import-csv/components/the-import-csv.vue
index 59cb52532..759ceae6e 100644
--- a/src/modules/integrations/modules/import-csv/components/the-import-csv.vue
+++ b/src/modules/integrations/modules/import-csv/components/the-import-csv.vue
@@ -11,9 +11,9 @@
@@ -38,7 +38,10 @@
v-if="hasDeleteAccess"
:class="{'hidden': anySelected}"
:selected-count="selectedRows.length"
- @click="callDelete(selectedRows)"
+ @click="askDeleteConfirmation({
+ deleted: selectedRows,
+ callback: () => deleteData(selectedRows),
+ })"
/>
@@ -92,7 +95,10 @@
v-if="hasDeleteAccess"
action="delete"
class="table-action"
- @click="callDelete(item)"
+ @click="askDeleteConfirmation({
+ deleted: [item],
+ callback: () => deleteData(item),
+ })"
/>
@@ -117,17 +123,37 @@ import { useDummy } from '../../../../../app/composables/useDummy';
import tableComponentMixin from '../../../../../app/mixins/objectPagesMixins/objectTableMixin/tableComponentMixin';
import RouteNames from '../../../../../app/router/_internals/RouteNames.enum';
import UploadAction from './import-csv-upload-action.vue';
+import DeleteConfirmationPopup
+ from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
+import { useDeleteConfirmationPopup } from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
const namespace = 'integrations/importCsv';
export default {
name: 'TheImportCsv',
- components: { UploadAction },
+ components: { UploadAction, DeleteConfirmationPopup },
mixins: [tableComponentMixin],
setup() {
const { dummy } = useDummy({ namespace, showAction: true });
- return { dummy };
+ const {
+ isVisible: isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ } = useDeleteConfirmationPopup();
+
+ return {
+ dummy,
+ isDeleteConfirmationPopup,
+ deleteCount,
+ deleteCallback,
+
+ askDeleteConfirmation,
+ closeDelete,
+ };
},
data: () => ({
namespace,
diff --git a/src/modules/integrations/modules/single-sign-on/components/the-single-sign-on.vue b/src/modules/integrations/modules/single-sign-on/components/the-single-sign-on.vue
index 4e6fec478..6626de41d 100644
--- a/src/modules/integrations/modules/single-sign-on/components/the-single-sign-on.vue
+++ b/src/modules/integrations/modules/single-sign-on/components/the-single-sign-on.vue
@@ -11,9 +11,9 @@
@@ -38,7 +38,10 @@
v-if="hasDeleteAccess"
:class="{'hidden': anySelected}"
:selected-count="selectedRows.length"
- @click="callDelete(selectedRows)"
+ @click="askDeleteConfirmation({
+ deleted: selectedRows,
+ callback: () => deleteData(selectedRows),
+ })"
>
@@ -77,7 +80,10 @@
v-if="hasDeleteAccess"
action="delete"
class="table-action"
- @click="callDelete(item)"
+ @click="askDeleteConfirmation({
+ deleted: [item],
+ callback: () => deleteData(item),
+ })"
>
@@ -100,10 +106,33 @@