mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 19:44:59 +03:00
Fix current space selection on page load (#927)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
f01f30fc1d
commit
f2402c3208
@ -17,7 +17,8 @@
|
||||
import core, { Client, getCurrentAccount, Ref, Space } from '@anticrm/core'
|
||||
import { Avatar, createQuery, setClient } from '@anticrm/presentation'
|
||||
import {
|
||||
AnyComponent, closeTooltip,
|
||||
AnyComponent,
|
||||
closeTooltip,
|
||||
Component,
|
||||
getCurrentLocation,
|
||||
location,
|
||||
@ -69,7 +70,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
updateSpace(currentSpace)
|
||||
updateSpace(currentFolder)
|
||||
})
|
||||
)
|
||||
|
||||
@ -143,20 +144,31 @@
|
||||
let employee: Employee | undefined
|
||||
const accountQ = createQuery()
|
||||
const employeeQ = createQuery()
|
||||
$: accountQ.query(contact.class.EmployeeAccount, {
|
||||
$: accountQ.query(
|
||||
contact.class.EmployeeAccount,
|
||||
{
|
||||
_id: getCurrentAccount()._id as Ref<EmployeeAccount>
|
||||
}, (res) => {
|
||||
},
|
||||
(res) => {
|
||||
account = res[0]
|
||||
}, { limit: 1 })
|
||||
},
|
||||
{ limit: 1 }
|
||||
)
|
||||
|
||||
$: account && employeeQ.query(contact.class.Employee, {
|
||||
$: account &&
|
||||
employeeQ.query(
|
||||
contact.class.Employee,
|
||||
{
|
||||
_id: account.employee
|
||||
}, (res) => {
|
||||
},
|
||||
(res) => {
|
||||
employee = res[0]
|
||||
}, { limit: 1 })
|
||||
},
|
||||
{ limit: 1 }
|
||||
)
|
||||
|
||||
let isNavigate: boolean = false
|
||||
$: isNavigate = navigatorModel ? true : false
|
||||
$: isNavigate = !!navigatorModel
|
||||
</script>
|
||||
|
||||
{#if client}
|
||||
|
Loading…
Reference in New Issue
Block a user