Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add done status #56703

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -955,6 +955,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 @@ -950,6 +950,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