-
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
Enable setting created and merchant fields for new requests #25449
Conversation
@AndrewGable 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] |
@rushatgabhane Ah actually noting that the changes with created and merchant in API are not deployed yet so you should be able to test it offline only. I believe we dont have to hold on the API since this is just adding two new params and if the client doe not send them, its not a problem. |
}, | ||
}; | ||
|
||
class MoneyRequestMerchantPage extends Component { |
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.
@mountiny could you please convert this to a functional component? It should be straighforward.
Or if it's really urgent, we can merge this as-is and I can create a follow up PR to convert to functional component on a probono basis.
}, | ||
}; | ||
|
||
class MoneyRequestCreatedPage extends Component { |
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.
same for this
inputID="moneyRequestCreated" | ||
label={this.props.translate('common.date')} | ||
defaultValue={this.props.iou.created} | ||
maxDate={new Date()} |
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.
- Should we save drafts?
- What happens when we there is a server error? Are we following Red Brick Road pattern here?
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.
No when you close the modal, it should reset that is intentional. RBR is handled separately
merchant, | ||
created: DateUtils.getDBTime(), | ||
merchant: merchant || CONST.REPORT.TYPE.IOU, | ||
created: created || DateUtils.getDBTime(), |
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.
created: DateUtils.getDBTime()
getDBTime() returns time in milisecs. And created is of format YYYY-MM-DD
.
This won't work, right?
I think the server is expecting time in one format. i.e. YYYY-MM-DD
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.
The server does not mind, it can be both, now its passing DateUtils.getDBTime()
and it should work fine
This tests well, just some comments above for you @mountiny |
Reviewer Checklist
Screenshots/VideosMobile Web - ChromeWhatsApp.Video.2023-08-19.at.03.05.29.mp4DesktopScreen.Recording.2023-08-19.at.03.08.17.moviOSScreen.Recording.2023-08-19.at.01.22.27.movAndroidScreen.Recording.2023-08-19.at.03.00.45.mov |
🎯 @rushatgabhane, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #25515. |
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.
@mountiny when splitting a bill, the merchant
and created
isn't set in split details page.
Steps:
- Go offline
- Create a split
- Set merchant and change the date
- Click the split request to open details page
Observe that the merchant and created isn't set
Screen.Recording.2023-08-19.at.03.08.17.mov
@rushatgabhane I will disable this for the split bill case, its more complicated and the backend is not ready for it. thanks for highlighting |
Updated. |
@jasperhuangg 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] |
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.
Tests great!
Do we have an issue for this? |
@luacmartins resolved the merge conflicts. |
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.
LGTM!
We already had approvals from @rushatgabhane @Gonals and myself. Gonna go ahead and merge this since it solves a critical wave 4 issue. |
✋ 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/luacmartins in version: 1.3.56-0 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.56-24 🚀
|
Details
In this PR we are enabling setting merchant and created when new requests are made
Fixed Issues
Partially https://github.com/Expensify/Expensify/issues/301363
Tests
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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
I am having a nightmare with the builds on native or android chrome, skipping it hoping C+ will test it
Web
web25449.mp4
Mobile Web - Chrome
Android emulator is acting up on me
Mobile Web - Safari
iosWeb25449.mp4
Desktop
Same as web
iOS
Android
Android emulator is acting up on me