fix: Toggle, GL code & Payroll code are no longer grayed out after renaming category#46176
fix: Toggle, GL code & Payroll code are no longer grayed out after renaming category#46176iwiznia merged 4 commits intoExpensify:mainfrom
Conversation
|
@rayane-djouah 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] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-08-01.at.3.12.47.PM.movAndroid: mWeb ChromeScreen.Recording.2024-08-01.at.3.10.14.PM.moviOS: NativeSimulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-08-01.at.15.15.27.mp4iOS: mWeb SafariSimulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-08-01.at.15.12.13.mp4MacOS: Chrome / SafariScreen.Recording.2024-08-01.at.3.05.57.PM.movMacOS: DesktopScreen.Recording.2024-08-01.at.3.07.43.PM.mov |
src/libs/actions/Policy/Category.ts
Outdated
|
|
||
| function renamePolicyCategory(policyID: string, policyCategory: {oldName: string; newName: string}) { | ||
| const policyCategoryToUpdate = allPolicyCategories?.[`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policyID}`]?.[policyCategory.oldName] ?? {}; | ||
| const pendingFields = allPolicyCategories?.[`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policyID}`]?.[policyCategory.oldName]?.pendingFields ?? {}; |
There was a problem hiding this comment.
| const pendingFields = allPolicyCategories?.[`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policyID}`]?.[policyCategory.oldName]?.pendingFields ?? {}; |
src/libs/actions/Policy/Category.ts
Outdated
| @@ -268,6 +268,7 @@ function createPolicyCategory(policyID: string, categoryName: string) { | |||
|
|
|||
| function renamePolicyCategory(policyID: string, policyCategory: {oldName: string; newName: string}) { | |||
| const policyCategoryToUpdate = allPolicyCategories?.[`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policyID}`]?.[policyCategory.oldName] ?? {}; | |||
There was a problem hiding this comment.
| const policyCategoryToUpdate = allPolicyCategories?.[`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policyID}`]?.[policyCategory.oldName] ?? {}; | |
| const policyCategoryToUpdate = allPolicyCategories?.[`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policyID}`]?.[policyCategory.oldName]; |
src/libs/actions/Policy/Category.ts
Outdated
| name: policyCategory.newName, | ||
| pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE, | ||
| pendingFields: { | ||
| ...pendingFields, |
There was a problem hiding this comment.
| ...pendingFields, | |
| ...(policyCategoryToUpdate?.pendingFields ?? {}), |
src/libs/actions/Policy/Category.ts
Outdated
| errors: null, | ||
| pendingAction: null, | ||
| pendingFields: { | ||
| ...pendingFields, |
There was a problem hiding this comment.
| ...pendingFields, | |
| ...(policyCategoryToUpdate?.pendingFields ?? {}), |
|
@etCoderDysto - Could you please address the above comments? |
I have addressed the comments. Sorry for my late response. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/iwiznia in version: 9.0.17-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.0.17-2 🚀
|
2 similar comments
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.0.17-2 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.0.17-2 🚀
|
Details
Fixed Issues
$ #45755
PROPOSAL: #45755 (comment)
Tests
Precondition:
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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
Android.mp4
Android: mWeb Chrome
Android.Web.mp4
iOS: Native
IOS.mp4
iOS: mWeb Safari
iOS.safari.mp4
MacOS: Chrome / Safari
Web.mp4
MacOS: Desktop
Desktop.mp4