mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-11 12:17:44 +02:00
Cards fixes (#8003)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -146,7 +146,6 @@
|
||||
return special.checkIsDisabled && (await (await getResource(special.checkIsDisabled))())
|
||||
}
|
||||
|
||||
let savedMenu: boolean = false
|
||||
let menuSelection: boolean = false
|
||||
</script>
|
||||
|
||||
@@ -173,11 +172,7 @@
|
||||
{/if}
|
||||
<div class="min-h-3 flex-no-shrink" />
|
||||
|
||||
<SavedView
|
||||
{currentApplication}
|
||||
on:shown={(res) => (savedMenu = res.detail)}
|
||||
on:select={(res) => (menuSelection = res.detail)}
|
||||
/>
|
||||
<SavedView alias={currentApplication?.alias} on:select={(res) => (menuSelection = res.detail)} />
|
||||
{#if starred.length}
|
||||
<StarredNav
|
||||
label={preference.string.Starred}
|
||||
|
||||
@@ -32,13 +32,12 @@
|
||||
setViewOptions,
|
||||
viewOptionStore
|
||||
} from '@hcengineering/view-resources'
|
||||
import { Application } from '@hcengineering/workbench'
|
||||
import copy from 'fast-copy'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import TodoCheck from './icons/TodoCheck.svelte'
|
||||
import TodoUncheck from './icons/TodoUncheck.svelte'
|
||||
|
||||
export let currentApplication: Application | undefined
|
||||
export let alias: string | undefined
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
const client = getClient()
|
||||
@@ -47,23 +46,19 @@
|
||||
const filteredViewsQuery = createQuery()
|
||||
let availableFilteredViews: FilteredView[] = []
|
||||
let myFilteredViews: FilteredView[] = []
|
||||
$: if (currentApplication?.alias !== undefined) {
|
||||
filteredViewsQuery.query<FilteredView>(
|
||||
view.class.FilteredView,
|
||||
{ attachedTo: currentApplication?.alias },
|
||||
(result) => {
|
||||
myFilteredViews = result.filter((p) => p.users.includes(me))
|
||||
availableFilteredViews = result.filter((p) => p.sharable && !p.users.includes(me))
|
||||
$: if (alias !== undefined) {
|
||||
filteredViewsQuery.query<FilteredView>(view.class.FilteredView, { attachedTo: alias }, (result) => {
|
||||
myFilteredViews = result.filter((p) => p.users.includes(me))
|
||||
availableFilteredViews = result.filter((p) => p.sharable && !p.users.includes(me))
|
||||
|
||||
const location = getLocation()
|
||||
if (location.query?.filterViewId) {
|
||||
const targetView = result.find((view) => view._id === location.query?.filterViewId)
|
||||
if (targetView) {
|
||||
load(targetView)
|
||||
}
|
||||
const location = getLocation()
|
||||
if (location.query?.filterViewId) {
|
||||
const targetView = result.find((view) => view._id === location.query?.filterViewId)
|
||||
if (targetView) {
|
||||
load(targetView)
|
||||
}
|
||||
}
|
||||
)
|
||||
})
|
||||
} else {
|
||||
filteredViewsQuery.unsubscribe()
|
||||
myFilteredViews = []
|
||||
|
||||
Reference in New Issue
Block a user