Skip to content

Commit

Permalink
Fix: display of accurate Items using manual filters search [SDESK-726…
Browse files Browse the repository at this point in the history
…4] (#1988)

* Updated the  function to include the  params

* address comment
  • Loading branch information
devketanpro authored May 17, 2024
1 parent c40bd77 commit 96f38be
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions client/components/Main/FilterSubnavDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ class FilterSubnavDropdownComponent extends React.PureComponent<IProps> {
return filters.map((filter) => ({
id: filter._id,
label: filter.name,
action: () => planningApi.ui.list.changeFilterId(filter._id),
action: () => planningApi.ui.list.changeFilterId(
filter._id,
{advancedSearch: {dates: {range: filter?.params?.date_filter}}}
),
group: gettext('Search Filters'),
}));
}
Expand All @@ -93,7 +96,10 @@ class FilterSubnavDropdownComponent extends React.PureComponent<IProps> {
label: this.hasGlobalFiltersPrivilege() ?
gettext('All Events & Planning') :
gettext('My Events & Planning'),
action: () => planningApi.ui.list.changeFilterId(EVENTS_PLANNING.FILTER.ALL_EVENTS_PLANNING),
action: () => planningApi.ui.list.changeFilterId(
EVENTS_PLANNING.FILTER.ALL_EVENTS_PLANNING,
{advancedSearch: {}}
),
group: '',
}
];
Expand All @@ -107,7 +113,10 @@ class FilterSubnavDropdownComponent extends React.PureComponent<IProps> {
label: this.hasGlobalFiltersPrivilege() ?
gettext('All Events') :
gettext('My Events'),
action: () => planningApi.ui.list.changeCalendarId(EVENTS.FILTER.ALL_CALENDARS),
action: () => planningApi.ui.list.changeCalendarId(
EVENTS.FILTER.ALL_CALENDARS,
{advancedSearch: {}}
),
group: '',
}, {
id: 'no_calendar',
Expand Down Expand Up @@ -163,7 +172,10 @@ class FilterSubnavDropdownComponent extends React.PureComponent<IProps> {
label: this.hasGlobalFiltersPrivilege() ?
gettext('All Planning Items') :
gettext('My Planning'),
action: () => planningApi.ui.list.changeAgendaId(AGENDA.FILTER.ALL_PLANNING),
action: () => planningApi.ui.list.changeAgendaId(
AGENDA.FILTER.ALL_PLANNING,
{advancedSearch: {}}
),
group: '',
}, {
id: 'no_agenda',
Expand Down

0 comments on commit 96f38be

Please sign in to comment.