Repository navigation
Conversation
Applies the same conditional pattern used by IOURequestStepReport to SearchTransactionsChangeReport and IOURequestEditReport so the Create Report button is hidden when no workspace exists, preventing orphaned report creation. Co-authored-by: Chavda Sachin <ChavdaSachin@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
|
The failing check ( Analysis: The Android build failed due to a transient infrastructure issue — the Grails Maven repository ( Evidence: This PR only modifies two TypeScript files ( |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@MelvinBot, please close the PR. |
|
Closed this PR as requested by |
Explanation of Change
When a user has no workspace, the "Create Report" button should be hidden in the move-expense flow.
IOURequestStepReportalready does this correctly by conditionally passingcreateReportasundefinedwhen no workspace exists. However,SearchTransactionsChangeReportandIOURequestEditReportalways pass a truthycreateReport, which allows users without a workspace to create orphaned reports with nopolicyID.This PR applies the same conditional pattern to both entry points:
SearchTransactionsChangeReport: PassescreateReportasundefinedwhenpolicyForMovingExpensesIDandshouldSelectPolicyare both falsy. Also adds a defensive guard increateReportForPolicyto early-return whenpolicyForMovingExpenses?.idis missing (matching the pattern inIOURequestEditReport).IOURequestEditReport: PassescreateReportasundefinedwhen no workspace exists and there are no per-diem transactions.Fixed Issues
$ #82792
PROPOSAL: #82792 (comment)
Tests
Offline tests
N/A - This change only affects UI visibility of the Create Report button based on existing Onyx state. No network calls are involved.
QA Steps
PR 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