Skip to content

Commit

Permalink
Changes in client-side incident updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
metroid-samus committed Sep 22, 2023
1 parent 5d6f572 commit 5e55ac9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 25 deletions.
7 changes: 3 additions & 4 deletions src/dispatch/static/dispatch/src/case/ResourcesTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,22 +120,21 @@ export default {
computed: {
...mapFields("case_management", [
"selected",
"selected.conversation",
"selected.documents",
"selected.groups",
"selected.loading",
"selected.storage",
"selected.ticket",
"selected.conversation",
"selected.loading",
]),
},
async mounted() {
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")
},
Expand Down
13 changes: 4 additions & 9 deletions src/dispatch/static/dispatch/src/case/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand All @@ -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)
})
},
Expand Down
6 changes: 3 additions & 3 deletions src/dispatch/static/dispatch/src/incident/ResourcesTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]),
},
Expand Down
13 changes: 4 additions & 9 deletions src/dispatch/static/dispatch/src/incident/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ const actions = {
)
})
},
createAllResources({ commit, dispatch }) {
createAllResources({ commit }) {
commit("SET_SELECTED_LOADING", true)
return IncidentApi.createAllResources(state.selected.id)
.then(function () {
Expand All @@ -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)
})
},
Expand Down

0 comments on commit 5e55ac9

Please sign in to comment.