Conversation
Master merge to dev - hide BA details on projects in work app
There was a problem hiding this comment.
Pull request overview
This PR refactors Work app billing-account UI components to better control when billing-account details are fetched and to centralize budget/details rendering logic (including the copilot-safe “member payments remaining” display).
Changes:
- Extracts helper functions in
ProjectsTableto gate fetching billing-account details until the details modal is opened, and to encapsulate budget badge rendering. - Refactors
ProjectBillingAccountExpiredNoticeto reuse shared budget utilities, decouple the details button from the budget display, and passprojectId/showMemberPaymentsRemaininginto the line-items modal. - Updates
ProjectBillingAccountExpiredNoticetests to assert the disabled-state behavior more explicitly.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/apps/work/src/lib/components/ProjectsTable/ProjectsTable.tsx |
Refactors billing-account cell rendering and fetch gating into small helper functions. |
src/apps/work/src/lib/components/ProjectBillingAccountExpiredNotice/ProjectBillingAccountExpiredNotice.tsx |
Switches to shared budget utils, improves fetch gating logic, and standardizes budget/details rendering + modal props. |
src/apps/work/src/lib/components/ProjectBillingAccountExpiredNotice/ProjectBillingAccountExpiredNotice.spec.tsx |
Updates tests to use the shared render helper and validate budget/details hidden state when disabled. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ? getBillingAccountBudgetInfo(props.billingAccount) | ||
| : undefined | ||
| isModalOpen && props.showPaymentDetails | ||
| canFetchProjectBillingAccountDetails(isModalOpen, props.showPaymentDetails) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related JIRA Ticket:
https://topcoder.atlassian.net/browse/
What's in this PR?