Set default category for distance request#34012
Conversation
|
bump @situchan |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
| '', | ||
| ); | ||
| useEffect(() => { | ||
| IOU.setMoneyRequestCategory_temporaryForRefactor(transactionID, defaultCategory); |
There was a problem hiding this comment.
This always resets category to default one while in money request flow.
This should be happen only when unset
Screen.Recording.2024-01-18.at.10.49.15.PM.mov
|
@situchan This needs your re-approval. |
|
bump @situchan |
|
@dylanexpensify default category should be set only for distance request or for all requests including manual?
|
|
@dylanexpensify Can you take a look at ^ ? |
|
@tienifr after internal discussion, Default Distance Category should be applied to distance request only. So no need to set default category in other types of requests. |
|
🚀 Deployed to staging by https://github.com/yuwenmemon in version: 1.4.38-0 🚀
|
|
🚀 Deployed to staging by https://github.com/yuwenmemon in version: 1.4.38-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.38-6 🚀
|
| return; | ||
| } | ||
| IOU.setMoneyRequestCategory_temporaryForRefactor(transactionID, defaultCategory); | ||
| }, [transactionID, transaction.category, requestType, defaultCategory]); |
There was a problem hiding this comment.
Adding transaction.category as dependency here caused #36139.
So category was always reset to default on unselect.

Details
This PR retrieves and sets default category for distance request.
Fixed Issues
$ #33388
PROPOSAL: #33388 (comment)
Tests
Offline tests
NA
QA Steps
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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2024-01-05.at.16.20.37-compressed.mov
MacOS: Desktop
Screen.Recording.2024-01-05.at.16.20.37-compressed.mov