-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Track expense #40988
Track expense #40988
Conversation
Reviewer Checklist
Screenshots/Videos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. left small code suggestion.
src/libs/ReportUtils.ts
Outdated
if (ReportActionsUtils.isTrackExpenseAction(reportAction)) { | ||
if (isEmptyObject(transaction)) { | ||
return Localize.translateLocal('iou.trackExpense'); | ||
} | ||
const transactionDetails = getTransactionDetails(transaction); | ||
return Localize.translateLocal('iou.threadTrackReportName', { | ||
formattedAmount: CurrencyUtils.convertToDisplayString(transactionDetails?.amount ?? 0, transactionDetails?.currency) ?? '', | ||
comment: (!TransactionUtils.isMerchantMissing(transaction) ? transactionDetails?.merchant : transactionDetails?.comment) ?? '', | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this block should be moved to the bottom.
@fedirjh I've made the suggested changes to the PR. It's ready for your review. I haven't added screenshots for Android because I'm having issues with the Android build. I'll add them as soon as I can. |
src/libs/ReportUtils.ts
Outdated
if (ReportActionsUtils.isTrackExpenseAction(reportAction)) { | ||
return Localize.translateLocal('iou.threadTrackReportName', { | ||
formattedAmount: CurrencyUtils.convertToDisplayString(transactionDetails?.amount ?? 0, transactionDetails?.currency) ?? '', | ||
comment: (!TransactionUtils.isMerchantMissing(transaction) ? transactionDetails?.merchant : transactionDetails?.comment) ?? '', | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (ReportActionsUtils.isTrackExpenseAction(reportAction)) { | |
return Localize.translateLocal('iou.threadTrackReportName', { | |
formattedAmount: CurrencyUtils.convertToDisplayString(transactionDetails?.amount ?? 0, transactionDetails?.currency) ?? '', | |
comment: (!TransactionUtils.isMerchantMissing(transaction) ? transactionDetails?.merchant : transactionDetails?.comment) ?? '', | |
}); | |
} |
Dupe code. We have this check in line 2647
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry for the errors in my PR. I've been dealing with some personal stress, which might have caused me to overlook things. I'll be more thorough in the future, and I appreciate your patience as I work through this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nodebrute Take care of yourself, and don't worry too much about it. We all have those moments, We're all here to support each other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you guys!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Cherry-picked to staging by https://github.com/francoisl in version: 1.4.67-7 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to staging by https://github.com/marcochavezf in version: 1.4.68-0 🚀
|
🚀 Cherry-picked to staging by https://github.com/francoisl in version: 1.4.67-7 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/francoisl in version: 1.4.68-3 🚀
|
Details
Fixed Issues
$ #40366
PROPOSAL: #40366 (comment)
Tests
Step 1: Navigate to FAB and choose 'Track Expense'.
Step 2: Create a new scan request.
Step 3: Open the scan request to monitor its status.
Step 4: Confirm that the header indicates 'Scan in progress...' while scanning.
Step 5: Verify that 'Scanning...' is displayed in the 'Amount * Cash' and 'Merchant' fields while scanning
Offline tests
Step 1: Navigate to FAB and choose 'Track Expense'.
Step 2: Create a new scan request.
Step 3: Open the scan request to monitor its status.
Step 4: Confirm that the header indicates 'Scan in progress...' while scanning.
Step 5: Verify that 'Scanning...' is displayed in the 'Amount * Cash' and 'Merchant' fields while scanning
QA Steps
Step 1: Navigate to FAB and choose 'Track Expense'.
Step 2: Create a new scan request.
Step 3: Open the scan request to monitor its status.
Step 4: Confirm that the header indicates 'Scan in progress...' while scanning.
Step 5: Verify that 'Scanning...' is displayed in the 'Amount * Cash' and 'Merchant' fields while scanning
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop