mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-27 19:00:02 +00: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])
|
).map((p) => [p._id, p])
|
||||||
)
|
)
|
||||||
for (const status of statusStore.values()) {
|
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)) {
|
||||||
if (prjStatuses.size > 0 && !prjStatuses.has(status._id)) {
|
continue
|
||||||
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)
|
statuses = statuses.filter((it, idx, arr) => arr.findIndex((q) => q._id === it._id) === idx)
|
||||||
|
@ -107,7 +107,7 @@
|
|||||||
<SearchEdit bind:value={search} />
|
<SearchEdit bind:value={search} />
|
||||||
<!-- <ActionIcon icon={IconMoreH} size={'small'} /> -->
|
<!-- <ActionIcon icon={IconMoreH} size={'small'} /> -->
|
||||||
<div class="buttons-divider" />
|
<div class="buttons-divider" />
|
||||||
<FilterButton {_class} />
|
<FilterButton {_class} {space} />
|
||||||
</div>
|
</div>
|
||||||
<div class="ac-header-full medium-gap">
|
<div class="ac-header-full medium-gap">
|
||||||
<ViewletSettingButton bind:viewOptions bind:viewlet />
|
<ViewletSettingButton bind:viewOptions bind:viewlet />
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
import view from '@hcengineering/view'
|
import view from '@hcengineering/view'
|
||||||
import { statusStore } from '@hcengineering/view-resources'
|
import { statusStore } from '@hcengineering/view-resources'
|
||||||
import { createEventDispatcher, onMount } from 'svelte'
|
import { createEventDispatcher, onMount } from 'svelte'
|
||||||
import { typeStore } from '../..'
|
import { selectedTypeStore, typeStore } from '../..'
|
||||||
import IconBacklog from '../icons/IconBacklog.svelte'
|
import IconBacklog from '../icons/IconBacklog.svelte'
|
||||||
import IconCanceled from '../icons/IconCanceled.svelte'
|
import IconCanceled from '../icons/IconCanceled.svelte'
|
||||||
import IconCompleted from '../icons/IconCompleted.svelte'
|
import IconCompleted from '../icons/IconCompleted.svelte'
|
||||||
@ -48,7 +48,7 @@
|
|||||||
export let accent: boolean = false
|
export let accent: boolean = false
|
||||||
export let shrink: number = 0
|
export let shrink: number = 0
|
||||||
export let space: Ref<Project> | undefined = undefined
|
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 taskType: Ref<TaskType> | undefined = undefined
|
||||||
export let size: IconSize = 'small'
|
export let size: IconSize = 'small'
|
||||||
export let kind: 'table-attrs' | undefined = undefined
|
export let kind: 'table-attrs' | undefined = undefined
|
||||||
@ -71,6 +71,10 @@
|
|||||||
type = types.get(projectType)
|
type = types.get(projectType)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (space === undefined) {
|
||||||
|
type = undefined
|
||||||
|
return
|
||||||
|
}
|
||||||
const _space = await client.findOne(task.class.Project, { _id: space })
|
const _space = await client.findOne(task.class.Project, { _id: space })
|
||||||
if (_space === undefined) {
|
if (_space === undefined) {
|
||||||
type = undefined
|
type = undefined
|
||||||
|
Loading…
Reference in New Issue
Block a user