bug: Bulk actions Assign agent is not working (#6568)

This commit is contained in:
Sivin Varghese 2023-03-01 10:53:40 +05:30 committed by GitHub
parent d4e7eaecce
commit 0a993978ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
<template> <template>
<div v-on-clickaway="onClose" class="bulk-action__agents"> <div v-on-clickaway="onCloseAgentList" class="bulk-action__agents">
<div class="triangle" :style="cssVars"> <div class="triangle" :style="cssVars">
<svg height="12" viewBox="0 0 24 12" width="24"> <svg height="12" viewBox="0 0 24 12" width="24">
<path <path
@ -126,6 +126,7 @@ export default {
return { return {
query: '', query: '',
selectedAgent: null, selectedAgent: null,
goBackToAgentList: false,
}; };
}, },
computed: { computed: {
@ -169,6 +170,7 @@ export default {
this.$emit('select', this.selectedAgent); this.$emit('select', this.selectedAgent);
}, },
goBack() { goBack() {
this.goBackToAgentList = true;
this.selectedAgent = null; this.selectedAgent = null;
}, },
assignAgent(agent) { assignAgent(agent) {
@ -177,6 +179,12 @@ export default {
onClose() { onClose() {
this.$emit('close'); this.$emit('close');
}, },
onCloseAgentList() {
if (this.selectedAgent === null && !this.goBackToAgentList) {
this.onClose();
}
this.goBackToAgentList = false;
},
}, },
}; };
</script> </script>