Skip to content

Commit

Permalink
Merge pull request #682 from webitel/hotfix/team-agents-tab
Browse files Browse the repository at this point in the history
Hotfix/team agents tab [WTEL-4585]
  • Loading branch information
dlohvinov authored Jun 11, 2024
2 parents c71cb61 + 025ed7e commit 5311a01
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@close="close"
>
<template #title>
{{ popupTitle }}
{{ $t('objects.ccenter.teams.agents.addAgent') }}
</template>
<template #main>
<form>
Expand Down Expand Up @@ -59,13 +59,6 @@ export default {
agent: { required },
},
},
computed: {
popupTitle() {
return this.id
? this.$t('objects.ccenter.teams.agents.editAgent')
: this.$t('objects.ccenter.teams.agents.addAgent');
},
},
methods: {
loadAgentsOptions(params) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
v-if="isAgentPopup"
@close="closePopup"
/>
<delete-confirmation-popup
v-show="isDeleteConfirmationPopup"
:delete-count="deleteCount"
:callback="deleteCallback"
@close="closeDelete"
/>
<object-list-popup
v-if="isSupervisorPopup"
:data-list="openedItemSupervisors"
Expand Down Expand Up @@ -41,15 +35,6 @@
:icons="['refresh']"
@input="tableActionsHandler"
>
<delete-all-action
v-if="!disableUserInput"
:class="{'hidden': anySelected}"
:selected-count="selectedRows.length"
@click="askDeleteConfirmation({
deleted: selectedRows,
callback: () => deleteData(selectedRows),
})"
/>
<wt-icon-btn
v-if="!disableUserInput"
class="icon-action"
Expand All @@ -76,6 +61,7 @@
:data="dataList"
:grid-actions="!disableUserInput"
:headers="headers"
:selectable="false"
sortable
@sort="sort"
>
Expand Down Expand Up @@ -105,20 +91,6 @@
@input="readSkills(item)"
/>
</template>
<template #actions="{ item }">
<wt-icon-action
action="edit"
@click="edit(item)"
/>
<wt-icon-action
action="delete"
class="table-action"
@click="askDeleteConfirmation({
deleted: [item],
callback: () => deleteData(item),
})"
/>
</template>
</wt-table>
<wt-pagination
:next="isNext"
Expand All @@ -143,39 +115,19 @@ import openedObjectTableTabMixin
import RouteNames from '../../../../../../../app/router/_internals/RouteNames.enum';
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';
import AgentPopup from './create-team-agent-popup.vue';
const namespace = 'ccenter/teams';
const subNamespace = 'agents';
export default {
name: 'OpenedTeamAgents',
components: { AgentPopup, ObjectListPopup, DeleteConfirmationPopup },
components: { AgentPopup, ObjectListPopup },
mixins: [openedObjectTableTabMixin, agentSupervisorsAndSkillsPopupMixin, agentStatusMixin],
setup() {
const { dummy } = useDummy({ namespace: `${namespace}/${subNamespace}`, hiddenText: true });
const {
isVisible: isDeleteConfirmationPopup,
deleteCount,
deleteCallback,
askDeleteConfirmation,
closeDelete,
} = useDeleteConfirmationPopup();
return {
dummy,
isDeleteConfirmationPopup,
deleteCount,
deleteCallback,
askDeleteConfirmation,
closeDelete,
};
return { dummy };
},
data: () => ({
namespace,
Expand Down

0 comments on commit 5311a01

Please sign in to comment.