Skip to content

Commit fb2dac8

Browse files
committed
update to add action filters, separate from just action_Types
1 parent 901ae31 commit fb2dac8

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/CONST/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6549,6 +6549,10 @@ const CONST = {
65496549
TRIP: 'trip',
65506550
CHAT: 'chat',
65516551
},
6552+
ACTION_FILTERS: {
6553+
PAY: 'pay',
6554+
EXPORT: 'export',
6555+
},
65526556
ACTION_TYPES: {
65536557
VIEW: 'view',
65546558
REVIEW: 'review',

src/components/Search/SearchAutocompleteList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ function SearchAutocompleteList(
460460
}));
461461
}
462462
case CONST.SEARCH.SYNTAX_FILTER_KEYS.ACTION: {
463-
return Object.values(CONST.SEARCH.ACTION).map((status) => ({
463+
return Object.values(CONST.SEARCH.ACTION_FILTERS).map((status) => ({
464464
filterKey: CONST.SEARCH.SEARCH_USER_FRIENDLY_KEYS.ACTION,
465465
text: status,
466466
}));

src/libs/SearchAutocompleteUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ function filterOutRangesWithCorrectValue(
133133
}) as string[];
134134
const groupByList = Object.values(CONST.SEARCH.GROUP_BY) as string[];
135135
const booleanList = Object.values(CONST.SEARCH.BOOLEAN) as string[];
136-
const actionList = Object.values(CONST.SEARCH.ACTION) as string[];
136+
const actionList = Object.values(CONST.SEARCH.ACTION_FILTERS) as string[];
137137

138138
switch (range.key) {
139139
case CONST.SEARCH.SYNTAX_FILTER_KEYS.IN:

src/libs/SearchUIUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,7 @@ function createTypeMenuSections(session: OnyxTypes.Session | undefined, policies
13571357
const queryString = buildQueryStringFromFilterFormValues({
13581358
type: CONST.SEARCH.DATA_TYPES.EXPENSE,
13591359
groupBy: CONST.SEARCH.GROUP_BY.REPORTS,
1360-
action: CONST.SEARCH.ACTION_TYPES.PAY,
1360+
action: CONST.SEARCH.ACTION_FILTERS.PAY,
13611361
reimbursable: CONST.SEARCH.BOOLEAN.YES,
13621362
payer: session.accountID?.toString(),
13631363
});
@@ -1379,7 +1379,7 @@ function createTypeMenuSections(session: OnyxTypes.Session | undefined, policies
13791379
getSearchQuery: () => {
13801380
const queryString = buildQueryStringFromFilterFormValues({
13811381
groupBy: CONST.SEARCH.GROUP_BY.REPORTS,
1382-
action: CONST.SEARCH.ACTION_TYPES.EXPORT_TO_ACCOUNTING,
1382+
action: CONST.SEARCH.ACTION_FILTERS.EXPORT,
13831383
exporter: [`${session.accountID}`],
13841384
exportedOn: CONST.SEARCH.NEVER,
13851385
});

0 commit comments

Comments
 (0)