-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Renaming money request to expense #39483
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
Merged
Merged
Changes from 37 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
1f3726e
Renaming money request to expense
shubham1206agra 99f9534
Merge main
shubham1206agra 30eaee6
Fix translation after merge
shubham1206agra d2ee607
More translation fix
shubham1206agra aa7017c
More translation fix
shubham1206agra 375cd74
More translation fix
shubham1206agra 027421d
Fixing the mistakes
shubham1206agra e669383
Merge main
shubham1206agra 4be2d73
Fixing translations
shubham1206agra ee08c76
Fixed wrong translation
shubham1206agra ff152a3
Fixed message
shubham1206agra ddc621e
Fixed jest tests
shubham1206agra 08a2a48
Apply suggestions from code review
shubham1206agra a0c1b0f
Fixed translations
shubham1206agra 86e92d2
Fixed paySomeone
shubham1206agra 30ae1bd
Merge branch 'main' into rename-flow
shubham1206agra 4db9c26
Apply suggestions from code review
shubham1206agra b015888
Removed extra TODO
shubham1206agra b8f2b68
Merge main
shubham1206agra d86ab29
Merge branch 'main' of https://github.com/shubham1206agra/App into re…
shubham1206agra 54798ed
Fixed name in paySomeone
shubham1206agra 663599d
Merge branch 'Expensify:main' into rename-flow
shubham1206agra 990fcab
Merge branch 'main' into rename-flow
shubham1206agra 21784ed
Merge branch 'main' into rename-flow
shubham1206agra 17b9ac0
Fixed wrong translation
shubham1206agra 51c2561
Apply suggestions from code review
shubham1206agra 751f903
Making the space to get correct spanish translations
shubham1206agra 975e427
lint fix
shubham1206agra 937466c
revert purpose text for track
shubham1206agra f2d893e
Apply suggestions from code review
shubham1206agra 8107aa2
Fixed bad merge
shubham1206agra 0a875c9
Apply suggestions from code review
shubham1206agra ef13ceb
Apply suggestions from code review
shubham1206agra a1438f5
Merge main
shubham1206agra 7268729
Fixed translations
shubham1206agra 63da26a
Addressed comments
shubham1206agra c7cd851
Apply suggestions from code review
shubham1206agra 5ce1479
Apply suggestions from code review
shubham1206agra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,15 +65,15 @@ type MoneyRequestConfirmationListOnyxProps = { | |
/** The session of the logged in user */ | ||
session: OnyxEntry<OnyxTypes.Session>; | ||
|
||
/** Unit and rate used for if the money request is a distance request */ | ||
/** Unit and rate used for if the expense is a distance expense */ | ||
mileageRate: OnyxEntry<DefaultMileageRate>; | ||
}; | ||
|
||
type MoneyRequestConfirmationListProps = MoneyRequestConfirmationListOnyxProps & { | ||
/** Callback to inform parent modal of success */ | ||
onConfirm?: (selectedParticipants: Participant[]) => void; | ||
|
||
/** Callback to parent modal to send money */ | ||
/** Callback to parent modal to pay someone */ | ||
onSendMoney?: (paymentMethod: PaymentMethodType | undefined) => void; | ||
|
||
/** Callback to inform a participant is selected */ | ||
|
@@ -112,7 +112,7 @@ type MoneyRequestConfirmationListProps = MoneyRequestConfirmationListOnyxProps & | |
/** Selected participants from MoneyRequestModal with login / accountID */ | ||
selectedParticipants: Participant[]; | ||
|
||
/** Payee of the money request with login */ | ||
/** Payee of the expense with login */ | ||
payeePersonalDetails?: OnyxTypes.PersonalDetails; | ||
|
||
/** Can the participants be modified or not */ | ||
|
@@ -139,16 +139,16 @@ type MoneyRequestConfirmationListProps = MoneyRequestConfirmationListOnyxProps & | |
/** List styles for OptionsSelector */ | ||
listStyles?: StyleProp<ViewStyle>; | ||
|
||
/** Transaction that represents the money request */ | ||
/** Transaction that represents the expense */ | ||
transaction?: OnyxEntry<OnyxTypes.Transaction>; | ||
|
||
/** Whether the money request is a distance request */ | ||
/** Whether the expense is a distance expense */ | ||
isDistanceRequest?: boolean; | ||
|
||
/** Whether the money request is a scan request */ | ||
/** Whether the expense is a scan expense */ | ||
isScanRequest?: boolean; | ||
|
||
/** Whether we're editing a split bill */ | ||
/** Whether we're editing a split expense */ | ||
isEditingSplitBill?: boolean; | ||
|
||
/** Whether we should show the amount, date, and merchant fields. */ | ||
|
@@ -236,7 +236,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ | |
// A flag and a toggler for showing the rest of the form fields | ||
const [shouldExpandFields, toggleShouldExpandFields] = useReducer((state) => !state, false); | ||
|
||
// Do not hide fields in case of send money request | ||
// Do not hide fields in case of paying someone | ||
const shouldShowAllFields = isDistanceRequest || shouldExpandFields || !shouldShowSmartScanFields || isTypeSend || isEditingSplitBill; | ||
|
||
const shouldShowDate = (shouldShowSmartScanFields || isDistanceRequest) && !isTypeSend; | ||
|
@@ -354,7 +354,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ | |
[iouAmount, iouCurrencyCode], | ||
); | ||
|
||
// If completing a split bill fails, set didConfirm to false to allow the user to edit the fields again | ||
// If completing a split expense fails, set didConfirm to false to allow the user to edit the fields again | ||
if (isEditingSplitBill && didConfirm) { | ||
setDidConfirm(false); | ||
} | ||
|
@@ -364,14 +364,14 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ | |
if (isTypeTrackExpense) { | ||
text = translate('iou.trackExpense'); | ||
} else if (isTypeSplit && iouAmount === 0) { | ||
text = translate('iou.split'); | ||
text = translate('iou.splitExpense'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is changing the old copy, is this on purpose? |
||
} else if ((receiptPath && isTypeRequest) || isDistanceRequestWithPendingRoute) { | ||
text = translate('iou.request'); | ||
text = translate('iou.submitExpense'); | ||
if (iouAmount !== 0) { | ||
text = translate('iou.requestAmount', {amount: formattedAmount}); | ||
text = translate('iou.submitAmount', {amount: formattedAmount}); | ||
} | ||
} else { | ||
const translationKey = isTypeSplit ? 'iou.splitAmount' : 'iou.requestAmount'; | ||
const translationKey = isTypeSplit ? 'iou.splitAmount' : 'iou.submitAmount'; | ||
text = translate(translationKey, {amount: formattedAmount}); | ||
} | ||
return [ | ||
|
@@ -552,7 +552,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ | |
Log.info(`[IOU] Sending money via: ${paymentMethod}`); | ||
onSendMoney?.(paymentMethod); | ||
} else { | ||
// validate the amount for distance requests | ||
// validate the amount for distance expenses | ||
const decimals = CurrencyUtils.getCurrencyDecimals(iouCurrencyCode); | ||
if (isDistanceRequest && !isDistanceRequestWithPendingRoute && !MoneyRequestUtils.validateAmount(String(iouAmount), decimals)) { | ||
setFormError('common.error.invalidAmount'); | ||
|
@@ -907,7 +907,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ | |
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing | ||
source={resolvedThumbnail || resolvedReceiptImage || ''} | ||
// AuthToken is required when retrieving the image from the server | ||
// but we don't need it to load the blob:// or file:// image when starting a money request / split bill | ||
// but we don't need it to load the blob:// or file:// image when starting an expense/split | ||
// So if we have a thumbnail, it means we're retrieving the image from the server | ||
isAuthTokenRequired={!!receiptThumbnail} | ||
fileExtension={fileExtension} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.