mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-02 21:33:07 +00:00
uberf-9385: fix select workspace redirects (#7942)
Some checks are pending
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
Some checks are pending
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
parent
1dd22f85c5
commit
7df63cfd57
@ -48,12 +48,14 @@
|
||||
|
||||
let workspaces: WorkspaceInfoWithStatus[] = []
|
||||
let status = OK
|
||||
let accountPromise: Promise<LoginInfo | null>
|
||||
let account: LoginInfo | null | undefined = undefined
|
||||
|
||||
let flagToUpdateWorkspaces = false
|
||||
|
||||
async function loadAccount (): Promise<void> {
|
||||
account = await getAccount()
|
||||
accountPromise = getAccount()
|
||||
account = await accountPromise
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
@ -101,6 +103,7 @@
|
||||
try {
|
||||
const res = await getWorkspaces()
|
||||
|
||||
await accountPromise
|
||||
if (res.length === 0 && account?.token == null) {
|
||||
goTo('confirmationSend')
|
||||
}
|
||||
|
@ -64,9 +64,10 @@
|
||||
const leaveWorkspace = await getResource(login.function.LeaveWorkspace)
|
||||
const loginInfo = await leaveWorkspace(getCurrentAccount().uuid)
|
||||
|
||||
const loc = getCurrentLocation()
|
||||
clearMetadata(loc.path[1])
|
||||
|
||||
if (loginInfo?.token != null) {
|
||||
const loc = getCurrentLocation()
|
||||
clearMetadata(loc.path[1])
|
||||
setMetadata(presentation.metadata.Token, loginInfo.token)
|
||||
setMetadataLocalStorage(login.metadata.LastToken, loginInfo.token)
|
||||
setMetadataLocalStorage(login.metadata.LoginAccount, loginInfo.account)
|
||||
|
Loading…
Reference in New Issue
Block a user