Skip to content

Commit

Permalink
Merge pull request #776 from webitel/fix/agent-skill-popup-close
Browse files Browse the repository at this point in the history
fix: fixing popup closing [WTEL-5105]
  • Loading branch information
VladimirBeria authored Sep 18, 2024
2 parents 0b7e002 + 652ae43 commit 89bc77c
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/>
<config-agent-skill-popup
v-if="isAgentConfigSkillPopup"
@back="handleSkillConfigBack"
@back="handlePopupClose"
@cancel="cancel"
@select="handleSkillConfigSelect"
/>
Expand Down Expand Up @@ -46,6 +46,7 @@ const itemInstance = reactive({
const isAssign = computed(() => route.query.assign); //For popup tooling
function cancel() {
handlePopupClose();
emit('close');
}
Expand All @@ -67,7 +68,7 @@ function handleSelectAgents(agentIds) {
isAgentConfigSkillPopup.value = true;
}
function handleSkillConfigBack() {
function handlePopupClose() {
itemInstance.agent = [];
isAgentConfigSkillPopup.value = false;
isSelectAgentsPopup.value = true;
Expand All @@ -77,7 +78,7 @@ async function handleSkillConfigSelect({ capacity, enabled }) {
itemInstance.capacity = capacity;
itemInstance.enabled = enabled;
await handleSave(itemInstance);
handleSkillConfigBack(); // It because we don`t use v-if on this popup in parent component
handlePopupClose(); // It because we don`t use v-if on this popup in parent component
emit('saved');
emit('close');
}
Expand Down

0 comments on commit 89bc77c

Please sign in to comment.