mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 03:22:19 +03:00
UBER-271: Fix filters (#3293)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
46d66ecad1
commit
f403d44769
@ -323,7 +323,7 @@ export class TTimeSpendReport extends TAttachedDoc implements TimeSpendReport {
|
||||
* @public
|
||||
*/
|
||||
@Model(tracker.class.Component, core.class.Doc, DOMAIN_TRACKER)
|
||||
@UX(tracker.string.Component, tracker.icon.Component, 'COMPONENT')
|
||||
@UX(tracker.string.Component, tracker.icon.Component, 'COMPONENT', 'label')
|
||||
export class TComponent extends TDoc implements Component {
|
||||
@Prop(TypeString(), tracker.string.Title)
|
||||
@Index(IndexKind.FullText)
|
||||
@ -348,7 +348,7 @@ export class TComponent extends TDoc implements Component {
|
||||
* @public
|
||||
*/
|
||||
@Model(tracker.class.Milestone, core.class.Doc, DOMAIN_TRACKER)
|
||||
@UX(tracker.string.Milestone, tracker.icon.Milestone)
|
||||
@UX(tracker.string.Milestone, tracker.icon.Milestone, '', 'label')
|
||||
export class TMilestone extends TDoc implements Milestone {
|
||||
@Prop(TypeString(), tracker.string.Title)
|
||||
// @Index(IndexKind.FullText)
|
||||
@ -1336,7 +1336,25 @@ export function createModel (builder: Builder): void {
|
||||
})
|
||||
|
||||
builder.mixin(tracker.class.Issue, core.class.Class, view.mixin.ClassFilters, {
|
||||
filters: ['status', 'priority', 'space', 'createdBy', 'assignee'],
|
||||
filters: [
|
||||
'status',
|
||||
'priority',
|
||||
'space',
|
||||
'createdBy',
|
||||
'assignee',
|
||||
{
|
||||
_class: tracker.class.Issue,
|
||||
key: 'component',
|
||||
component: view.component.ObjectFilter,
|
||||
showNested: false
|
||||
},
|
||||
{
|
||||
_class: tracker.class.Issue,
|
||||
key: 'milestone',
|
||||
component: view.component.ObjectFilter,
|
||||
showNested: false
|
||||
}
|
||||
],
|
||||
ignoreKeys: ['number', 'estimation', 'attachedTo']
|
||||
})
|
||||
|
||||
|
@ -231,6 +231,9 @@
|
||||
}
|
||||
|
||||
function hasNested (type: KeyFilter): boolean {
|
||||
if (type.showNested === false) {
|
||||
return false
|
||||
}
|
||||
const targetClass = (hierarchy.getAttribute(type._class, type.key).type as RefTo<Doc>).to
|
||||
if (targetClass === undefined) return false
|
||||
const clazz = hierarchy.getClass(targetClass)
|
||||
|
@ -57,6 +57,7 @@ export interface KeyFilterPreset {
|
||||
component: AnyComponent
|
||||
label?: IntlString
|
||||
group?: 'top' | 'bottom'
|
||||
showNested?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user