Skip to content

Commit

Permalink
Merge pull request #56703 from Expensify/cmartins-addDoneStatus
Browse files Browse the repository at this point in the history
Add done status
  • Loading branch information
MarioExpensify authored Feb 17, 2025
2 parents 9370c43 + 11988ac commit 3aafdb6
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 5 deletions.
12 changes: 12 additions & 0 deletions assets/images/checkbox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6171,6 +6171,7 @@ const CONST = {
DRAFTS: 'drafts',
OUTSTANDING: 'outstanding',
APPROVED: 'approved',
DONE: 'done',
PAID: 'paid',
},
INVOICE: {
Expand Down
2 changes: 2 additions & 0 deletions src/components/Icon/Expensicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import ChatBubbleUnread from '@assets/images/chatbubble-unread.svg';
import ChatBubble from '@assets/images/chatbubble.svg';
import ChatBubbles from '@assets/images/chatbubbles.svg';
import CheckCircle from '@assets/images/check-circle.svg';
import Checkbox from '@assets/images/checkbox.svg';
import CheckmarkCircle from '@assets/images/checkmark-circle.svg';
import Checkmark from '@assets/images/checkmark.svg';
import CircularArrowBackwards from '@assets/images/circular-arrow-backwards.svg';
Expand Down Expand Up @@ -249,6 +250,7 @@ export {
Cash,
ChatBubble,
ChatBubbles,
Checkbox,
Checkmark,
Chair,
Close,
Expand Down
14 changes: 10 additions & 4 deletions src/components/Search/SearchStatusBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import useStyleUtils from '@hooks/useStyleUtils';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import Navigation from '@libs/Navigation/Navigation';
import * as SearchQueryUtils from '@libs/SearchQueryUtils';
import {buildSearchQueryString} from '@libs/SearchQueryUtils';
import CONST from '@src/CONST';
import type {TranslationPaths} from '@src/languages/types';
import type {SearchDataTypes} from '@src/types/onyx/SearchResults';
Expand Down Expand Up @@ -49,10 +49,16 @@ const expenseOptions: Array<{status: ExpenseSearchStatus; type: SearchDataTypes;
icon: Expensicons.ThumbsUp,
text: 'iou.approved',
},
{
type: CONST.SEARCH.DATA_TYPES.EXPENSE,
status: CONST.SEARCH.STATUS.EXPENSE.DONE,
icon: Expensicons.Checkbox,
text: 'iou.done',
},
{
type: CONST.SEARCH.DATA_TYPES.EXPENSE,
status: CONST.SEARCH.STATUS.EXPENSE.PAID,
icon: Expensicons.MoneyBag,
icon: Expensicons.Checkmark,
text: 'iou.settledExpensify',
},
];
Expand All @@ -73,7 +79,7 @@ const invoiceOptions: Array<{type: SearchDataTypes; status: InvoiceSearchStatus;
{
type: CONST.SEARCH.DATA_TYPES.INVOICE,
status: CONST.SEARCH.STATUS.INVOICE.PAID,
icon: Expensicons.MoneyBag,
icon: Expensicons.Checkmark,
text: 'iou.settledExpensify',
},
];
Expand Down Expand Up @@ -177,7 +183,7 @@ function SearchStatusBar({queryJSON, onStatusChange}: SearchStatusBarProps) {
{options.map((item, index) => {
const onPress = singleExecution(() => {
onStatusChange?.();
const query = SearchQueryUtils.buildSearchQueryString({...queryJSON, status: item.status});
const query = buildSearchQueryString({...queryJSON, status: item.status});
Navigation.setParams({q: query});
});
const isActive = Array.isArray(queryJSON.status) ? queryJSON.status.includes(item.status) : queryJSON.status === item.status;
Expand Down
2 changes: 1 addition & 1 deletion src/components/SelectionList/Search/ActionCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function ActionCell({
<View style={[StyleUtils.getHeight(variables.h28), styles.justifyContentCenter]}>
<Badge
text={text}
icon={Expensicons.Checkmark}
icon={action === CONST.SEARCH.ACTION_TYPES.DONE ? Expensicons.Checkbox : Expensicons.Checkmark}
badgeStyles={[
styles.ml0,
styles.ph2,
Expand Down
1 change: 1 addition & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,7 @@ const translations = {
other: 'Are you sure that you want to delete these expenses?',
}),
settledExpensify: 'Paid',
done: 'Done',
settledElsewhere: 'Paid elsewhere',
individual: 'Individual',
business: 'Business',
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,7 @@ const translations = {
other: '¿Estás seguro de que quieres eliminar estas solicitudes?',
}),
settledExpensify: 'Pagado',
done: 'Listo',
settledElsewhere: 'Pagado de otra forma',
individual: 'Individual',
business: 'Empresa',
Expand Down

0 comments on commit 3aafdb6

Please sign in to comment.