mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-15 04:49:00 +00:00
Fix_HiddenApplication_query (#4312)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
b4089c47d4
commit
2ecfa4c70c
@ -19,6 +19,7 @@
|
|||||||
import workbench from '@hcengineering/workbench'
|
import workbench from '@hcengineering/workbench'
|
||||||
import { hideApplication, showApplication } from '../utils'
|
import { hideApplication, showApplication } from '../utils'
|
||||||
import { Loading, IconCheck, Label, Icon } from '@hcengineering/ui'
|
import { Loading, IconCheck, Label, Icon } from '@hcengineering/ui'
|
||||||
|
import preference from '@hcengineering/preference'
|
||||||
// import Drag from './icons/Drag.svelte'
|
// import Drag from './icons/Drag.svelte'
|
||||||
|
|
||||||
export let apps: Application[] = []
|
export let apps: Application[] = []
|
||||||
@ -55,10 +56,16 @@
|
|||||||
let loaded: boolean = false
|
let loaded: boolean = false
|
||||||
let hiddenAppsIds: Array<Ref<Application>> = []
|
let hiddenAppsIds: Array<Ref<Application>> = []
|
||||||
const hiddenAppsIdsQuery = createQuery()
|
const hiddenAppsIdsQuery = createQuery()
|
||||||
hiddenAppsIdsQuery.query(workbench.class.HiddenApplication, {}, (res) => {
|
hiddenAppsIdsQuery.query(
|
||||||
hiddenAppsIds = res.map((r) => r.attachedTo)
|
workbench.class.HiddenApplication,
|
||||||
loaded = true
|
{
|
||||||
})
|
space: preference.space.Preference
|
||||||
|
},
|
||||||
|
(res) => {
|
||||||
|
hiddenAppsIds = res.map((r) => r.attachedTo)
|
||||||
|
loaded = true
|
||||||
|
}
|
||||||
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
import type { Application } from '@hcengineering/workbench'
|
import type { Application } from '@hcengineering/workbench'
|
||||||
import workbench from '@hcengineering/workbench'
|
import workbench from '@hcengineering/workbench'
|
||||||
import AppItem from './AppItem.svelte'
|
import AppItem from './AppItem.svelte'
|
||||||
|
import preference from '@hcengineering/preference'
|
||||||
|
|
||||||
export let active: Ref<Application> | undefined
|
export let active: Ref<Application> | undefined
|
||||||
export let apps: Application[] = []
|
export let apps: Application[] = []
|
||||||
@ -28,10 +29,16 @@
|
|||||||
let loaded: boolean = false
|
let loaded: boolean = false
|
||||||
let hiddenAppsIds: Array<Ref<Application>> = []
|
let hiddenAppsIds: Array<Ref<Application>> = []
|
||||||
const hiddenAppsIdsQuery = createQuery()
|
const hiddenAppsIdsQuery = createQuery()
|
||||||
hiddenAppsIdsQuery.query(workbench.class.HiddenApplication, {}, (res) => {
|
hiddenAppsIdsQuery.query(
|
||||||
hiddenAppsIds = res.map((r) => r.attachedTo)
|
workbench.class.HiddenApplication,
|
||||||
loaded = true
|
{
|
||||||
})
|
space: preference.space.Preference
|
||||||
|
},
|
||||||
|
(res) => {
|
||||||
|
hiddenAppsIds = res.map((r) => r.attachedTo)
|
||||||
|
loaded = true
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
$: filteredApps = apps.filter((it) => !hiddenAppsIds.includes(it._id))
|
$: filteredApps = apps.filter((it) => !hiddenAppsIds.includes(it._id))
|
||||||
$: topApps = filteredApps.filter((it) => it.position === 'top')
|
$: topApps = filteredApps.filter((it) => it.position === 'top')
|
||||||
|
Loading…
Reference in New Issue
Block a user