mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 03:22:19 +03:00
UBERF-6000: fix statuses filtering and icons (#4966)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
0b89fac214
commit
ca208fc324
@ -94,12 +94,19 @@
|
||||
).map((p) => [p._id, p])
|
||||
)
|
||||
for (const status of statusStore.values()) {
|
||||
if (hierarchy.isDerived(status._class, targetClass) && status.ofAttribute === filter.key.attribute._id) {
|
||||
if (prjStatuses.size > 0 && !prjStatuses.has(status._id)) {
|
||||
continue
|
||||
if (prjStatuses.size > 0 && !prjStatuses.has(status._id)) {
|
||||
continue
|
||||
}
|
||||
if (hierarchy.isDerived(status._class, targetClass)) {
|
||||
if (selectedProjectType === undefined) {
|
||||
if (status.ofAttribute === filter.key.attribute._id) {
|
||||
statuses.push(status)
|
||||
targets.add(status._id)
|
||||
}
|
||||
} else {
|
||||
statuses.push(status)
|
||||
targets.add(status._id)
|
||||
}
|
||||
statuses.push(status)
|
||||
targets.add(status._id)
|
||||
}
|
||||
}
|
||||
statuses = statuses.filter((it, idx, arr) => arr.findIndex((q) => q._id === it._id) === idx)
|
||||
|
@ -107,7 +107,7 @@
|
||||
<SearchEdit bind:value={search} />
|
||||
<!-- <ActionIcon icon={IconMoreH} size={'small'} /> -->
|
||||
<div class="buttons-divider" />
|
||||
<FilterButton {_class} />
|
||||
<FilterButton {_class} {space} />
|
||||
</div>
|
||||
<div class="ac-header-full medium-gap">
|
||||
<ViewletSettingButton bind:viewOptions bind:viewlet />
|
||||
|
@ -30,7 +30,7 @@
|
||||
import view from '@hcengineering/view'
|
||||
import { statusStore } from '@hcengineering/view-resources'
|
||||
import { createEventDispatcher, onMount } from 'svelte'
|
||||
import { typeStore } from '../..'
|
||||
import { selectedTypeStore, typeStore } from '../..'
|
||||
import IconBacklog from '../icons/IconBacklog.svelte'
|
||||
import IconCanceled from '../icons/IconCanceled.svelte'
|
||||
import IconCompleted from '../icons/IconCompleted.svelte'
|
||||
@ -48,7 +48,7 @@
|
||||
export let accent: boolean = false
|
||||
export let shrink: number = 0
|
||||
export let space: Ref<Project> | undefined = undefined
|
||||
export let projectType: Ref<ProjectType> | undefined = undefined
|
||||
export let projectType: Ref<ProjectType> | undefined = $selectedTypeStore
|
||||
export let taskType: Ref<TaskType> | undefined = undefined
|
||||
export let size: IconSize = 'small'
|
||||
export let kind: 'table-attrs' | undefined = undefined
|
||||
@ -71,6 +71,10 @@
|
||||
type = types.get(projectType)
|
||||
return
|
||||
}
|
||||
if (space === undefined) {
|
||||
type = undefined
|
||||
return
|
||||
}
|
||||
const _space = await client.findOne(task.class.Project, { _id: space })
|
||||
if (_space === undefined) {
|
||||
type = undefined
|
||||
|
Loading…
Reference in New Issue
Block a user