Conversation
|
@aimane-chnaif 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] |
|
@aimane-chnaif are you going to be able to review this PR today? We're keen to get it into the deploy. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.mp4Android: mWeb ChromeiOS: mWeb SafariMacOS: Chrome / Safariweb.movMacOS: Desktop |
| !isPaidGroupPolicy || | ||
| (!shouldHidePaymentOptions && ReportUtils.isPayer(session, iouReport) && policy?.reimbursementChoice !== CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_MANUAL); | ||
| const shouldShowPayElsewhereOption = (!isPaidGroupPolicy || policy?.reimbursementChoice === CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_MANUAL) && !isInvoiceReport; | ||
| const shouldShowPaywithExpensifyOption = !shouldHidePaymentOptions && policy?.reimbursementChoice !== CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_MANUAL; |
There was a problem hiding this comment.
Now that ReportUtils.isPayer(session, iouReport) condition is removed, please make sure that this button never shows on payee side.
There was a problem hiding this comment.
shouldHidePaymentOptions covers this condition already. So there's no need here.
| (!shouldHidePaymentOptions && ReportUtils.isPayer(session, iouReport) && policy?.reimbursementChoice !== CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_MANUAL); | ||
| const shouldShowPayElsewhereOption = (!isPaidGroupPolicy || policy?.reimbursementChoice === CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_MANUAL) && !isInvoiceReport; | ||
| const shouldShowPaywithExpensifyOption = !shouldHidePaymentOptions && policy?.reimbursementChoice !== CONST.POLICY.REIMBURSEMENT_CHOICES.REIMBURSEMENT_MANUAL; | ||
| const shouldShowPayElsewhereOption = !shouldHidePaymentOptions && !isInvoiceReport; |
There was a problem hiding this comment.
This also includes REIMBURSEMENT_NO (None). Is that expected?
I thought we're showing this button only for Direct and Indirect.
There was a problem hiding this comment.
shouldHidePaymentOptions covers this condition already. So there's no need here.
|
@shubham1206agra lets try to wrap this up before the Card Address flow PR |
|
@aimane-chnaif Please look into canIOUBePaid method in IOU to clear any doubts about the conditions. |
|
@aimane-chnaif thoughts on the above? Very keen to get this resolved as it's a mainline flow. Thanks! |
Thanks. No doubts now |
aimane-chnaif
left a comment
There was a problem hiding this comment.
Looks like const session = useSession(); is not used anywhere.
Please pull main and fix lint
|
@shubham1206agra lets address this one quickly in the morning, thanks! |
|
wtf there are conflicts on those 7 lines all the time 😢 |
|
@mountiny Fixed conflicts again. |
|
✋ 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/mountiny in version: 9.0.36-0 🚀
|
|
🚀 Deployed to production by https://github.com/grgia in version: 9.0.36-2 🚀
|

Details
Here are the reimbursement states with expected button preview results:
Reimbursement enabled, indirect (no VBBA) -> show Pay elsewhere
Reimbursement enabled, direct (with VBBA) -> show Pay elsewhere and Pay with Expensify
Reimbursement disabled -> no pay button
Fixed Issues
$ #48657
Pre-requisite
Tests
Offline tests
Same as Tests
QA Steps
Same as Tests
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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop