-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Refactor IOU.categorizeTrackedExpense function #52221
Refactor IOU.categorizeTrackedExpense function #52221
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need type assertion here?
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.
Removing it...
src/libs/actions/IOU.ts
Outdated
createdWorkspaceParams, | ||
); | ||
} as CategorizeTrackedExpenseParams; |
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.
Same as above.
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 |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you pass onyxData
in the API request params?
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fixing in my PR 👍
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.
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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
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