Pass userBillingGraceEndPeriods from useOnyx in some IOU steps#85619
Conversation
|
@shubham1206agra 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f9a46e0044
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (item?.policyID && shouldRestrictUserBillableActions(item.policyID, userBillingGraceEndPeriods, undefined, ownerBillingGraceEndPeriod)) { | ||
| Navigation.navigate(ROUTES.RESTRICTED_ACTION.getRoute(item.policyID)); | ||
| return; |
There was a problem hiding this comment.
Don't block moving an existing expense into another report
handleSelectReport() runs for the edit-report flow as well as the create flow, and in the edit case the parent selectReport callback only reassigns already-created transactions to another existing report. Adding shouldRestrictUserBillableActions() here means members/admins in a past-due workspace can no longer clean up an expense's report assignment, even though this path is not creating a new expense or a new report.
Useful? React with 👍 / 👎.
| if (policyID && shouldRestrictUserBillableActions(policyID, userBillingGraceEndPeriods, undefined, ownerBillingGraceEndPeriod)) { | ||
| Navigation.navigate(ROUTES.RESTRICTED_ACTION.getRoute(policyID)); | ||
| return; |
There was a problem hiding this comment.
Skip billing gating when saving an existing time entry
This button is also used on STEP_HOURS_EDIT (isEditingConfirmation === true), where saveTime() only updates the hours on an already-created request and then navigates back. With the new guard in front of saveTime(), non-owner users in a past-due workspace are now prevented from correcting existing time expenses, even though they are not initiating a new billable action.
Useful? React with 👍 / 👎.
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
Explanation of Change
Fixed Issues
$ #66456
PROPOSAL:
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Prerequisite:
Onyx.merge('sharedNVP_private_billingGracePeriodEnd_[replaceWithYourACcountID]', {value: 1});in consolePR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)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
web.mp4