From d17fe16545ec86e1670b87fc7b1468297dbe7d70 Mon Sep 17 00:00:00 2001 From: Avery Lee Date: Fri, 22 Sep 2023 13:43:13 -0700 Subject: [PATCH] Removes success toast after resource creation. --- src/dispatch/static/dispatch/src/case/store.js | 18 +++++------------- .../static/dispatch/src/incident/store.js | 18 +++++------------- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/src/dispatch/static/dispatch/src/case/store.js b/src/dispatch/static/dispatch/src/case/store.js index 25f94a8130a8..bf87f96c5473 100644 --- a/src/dispatch/static/dispatch/src/case/store.js +++ b/src/dispatch/static/dispatch/src/case/store.js @@ -256,20 +256,12 @@ const actions = { }, createAllResources({ commit }) { commit("SET_SELECTED_LOADING", true) - return CaseApi.createAllResources(state.selected.id) - .then(function () { - commit( - "notification_backend/addBeNotification", - { text: "Case resource(s) created successfully.", type: "success" }, - { root: true } - ) - }) - .finally(() => { - CaseApi.get(state.selected.id).then((response) => { - commit("SET_SELECTED", response.data) - }) - commit("SET_SELECTED_LOADING", false) + return CaseApi.createAllResources(state.selected.id).then(() => { + CaseApi.get(state.selected.id).then((response) => { + commit("SET_SELECTED", response.data) }) + commit("SET_SELECTED_LOADING", false) + }) }, save({ commit, dispatch }) { commit("SET_SELECTED_LOADING", true) diff --git a/src/dispatch/static/dispatch/src/incident/store.js b/src/dispatch/static/dispatch/src/incident/store.js index a7559808cdd9..ac90973ed8cd 100644 --- a/src/dispatch/static/dispatch/src/incident/store.js +++ b/src/dispatch/static/dispatch/src/incident/store.js @@ -348,20 +348,12 @@ const actions = { }, createAllResources({ commit }) { commit("SET_SELECTED_LOADING", true) - return IncidentApi.createAllResources(state.selected.id) - .then(function () { - commit( - "notification_backend/addBeNotification", - { text: "Incident resource(s) created successfully.", type: "success" }, - { root: true } - ) - }) - .finally(() => { - IncidentApi.get(state.selected.id).then((response) => { - commit("SET_SELECTED", response.data) - }) - commit("SET_SELECTED_LOADING", false) + return IncidentApi.createAllResources(state.selected.id).then(() => { + IncidentApi.get(state.selected.id).then((response) => { + commit("SET_SELECTED", response.data) }) + commit("SET_SELECTED_LOADING", false) + }) }, resetSelected({ commit }) { commit("RESET_SELECTED")