-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Adds 'Required' label for merchant on workspaces & updates P2P requirements for worskpaces #36252
Adds 'Required' label for merchant on workspaces & updates P2P requirements for worskpaces #36252
Conversation
…:infinitered/ExpensifyApp into violations/cdanwards/merchant-required
…questConfirmationList*** ***Update IOU.ts to handle policy requirements
…:infinitered/ExpensifyApp into violations/cdanwards/merchant-required
…ards/merchant-required
…ards/merchant-required
src/components/MoneyTemporaryForRefactorRequestConfirmationList.js
Outdated
Show resolved
Hide resolved
@cead22 this is now ready for review! |
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.
Please add manual tests for the case of p2p money requests (where the policy isn't set)
src/components/MoneyTemporaryForRefactorRequestConfirmationList.js
Outdated
Show resolved
Hide resolved
@cead22 updated with a p2p test case. Also updated that check like you described. The optional chaining was only necessary with the check the way I had it, so I removed those as well. |
@@ -729,6 +729,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ | |||
interactive={!isReadOnly} | |||
brickRoadIndicator={merchantError ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : ''} | |||
error={merchantError ? translate('common.error.fieldRequired') : ''} | |||
rightLabel={translate('common.required')} |
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.
Don't we need the PolicyUtils.isPaidGroupPolicy
check here?
Co-authored-by: Carlos Alvarez <cead22@gmail.com>
Co-authored-by: Carlos Alvarez <cead22@gmail.com>
…ards/merchant-required
|
src/components/MoneyTemporaryForRefactorRequestConfirmationList.js
Outdated
Show resolved
Hide resolved
Please update Tests Steps: - Testing for creating a money request in a policy (Required should appear)
+ Testing for creating a money request in a collect/control policy (Required should appear)
- Testing for creating a p2p money request (Required should not appear)
+ Testing for creating a p2p money request or in free policy (Required should not appear) |
I am curious why Screen.Recording.2024-02-14.at.10.58.02.AM.mov(In this video, dark mode is free policy, light mode is control policy) |
…t.js Co-authored-by: Aimane Chnaif <96077027+aimane-chnaif@users.noreply.github.com>
@aimane-chnaif I went back and looked at the issue and you are correct that it should be for all workspaces. I'll change which check is made. |
@@ -720,6 +720,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ | |||
interactive={!isReadOnly} | |||
brickRoadIndicator={merchantError ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : ''} | |||
error={merchantError ? translate('common.error.fieldRequired') : ''} | |||
rightLabel={isMerchantRequired ? translate('common.required') : ''} |
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.
It doesn't make sense to show "Required" when merchant is already filled so this can be updated to
isMerchantEmpty && isMerchantRequired ? translate('common.required') : ''
But this is already existing logic in category, tag so out of scope
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.
Yeah, this is just following the design precedent set by the other required items.
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.
There was a bug created to remove the Required label from the category and tag fields if they have a values set. I can include the merchant field in the scope of that bug
…ards/merchant-required
Reviewer Checklist
Screenshots/VideosiOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
🎯 @aimane-chnaif, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #36607. |
✋ 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/cead22 in version: 1.4.43-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.43-20 🚀
|
Details
Fixed Issues
$#36169
$#35012
PROPOSAL:
In this PR we are adding the
Required
label to theMerchant
category whenever making money requests within Workspaces. We're also updating the way in which it's determined if a request belongs to a workspace in some instances.Tests
Testing for creating a money request in a workspace (Required should appear)
Testing for creating a p2p money request (Required should not appear)
Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.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 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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop