Skip to content

TT-7350 AssignmentTable and AssignSection to utilize new section resolution functions and useShowAssignment hook.#334

Merged
sarahentzel merged 4 commits into
developfrom
TT-7350-assign
May 29, 2026
Merged

TT-7350 AssignmentTable and AssignSection to utilize new section resolution functions and useShowAssignment hook.#334
sarahentzel merged 4 commits into
developfrom
TT-7350-assign

Conversation

@gtryus
Copy link
Copy Markdown
Contributor

@gtryus gtryus commented May 27, 2026

Fixes:

  • TT-7350 assign to user
  • TT-6482 assigned column & Assignment tab in personal projects
  • TT-6474 Hide assigned rows in personal projects
  • TT6372 Select All on Assignment Tab

@gtryus gtryus changed the title TT-7350 AssignmentTable and AssignSection components to utilize new section resolution functions. Introduce useShowAssignment hook for conditional rendering of assignment filters. Add tests for section resolution logic and show assignment functionality. TT-7350 AssignmentTable and AssignSection to utilize new section resolution functions and useShowAssignment hook. May 27, 2026
@gtryus gtryus requested a review from Copilot May 27, 2026 19:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR centralizes the “should assignment UI be shown?” decision into a new useShowAssignment hook and applies it across sheet/plan UI, while also improving how selected assignment rows are resolved to sections (including passage rows) to support assignment/removal workflows in personal/offline contexts.

Changes:

  • Added useShowAssignment hook (+ unit tests) and replaced repeated inline logic across multiple sheet components.
  • Updated filtering UX/logic to hide or clear assignedToMe when assignment isn’t applicable (e.g., personal orgs / offline-only).
  • Added section-resolution helpers (resolveSectionForRecId / resolveSelectedSections) and refactored AssignmentTable selection handling to use them.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/renderer/src/crud/useShowAssignment.ts New hook to determine whether assignment UI should be shown (personal org + offline-only aware).
src/renderer/src/crud/useShowAssignment.test.ts Unit tests covering key useShowAssignment scenarios.
src/renderer/src/crud/index.ts Re-export useShowAssignment from the CRUD barrel.
src/renderer/src/components/Sheet/usePlanSheetFill.tsx Replace inline personal/offline assignment visibility logic with useShowAssignment.
src/renderer/src/components/Sheet/ScriptureTable.tsx Uses useShowAssignment to clear assignedToMe when unavailable; refactors assign close handling to refresh sheet.
src/renderer/src/components/Sheet/PlanTabSelect.tsx Replace inline assignment visibility logic with useShowAssignment.
src/renderer/src/components/Sheet/PlanSheet.tsx Replace inline assignment visibility logic with useShowAssignment.
src/renderer/src/components/Sheet/PlanBar.cy.tsx Cypress updates to support org-driven assignment filter visibility tests with mocked Orbit memory.
src/renderer/src/components/Sheet/filterMenu.tsx Hide assignment-related filter UI and force-clear assignedToMe when assignment filters should not be shown.
src/renderer/src/components/resolveSectionForRecId.ts New helpers to map selected rows (section or passage) to sections.
src/renderer/src/components/resolveSectionForRecId.test.ts Unit tests for the new section-resolution helpers.
src/renderer/src/components/PlanTabs.tsx Replace inline assignment visibility logic with useShowAssignment.
src/renderer/src/components/AssignSection.tsx Improves assign flow with success/failure return and snackbar error reporting.
src/renderer/src/components/AssignmentTable.tsx Refactors selected-section derivation to use new resolver helpers; fixes relationship type when clearing organizationScheme.

Comment thread src/renderer/src/components/Sheet/ScriptureTable.tsx
Comment thread src/renderer/src/components/AssignSection.tsx
Comment thread src/renderer/src/components/Sheet/ScriptureTable.tsx
Greg Trihus added 4 commits May 27, 2026 17:10
…ection resolution functions. Introduce useShowAssignment hook for conditional rendering of assignment filters. Add tests for section resolution logic and show assignment functionality.

Fixes:
- TT-7350 assign to user
- TT-6482 assigned column & Assignment tab in personal projects
- TT-6474 Hide assigned rows in personal projects
- TT6372 Select All on Assignment Tab
…ng unused function and utilizing filter method. Clean up ScriptureTable by removing unnecessary refresh prop from Uploader component.
…Update mountPlanTabSelect calls to include teamGlobal and teamOrgs for improved test coverage of non-personal team scenarios.
…ic and clarity. Move needsLink check in AssignSection to ensure proper assignment flow. Update filter handling in ScriptureTable to create a new filter object from the source, enhancing state management.
@gtryus gtryus requested a review from sarahentzel May 28, 2026 21:06
@sarahentzel sarahentzel merged commit 93d7f19 into develop May 29, 2026
2 checks passed
@sarahentzel sarahentzel deleted the TT-7350-assign branch May 29, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants