From 250704493ddfd265fb431fe919a956f8bbbaf4bf Mon Sep 17 00:00:00 2001 From: Wilfred Asomani Date: Fri, 19 May 2023 17:06:28 +0000 Subject: [PATCH] web/satellite: fix frozen status banners not showing This change moves the call to fetch user's frozen status into the getUser store action. It fixes an issue where the froze status banners will not show. Change-Id: I1a1853d5a89502e294848ceb6a8566120ecd4c10 --- web/satellite/src/store/modules/usersStore.ts | 6 +----- web/satellite/src/views/DashboardArea.vue | 1 - web/satellite/src/views/all-dashboard/AllDashboardArea.vue | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/web/satellite/src/store/modules/usersStore.ts b/web/satellite/src/store/modules/usersStore.ts index 9077783b2..688c9a0fd 100644 --- a/web/satellite/src/store/modules/usersStore.ts +++ b/web/satellite/src/store/modules/usersStore.ts @@ -46,15 +46,12 @@ export const useUsersStore = defineStore('users', () => { const configStore = useConfigStore(); const user = await api.get(); + user.freezeStatus = await api.getFrozenStatus(); user.projectLimit ||= configStore.state.config.defaultProjectLimit; setUser(user); } - async function getFrozenStatus(): Promise { - state.user.freezeStatus = await api.getFrozenStatus(); - } - async function disableUserMFA(request: DisableMFARequest): Promise { await api.disableUserMFA(request.passcode, request.recoveryCode); } @@ -112,7 +109,6 @@ export const useUsersStore = defineStore('users', () => { generateUserMFARecoveryCodes, clear, login, - getFrozenStatus, setUser, updateSettings, getSettings, diff --git a/web/satellite/src/views/DashboardArea.vue b/web/satellite/src/views/DashboardArea.vue index b43ff2f96..7846069e5 100644 --- a/web/satellite/src/views/DashboardArea.vue +++ b/web/satellite/src/views/DashboardArea.vue @@ -728,7 +728,6 @@ onMounted(async () => { try { await Promise.all([ usersStore.getUser(), - usersStore.getFrozenStatus(), abTestingStore.fetchValues(), usersStore.getSettings(), ]); diff --git a/web/satellite/src/views/all-dashboard/AllDashboardArea.vue b/web/satellite/src/views/all-dashboard/AllDashboardArea.vue index 91436a7a1..915f3f9d7 100644 --- a/web/satellite/src/views/all-dashboard/AllDashboardArea.vue +++ b/web/satellite/src/views/all-dashboard/AllDashboardArea.vue @@ -615,7 +615,6 @@ onMounted(async () => { try { await Promise.all([ usersStore.getUser(), - usersStore.getFrozenStatus(), abTestingStore.fetchValues(), usersStore.getSettings(), ]);