Skip to content

Commit

Permalink
Merge pull request #48365 from Expensify/cmartins-updateTripFilters
Browse files Browse the repository at this point in the history
Update trip statuses
  • Loading branch information
luacmartins authored Sep 6, 2024
2 parents ca782ae + db7c154 commit 735eb17
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 24 deletions.
6 changes: 2 additions & 4 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5374,10 +5374,8 @@ const CONST = {
},
TRIP: {
ALL: 'all',
DRAFTS: 'drafts',
OUTSTANDING: 'outstanding',
APPROVED: 'approved',
PAID: 'paid',
CURRENT: 'current',
PAST: 'past',
},
},
CHAT_TYPES: {
Expand Down
28 changes: 8 additions & 20 deletions src/components/Search/SearchStatusBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,28 +82,16 @@ const tripOptions: Array<{key: TripSearchStatus; icon: IconAsset; text: Translat
query: SearchUtils.buildCannedSearchQuery(CONST.SEARCH.DATA_TYPES.TRIP, CONST.SEARCH.STATUS.TRIP.ALL),
},
{
key: CONST.SEARCH.STATUS.TRIP.DRAFTS,
icon: Expensicons.Pencil,
text: 'common.drafts',
query: SearchUtils.buildCannedSearchQuery(CONST.SEARCH.DATA_TYPES.TRIP, CONST.SEARCH.STATUS.TRIP.DRAFTS),
},
{
key: CONST.SEARCH.STATUS.TRIP.OUTSTANDING,
icon: Expensicons.Hourglass,
text: 'common.outstanding',
query: SearchUtils.buildCannedSearchQuery(CONST.SEARCH.DATA_TYPES.TRIP, CONST.SEARCH.STATUS.TRIP.OUTSTANDING),
key: CONST.SEARCH.STATUS.TRIP.CURRENT,
icon: Expensicons.Calendar,
text: 'search.filters.current',
query: SearchUtils.buildCannedSearchQuery(CONST.SEARCH.DATA_TYPES.TRIP, CONST.SEARCH.STATUS.TRIP.CURRENT),
},
{
key: CONST.SEARCH.STATUS.TRIP.APPROVED,
icon: Expensicons.ThumbsUp,
text: 'iou.approved',
query: SearchUtils.buildCannedSearchQuery(CONST.SEARCH.DATA_TYPES.TRIP, CONST.SEARCH.STATUS.TRIP.APPROVED),
},
{
key: CONST.SEARCH.STATUS.TRIP.PAID,
icon: Expensicons.MoneyBag,
text: 'iou.settledExpensify',
query: SearchUtils.buildCannedSearchQuery(CONST.SEARCH.DATA_TYPES.TRIP, CONST.SEARCH.STATUS.TRIP.PAID),
key: CONST.SEARCH.STATUS.TRIP.PAST,
icon: Expensicons.History,
text: 'search.filters.past',
query: SearchUtils.buildCannedSearchQuery(CONST.SEARCH.DATA_TYPES.TRIP, CONST.SEARCH.STATUS.TRIP.PAST),
},
];

Expand Down
2 changes: 2 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3891,6 +3891,8 @@ export default {
greaterThan: (amount?: string) => `Greater than ${amount ?? ''}`,
between: (greaterThan: string, lessThan: string) => `Between ${greaterThan} and ${lessThan}`,
},
current: 'Current',
past: 'Past',
},
expenseType: 'Expense type',
},
Expand Down
2 changes: 2 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3942,6 +3942,8 @@ export default {
greaterThan: (amount?: string) => `Más que ${amount ?? ''}`,
between: (greaterThan: string, lessThan: string) => `Entre ${greaterThan} y ${lessThan}`,
},
current: 'Actual',
past: 'Anterior',
},
expenseType: 'Tipo de gasto',
},
Expand Down

0 comments on commit 735eb17

Please sign in to comment.