mirror of
https://github.com/lingble/chatwoot.git
synced 2025-10-29 18:22:53 +00:00
Bug: Force fetch inbox settings on route change (#400)
This commit is contained in:
@@ -104,16 +104,27 @@ export default {
|
||||
return createMessengerScript(this.inbox.page_id);
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
$route(to) {
|
||||
if (to.name === 'settings_inbox_show') {
|
||||
this.fetchInboxSettings();
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch('agents/get');
|
||||
this.$store.dispatch('inboxes/get').then(() => {
|
||||
this.fetchAttachedAgents();
|
||||
});
|
||||
this.fetchInboxSettings();
|
||||
},
|
||||
methods: {
|
||||
showAlert(message) {
|
||||
bus.$emit('newToastMessage', message);
|
||||
},
|
||||
fetchInboxSettings() {
|
||||
this.selectedAgents = [];
|
||||
this.$store.dispatch('agents/get');
|
||||
this.$store.dispatch('inboxes/get').then(() => {
|
||||
this.fetchAttachedAgents();
|
||||
});
|
||||
},
|
||||
async fetchAttachedAgents() {
|
||||
try {
|
||||
const response = await this.$store.dispatch('inboxMembers/get', {
|
||||
|
||||
Reference in New Issue
Block a user