Conversation
|
@thienlnam I have completed preliminary flow. I want to HOLD this on #37165 as I want to pick some common components from there.Mainly for To section in Confirmation Step. |
thienlnam
left a comment
There was a problem hiding this comment.
Thanks, just a couple notes for far - it looks the track flow doesn't yet auto-select the self-DM as destination?
It does select. You need to set selfDMReportID in Account Onyx key. |
thienlnam
left a comment
There was a problem hiding this comment.
Couple comments so far, also looks like we are failing some ts typechecks
src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js
Outdated
Show resolved
Hide resolved
src/libs/ReportUtils.ts
Outdated
| if (canUseTrackExpense && isPolicyExpenseChat(report) && report?.isOwnPolicyExpenseChat) { | ||
| options = [...options, CONST.IOU.TYPE.TRACK_EXPENSE]; | ||
| } |
There was a problem hiding this comment.
@thienlnam I am thinking of disabling the track expense in workspace temporarily. Will re-enable it in a follow up PR. This is basically for reason that the logic for deleting the request / updating the amount gets complicated, and this feature details in workspace is not flushed through completely. Since the plan was enable this feature to all users in near future, I think, delivering the workspace track expense incomplete may not have best outcome for users.
There was a problem hiding this comment.
Sure that works, we can create another issue for this to get added into the workspace
|
@ishpaul777 Can you start doing preliminary tests here? We want to ship this PR by friday. |
|
Sure! Will start in 1-2 hours |
|
Just so you know i have already started testing, will spend some time testing for the flow before looking deep in code. |
|
Ah yeah that is currently known |
|
Merging so we can get this project back on track for the may release - please let us know if there are other design items that look off. We're keeping the beta on until we get these BE issues fixed |
|
@thienlnam looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
Tests were passing 😵 |
|
🚀 Deployed to staging by https://github.com/thienlnam in version: 1.4.56-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.4.56-8 🚀
|
|
Because |
| const iouTransactionID = parentReportAction.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? parentReportAction.originalMessage?.IOUTransactionID ?? '' : ''; | ||
| if (ReportActionsUtils.isTrackExpenseAction(parentReportAction)) { | ||
| IOU.deleteTrackExpense(parentReport?.reportID ?? '', iouTransactionID, parentReportAction, true); | ||
| return; |
|
|
||
| const transactionDetails = getTransactionDetails(linkedTransaction); | ||
| const formattedAmount = CurrencyUtils.convertToDisplayString(transactionDetails?.amount ?? 0, transactionDetails?.currency ?? ''); | ||
| return Localize.translateLocal('iou.trackedAmount', {formattedAmount, comment: transactionDetails?.comment ?? ''}); |
There was a problem hiding this comment.
If merchant present comment should be merchant rather than transaction description #49993
| function isTrackExpenseReport(report: OnyxEntry<Report>): boolean { | ||
| if (isThread(report)) { | ||
| const parentReportAction = ReportActionsUtils.getParentReportAction(report); | ||
| return !isEmptyObject(parentReportAction) && ReportActionsUtils.isTrackExpenseAction(parentReportAction); |
There was a problem hiding this comment.
Coming from #52240 BZ checklist:
After update track expense to transaction, the type of parent action still is track so we have to check parentReportID with selfDMReportID to detect it's a track expense
| ...chatReport, | ||
| lastMessageText: iouAction.message?.[0].text, | ||
| lastMessageHtml: iouAction.message?.[0].html, | ||
| lastReadTime: DateUtils.getDBTime(), |
There was a problem hiding this comment.
We should also include lastVisibleActionCreated here to avoid: #56176
More details: #56176 (comment)
Details
Fixed Issues
$ #36362
Tests
Test 1
Test 2
Test 3
Test 4
Test 5 (Delete Track Expense)
Offline tests
Same as Tests
QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Screenshots for Design Reference
Android: Native
Screen.Recording.2024-03-20.at.7.35.56.PM.mov
Android: mWeb Chrome
Screen.Recording.2024-03-20.at.6.31.25.PM.mov
iOS: Native
Screen.Recording.2024-03-20.at.7.19.00.PM.mov
iOS: mWeb Safari
Screen.Recording.2024-03-20.at.6.18.28.PM.mov
MacOS: Chrome / Safari
Screen.Recording.2024-03-20.at.5.44.15.PM.mp4
Screen.Recording.2024-03-20.at.5.46.49.PM.mp4
MacOS: Desktop
Screen.Recording.2024-03-20.at.7.11.40.PM.mov