mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-23 08:48:01 +00:00
Fixed workbench workspaces load (#2433)
This commit is contained in:
parent
130a19daa9
commit
8093875c64
@ -29,14 +29,18 @@
|
|||||||
|
|
||||||
export let workspaces: Workspace[]
|
export let workspaces: Workspace[]
|
||||||
|
|
||||||
|
let _workspaces: Workspace[] = []
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
if (workspaces.length === 0) {
|
if (workspaces.length === 0) {
|
||||||
getWorkspaces().then((ws: Workspace[]) => (workspaces = ws))
|
getWorkspaces().then((ws: Workspace[]) => (_workspaces = ws))
|
||||||
|
} else {
|
||||||
|
_workspaces = workspaces
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
$: actions = [
|
$: actions = [
|
||||||
...workspaces.map((w) => ({
|
..._workspaces.map((w) => ({
|
||||||
label: getEmbeddedLabel(w.workspace),
|
label: getEmbeddedLabel(w.workspace),
|
||||||
action: async () => {
|
action: async () => {
|
||||||
const loginInfo = (await selectWorkspace(w.workspace))[1]
|
const loginInfo = (await selectWorkspace(w.workspace))[1]
|
||||||
|
Loading…
Reference in New Issue
Block a user