From 5e55ac9d43f446622820171decb14a9441d9452c Mon Sep 17 00:00:00 2001 From: Avery Lee Date: Thu, 21 Sep 2023 17:03:15 -0700 Subject: [PATCH] Changes in client-side incident updates. --- .../static/dispatch/src/case/ResourcesTab.vue | 7 +++---- src/dispatch/static/dispatch/src/case/store.js | 13 ++++--------- .../static/dispatch/src/incident/ResourcesTab.vue | 6 +++--- src/dispatch/static/dispatch/src/incident/store.js | 13 ++++--------- 4 files changed, 14 insertions(+), 25 deletions(-) diff --git a/src/dispatch/static/dispatch/src/case/ResourcesTab.vue b/src/dispatch/static/dispatch/src/case/ResourcesTab.vue index 45fb22fb42cd..5c60faa6a25b 100644 --- a/src/dispatch/static/dispatch/src/case/ResourcesTab.vue +++ b/src/dispatch/static/dispatch/src/case/ResourcesTab.vue @@ -120,13 +120,12 @@ export default { computed: { ...mapFields("case_management", [ - "selected", + "selected.conversation", "selected.documents", "selected.groups", + "selected.loading", "selected.storage", "selected.ticket", - "selected.conversation", - "selected.loading", ]), }, @@ -134,8 +133,8 @@ export default { let enabledPlugins = await this.getEnabledPlugins() this.ticketPluginEnabled = enabledPlugins.includes("ticket") - this.conferencePluginEnabled = enabledPlugins.includes("conference") this.groupPluginEnabled = enabledPlugins.includes("participant-group") + this.conversationPluginEnabled = enabledPlugins.includes("conversation") this.storagePluginEnabled = enabledPlugins.includes("storage") this.documentPluginEnabled = enabledPlugins.includes("document") }, diff --git a/src/dispatch/static/dispatch/src/case/store.js b/src/dispatch/static/dispatch/src/case/store.js index 786318001b9e..25f94a8130a8 100644 --- a/src/dispatch/static/dispatch/src/case/store.js +++ b/src/dispatch/static/dispatch/src/case/store.js @@ -254,7 +254,7 @@ const actions = { commit("SET_SELECTED_LOADING", false) }) }, - createAllResources({ commit, dispatch }) { + createAllResources({ commit }) { commit("SET_SELECTED_LOADING", true) return CaseApi.createAllResources(state.selected.id) .then(function () { @@ -264,15 +264,10 @@ const actions = { { root: true } ) }) - .catch(() => { - commit( - "notification_backend/addBeNotification", - { text: "No case resources created.", type: "error" }, - { root: true } - ) - }) .finally(() => { - dispatch("get") + CaseApi.get(state.selected.id).then((response) => { + commit("SET_SELECTED", response.data) + }) commit("SET_SELECTED_LOADING", false) }) }, diff --git a/src/dispatch/static/dispatch/src/incident/ResourcesTab.vue b/src/dispatch/static/dispatch/src/incident/ResourcesTab.vue index 3b28a0ead0d4..d390622bd1ca 100644 --- a/src/dispatch/static/dispatch/src/incident/ResourcesTab.vue +++ b/src/dispatch/static/dispatch/src/incident/ResourcesTab.vue @@ -117,12 +117,12 @@ export default { computed: { ...mapFields("incident", [ - "selected.ticket", - "selected.storage", - "selected.documents", "selected.conference", "selected.conversation", + "selected.documents", "selected.loading", + "selected.storage", + "selected.ticket", ]), }, diff --git a/src/dispatch/static/dispatch/src/incident/store.js b/src/dispatch/static/dispatch/src/incident/store.js index f461181142a3..a7559808cdd9 100644 --- a/src/dispatch/static/dispatch/src/incident/store.js +++ b/src/dispatch/static/dispatch/src/incident/store.js @@ -346,7 +346,7 @@ const actions = { ) }) }, - createAllResources({ commit, dispatch }) { + createAllResources({ commit }) { commit("SET_SELECTED_LOADING", true) return IncidentApi.createAllResources(state.selected.id) .then(function () { @@ -356,15 +356,10 @@ const actions = { { root: true } ) }) - .catch(() => { - commit( - "notification_backend/addBeNotification", - { text: "No incident resources created.", type: "error" }, - { root: true } - ) - }) .finally(() => { - dispatch("get") + IncidentApi.get(state.selected.id).then((response) => { + commit("SET_SELECTED", response.data) + }) commit("SET_SELECTED_LOADING", false) }) },