Payment details are not greyed out while offline#13756
Conversation
| IOU_DETAILS_WITH_IOU_REPORT_ID: `${IOU_DETAILS}/:chatReportID/:iouReportID/`, | ||
| getIouDetailsRoute: (chatReportID, iouReportID) => `iou/details/${chatReportID}/${iouReportID}`, | ||
| getIouDetailsRoute: (chatReportID, iouReportID) => `iou/details/${chatReportID}/${iouReportID}/`, | ||
| getIouDetailsWithActionRoute: (chatReportID, iouReportID, iouReportAction) => `iou/details/${chatReportID}/${iouReportID}/${encodeURIComponent(iouReportAction)}/`, |
There was a problem hiding this comment.
I am not sure if I understand, what if you have multiple pending actions? It seems like this page https://user-images.githubusercontent.com/242568/208656289-9d902401-af0b-42c8-8339-35fd93ce6de3.png already knows that the action is pending, we should wrap the IOUPreview.
This is nested in the IOUDetailsPage
App/src/components/ReportTransaction.js
Lines 58 to 72 in 2585cef
Thoughts?
There was a problem hiding this comment.
need to look at this, so maybe, but I also need to check if the Chat Report action Items are not affected.
TBH I think one of them is getting opacity: 0.5 twice atm
There was a problem hiding this comment.
Not sure, what I mean is that in the IOUDetailsPage we already have an information that the reportAction is pending, and also we have this information for the preview in another view so I think there should be some other way, I know this is not very helpful haha, I would have to explore more on my own and dont want to duplicate work
|
@sobitneupane @deetergp One of you needs to 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] |
|
@sobitneupane sorry for the ping, I can handle this testing just fine, worked on this with Andre before. |
|
@sketchydroide Can you please add the Screenshots/Videos for the PR? |
Co-authored-by: Youssef Lourayad <youssef@expensify.com>
Done |
Reviewer Checklist
Screenshots/Videos |
techievivek
left a comment
There was a problem hiding this comment.
Looks good and tests well.
|
✋ 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 @techievivek in version: 1.2.46-0 🚀
|
|
🚀 Deployed to production by @roryabraham in version: 1.2.46-0 🚀
|
| findPendingAction() { | ||
| return _.find(this.props.reportActions, reportAction => reportAction.originalMessage | ||
| && Number(reportAction.originalMessage.IOUReportID) === Number(this.props.route.params.iouReportID) | ||
| && !_.isEmpty(reportAction.pendingAction)); | ||
| } | ||
|
|
||
| render() { | ||
| const sessionEmail = lodashGet(this.props.session, 'email', null); | ||
| const reportIsLoading = _.isUndefined(this.props.iouReport); | ||
| const pendingAction = this.findPendingAction(); |
There was a problem hiding this comment.
Bug:
findPendingActionis returning a reportAction.const pendingActionholds a reportAction, not a string pendingAction string like 'add'- We pass
pendingActionto<IOUPreview>which is expecting an string, not a reportAction object.
There was a problem hiding this comment.
I'll put a small PR correcting it.
There was a problem hiding this comment.
A bit late, but I just remembered this. PR up: #16019






Details
The details of an offline payment should be greyed out until online again (and the transaction goes through)
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/250551
Online tests
Offline tests
QA Steps
Follow online and offline tests
Verify that no errors appear in the JS console
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)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)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android