Skip to content

Commit cb4fea9

Browse files
committed
Update logic to reset integrations store
1 parent 8bdd421 commit cb4fea9

File tree

4 files changed

+5
-13
lines changed

4 files changed

+5
-13
lines changed

frontend/src/modules/auth/store/actions.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { router } from '@/router'
88
import { tenantSubdomain } from '@/modules/tenant/tenant-subdomain'
99
import AuthCurrentTenant from '@/modules/auth/auth-current-tenant'
1010
import { TenantService } from '@/modules/tenant/tenant-service'
11+
import { buildInitialState, store } from '@/store'
1112

1213
export default {
1314
async doInit({ commit, dispatch }) {
@@ -247,6 +248,10 @@ export default {
247248
AuthCurrentTenant.set(tenant)
248249
await dispatch('doRefreshCurrentUser')
249250

251+
const initialState = buildInitialState(true)
252+
253+
store.replaceState(initialState)
254+
250255
router.push('/')
251256
},
252257

frontend/src/modules/integration/components/integration-list-item.vue

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ import {
9191
defineProps,
9292
computed,
9393
ref,
94-
onMounted,
9594
onUnmounted
9695
} from 'vue'
9796
import AppIntegrationConnect from '@/modules/integration/components/integration-connect'
@@ -158,10 +157,6 @@ const integrationInProgressInterval = setInterval(
158157
10000
159158
)
160159
161-
onMounted(async () => {
162-
await fetchIntegrationInProgress()
163-
})
164-
165160
onUnmounted(() => {
166161
clearInterval(integrationInProgressInterval)
167162
})

frontend/src/modules/integration/integration-store.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -328,12 +328,6 @@ export default {
328328
Errors.handle(error)
329329
commit('CREATE_ERROR')
330330
}
331-
},
332-
333-
doReset({ state }) {
334-
state.byId = {}
335-
state.allIds.splice(0)
336-
state.count = 0
337331
}
338332
}
339333
}

frontend/src/modules/layout/components/workspace-dropdown.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,6 @@ function doManageWorkspaces() {
190190
async function doSwitchTenant(tenant) {
191191
isDropdownOpen.value = false
192192
await store.dispatch('auth/doSelectTenant', tenant)
193-
await store.dispatch('integration/doReset')
194-
await store.dispatch('integration/doFetch')
195193
}
196194
197195
function planLabelOf(plan) {

0 commit comments

Comments
 (0)