From 2a2ff839244bcead9e0bf3c42fdfb929d2d87b1e Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Wed, 22 Feb 2023 21:24:26 +0600 Subject: [PATCH] Filter hide fix (#2681) Signed-off-by: Denis Bykhov --- models/chunter/src/index.ts | 4 ++-- models/contact/src/index.ts | 2 +- models/inventory/src/index.ts | 2 +- models/lead/src/index.ts | 4 ++-- models/recruit/src/index.ts | 6 +++--- models/tracker/src/index.ts | 6 +++--- .../src/components/filter/FilterTypePopup.svelte | 1 - 7 files changed, 12 insertions(+), 13 deletions(-) diff --git a/models/chunter/src/index.ts b/models/chunter/src/index.ts index 556f11f4a0..cc19aad515 100644 --- a/models/chunter/src/index.ts +++ b/models/chunter/src/index.ts @@ -484,11 +484,11 @@ export function createModel (builder: Builder, options = { addApplication: true }) builder.mixin(chunter.class.ChunterMessage, core.class.Class, view.mixin.ClassFilters, { - filters: ['space', 'modifiedOn', 'createBy', '_class'] + filters: ['space', '_class'] }) builder.mixin(chunter.class.Channel, core.class.Class, view.mixin.ClassFilters, { - filters: ['private', 'archived'] + filters: [] }) createAction(builder, { diff --git a/models/contact/src/index.ts b/models/contact/src/index.ts index d80c92bdcd..2309e5a462 100644 --- a/models/contact/src/index.ts +++ b/models/contact/src/index.ts @@ -485,7 +485,7 @@ export function createModel (builder: Builder): void { }) builder.mixin(contact.class.Contact, core.class.Class, view.mixin.ClassFilters, { - filters: ['_class', 'city', 'modifiedOn'] + filters: ['_class'] }) builder.mixin(contact.class.Channel, core.class.Class, view.mixin.AttributeFilter, { diff --git a/models/inventory/src/index.ts b/models/inventory/src/index.ts index 506b910b69..a391dc7660 100644 --- a/models/inventory/src/index.ts +++ b/models/inventory/src/index.ts @@ -172,7 +172,7 @@ export function createModel (builder: Builder): void { }) builder.mixin(inventory.class.Product, core.class.Class, view.mixin.ClassFilters, { - filters: ['attachedTo', 'name', 'modifiedOn'] + filters: ['attachedTo'] }) } diff --git a/models/lead/src/index.ts b/models/lead/src/index.ts index 07f56cc749..a44db7fec4 100644 --- a/models/lead/src/index.ts +++ b/models/lead/src/index.ts @@ -301,11 +301,11 @@ export function createModel (builder: Builder): void { }) builder.mixin(lead.class.Lead, core.class.Class, view.mixin.ClassFilters, { - filters: ['attachedTo', 'title', 'assignee', 'state', 'doneState', 'modifiedOn'] + filters: ['attachedTo'] }) builder.mixin(lead.mixin.Customer, core.class.Class, view.mixin.ClassFilters, { - filters: ['_class', 'description', 'city', 'modifiedOn'] + filters: ['_class'] }) builder.createDoc( diff --git a/models/recruit/src/index.ts b/models/recruit/src/index.ts index 21a59725df..68a0dcd44c 100644 --- a/models/recruit/src/index.ts +++ b/models/recruit/src/index.ts @@ -734,15 +734,15 @@ export function createModel (builder: Builder): void { }) builder.mixin(recruit.mixin.Candidate, core.class.Class, view.mixin.ClassFilters, { - filters: ['_class', 'title', 'source', 'city', 'skills', 'modifiedOn', 'onsite', 'remote', 'applications'] + filters: ['_class'] }) builder.mixin(recruit.class.Applicant, core.class.Class, view.mixin.ClassFilters, { - filters: ['attachedTo', 'space', 'assignee', 'state', 'doneState', 'modifiedOn'] + filters: ['attachedTo'] }) builder.mixin(recruit.class.Vacancy, core.class.Class, view.mixin.ClassFilters, { - filters: ['company', 'location', 'dueTo'] + filters: [] }) createReviewModel(builder) diff --git a/models/tracker/src/index.ts b/models/tracker/src/index.ts index 8674e9acea..89b0c143bd 100644 --- a/models/tracker/src/index.ts +++ b/models/tracker/src/index.ts @@ -1265,15 +1265,15 @@ export function createModel (builder: Builder): void { }) builder.mixin(tracker.class.Issue, core.class.Class, view.mixin.ClassFilters, { - filters: ['status', 'priority', 'assignee', 'project', 'sprint', 'estimation', 'dueDate', 'modifiedOn'] + filters: [] }) builder.mixin(tracker.class.IssueTemplate, core.class.Class, view.mixin.ClassFilters, { - filters: ['priority', 'assignee', 'project', 'sprint', 'modifiedOn'] + filters: [] }) builder.mixin(tracker.class.Sprint, core.class.Class, view.mixin.ClassFilters, { - filters: ['status', 'project', 'lead', 'startDate', 'targetDate', 'modifiedOn', 'capacity'] + filters: [] }) builder.createDoc( diff --git a/plugins/view-resources/src/components/filter/FilterTypePopup.svelte b/plugins/view-resources/src/components/filter/FilterTypePopup.svelte index 2dc0fdfd60..56cd609fec 100644 --- a/plugins/view-resources/src/components/filter/FilterTypePopup.svelte +++ b/plugins/view-resources/src/components/filter/FilterTypePopup.svelte @@ -56,7 +56,6 @@ function buildFilterFromKey (_class: Ref>, key: string): KeyFilter | undefined { const attribute = hierarchy.getAttribute(_class, key) - if (attribute.hidden) return return buildFilterKey(hierarchy, _class, key, attribute) }