Refactor IOU.categorizeTrackedExpense function#52221
Refactor IOU.categorizeTrackedExpense function#52221neil-marcellini merged 11 commits intoExpensify:mainfrom
Conversation
|
I am waiting on BE to solve the issue for workspace with tax rates enabled as mentioned here #50368 (comment). |
|
@dukenv0307 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
src/libs/actions/IOU.ts
Outdated
| taxAmount = 0, | ||
| billable?: boolean, | ||
| receipt?: Receipt, | ||
| trackedExpenseInformation: CategorizeTrackedExpenseInformation, |
There was a problem hiding this comment.
Can you create the type that contains all params? We already discussed it in #52231 (comment)
|
@ChavdaSachin We already merged several PRs like this, so you can refer to how we're doing. |
src/libs/actions/IOU.ts
Outdated
| billable, | ||
| trackedReceipt, | ||
| receipt: trackedReceipt, | ||
| } as CategorizeTrackedExpenseTransactionParams; |
There was a problem hiding this comment.
Why do we need type assertion here?
src/libs/actions/IOU.ts
Outdated
| policyParams, | ||
| createdWorkspaceParams, | ||
| ); | ||
| } as CategorizeTrackedExpenseParams; |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-12-09.at.09.03.40.movAndroid: mWeb ChromeScreen.Recording.2024-12-09.at.08.56.47.moviOS: NativeScreen.Recording.2024-12-09.at.08.58.48.moviOS: mWeb SafariScreen.Recording.2024-12-09.at.08.56.06.movMacOS: Chrome / SafariScreen.Recording.2024-12-09.at.08.53.52.movMacOS: DesktopScreen.Recording.2024-12-09.at.09.06.25.mov |
|
looks good, just left some minor comments |
neil-marcellini
left a comment
There was a problem hiding this comment.
Beautiful, thanks!
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Performance Comparison Report 📊Significant Changes To Duration
Show details
Meaningless Changes To DurationShow entries
Show details
|
|
@Expensify/mobile-deployers 📣 Please look into this performance regression as it's a deploy blocker. |
| moneyRequestReportID, | ||
| moneyRequestCreatedReportActionID, | ||
| actionableWhisperReportActionID, | ||
| onyxData, |
There was a problem hiding this comment.
Why do you pass onyxData in the API request params?
There was a problem hiding this comment.
That seems to be a blunder made by me while resolving conflicts.
Thank you @paultsimura.
Now there are two options, you could remove it in your current PR or else I would fix it in my upcoming refactor PR.
Also I am re checking this PR to make sure no other such mistakes are done.
There was a problem hiding this comment.
Also linkedTrackedExpenseReportAction from ...reportInformation
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.0.75-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.0.75-6 🚀
|
Explanation of Change
Refactor IOU.categorizeTrackedExpense function.
Fixed Issues
$ #50368
PROPOSAL: NA
Tests
Same as QA Tests.
Offline tests
Same as QA Tests.
QA Steps
Just Track It(don't submit it)option.PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.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 and/or tagged@Expensify/designso 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
Android: Native
Screen.Recording.2024-12-05.at.3.48.56.AM.online-video-cutter.com.mp4
Android: mWeb Chrome
Screen.Recording.2024-12-05.at.2.25.40.AM.mov
iOS: Native
Screen.Recording.2024-12-05.at.2.37.14.AM.mov
iOS: mWeb Safari
Screen.Recording.2024-12-05.at.2.16.41.AM.mov
MacOS: Chrome / Safari
Screen.Recording.2024-12-05.at.2.07.12.AM.mp4
MacOS: Desktop
Screen.Recording.2024-12-05.at.3.58.20.AM.mp4