Skip to content

feat: add relation managers and infolists to sysadmin team and user resources#122

Merged
ManukMinasyan merged 8 commits intomainfrom
feat/sysadmin-team-resource-relations
Feb 16, 2026
Merged

feat: add relation managers and infolists to sysadmin team and user resources#122
ManukMinasyan merged 8 commits intomainfrom
feat/sysadmin-team-resource-relations

Conversation

@ManukMinasyan
Copy link
Copy Markdown
Contributor

@ManukMinasyan ManukMinasyan commented Feb 15, 2026

Summary

  • Add ViewTeam page with infolist and 6 read-only relation managers (Members, Companies, People, Tasks, Opportunities, Notes) to sysadmin TeamResource
  • Add count badges on all relation manager tabs
  • Link team names in dashboard TopTeamsTableWidget to team view page
  • Add infolist and team relation managers (Owned Teams, Member Of) to UserResource
  • Implement HasColor on CreationSource enum, removing duplicated color callbacks from 10 files

Test plan

  • Navigate to sysadmin panel, open a team — verify infolist shows team details and all 6 relation tabs with counts
  • Verify relation manager tables are read-only (no create/edit/delete actions)
  • Click a team name in the dashboard Top Teams widget — verify it links to team view page
  • Open a user view — verify infolist and both team tabs (Owned Teams, Member Of) display correctly
  • Verify CreationSource badges still show correct colors across all sysadmin resources

Add read-only relation managers for members, companies, people, tasks,
opportunities, and notes to the sysadmin team view page.
…nfolists

- implement HasColor on CreationSource enum, remove duplicated color callbacks
- add OwnedTeams and MemberOf relation managers to UserResource
- add infolist to UserResource view page
Copilot AI review requested due to automatic review settings February 15, 2026 23:30
Copy link
Copy Markdown

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

Adds richer “view” experiences in the sysadmin panel by introducing infolists + read-only relationship visibility for Teams and Users, and consolidates CreationSource badge coloring into the enum for reuse across resources.

Changes:

  • Add ViewTeam page plus 6 Team relation manager tabs (with count badges) and a Team infolist in sysadmin.
  • Add a User infolist and two Team-related relation managers (Owned Teams, Member Of) in sysadmin.
  • Implement HasColor on CreationSource and remove duplicated badge color callbacks; link Top Teams dashboard team names to Team view.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
docs/plans/2026-02-16-team-resource-relations.md Adds an implementation plan for Team view + relations + dashboard link changes.
docs/plans/2026-02-16-team-resource-relations-design.md Adds a design summary for the sysadmin Team relation managers and dashboard link behavior.
app/Enums/CreationSource.php Centralizes Filament badge color selection via HasColor::getColor().
app-modules/SystemAdmin/src/Filament/Widgets/TopTeamsTableWidget.php Makes team names clickable to navigate to the sysadmin Team “view” page.
app-modules/SystemAdmin/src/Filament/Resources/UserResource.php Adds a User infolist and registers team relation managers for the view page.
app-modules/SystemAdmin/src/Filament/Resources/UserResource/RelationManagers/OwnedTeamsRelationManager.php Adds “Owned Teams” relation tab with badge count and table linking to Team view.
app-modules/SystemAdmin/src/Filament/Resources/UserResource/RelationManagers/TeamsRelationManager.php Adds “Member Of” relation tab with badge count and membership columns linking to Team view.
app-modules/SystemAdmin/src/Filament/Resources/TeamResource.php Adds Team infolist, registers relation managers, and registers ViewTeam page.
app-modules/SystemAdmin/src/Filament/Resources/TeamResource/Pages/ViewTeam.php Introduces a Team view page (ViewRecord) with Edit header action.
app-modules/SystemAdmin/src/Filament/Resources/TeamResource/RelationManagers/MembersRelationManager.php Adds Team members relation manager with badge count and membership “Joined” column.
app-modules/SystemAdmin/src/Filament/Resources/TeamResource/RelationManagers/CompaniesRelationManager.php Adds Team companies relation manager with badge count and creation source badge.
app-modules/SystemAdmin/src/Filament/Resources/TeamResource/RelationManagers/PeopleRelationManager.php Adds Team people relation manager with badge count and creation source badge.
app-modules/SystemAdmin/src/Filament/Resources/TeamResource/RelationManagers/TasksRelationManager.php Adds Team tasks relation manager with badge count and creation source badge.
app-modules/SystemAdmin/src/Filament/Resources/TeamResource/RelationManagers/OpportunitiesRelationManager.php Adds Team opportunities relation manager with badge count and creation source badge.
app-modules/SystemAdmin/src/Filament/Resources/TeamResource/RelationManagers/NotesRelationManager.php Adds Team notes relation manager with badge count and creation source badge.
app-modules/SystemAdmin/src/Filament/Resources/TaskResource.php Removes duplicated CreationSource badge color closure in favor of enum HasColor.
app-modules/SystemAdmin/src/Filament/Resources/PeopleResource.php Removes duplicated CreationSource badge color closure in favor of enum HasColor.
app-modules/SystemAdmin/src/Filament/Resources/OpportunityResource.php Removes duplicated CreationSource badge color closure in favor of enum HasColor.
app-modules/SystemAdmin/src/Filament/Resources/NoteResource.php Removes duplicated CreationSource badge color closure in favor of enum HasColor.
app-modules/SystemAdmin/src/Filament/Resources/CompanyResource.php Removes duplicated CreationSource badge color closure in favor of enum HasColor.

Comment on lines 161 to 165
return [
'index' => ListTeams::route('/'),
'create' => CreateTeam::route('/create'),
'view' => ViewTeam::route('/{record}'),
'edit' => EditTeam::route('/{record}/edit'),
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

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

New behavior is introduced here (Team view page, infolist, and multiple relation managers), but there’s no accompanying automated coverage. Please add/update Pest tests to render the ViewTeam page and assert the infolist + relation manager tabs/badges render as expected for a seeded team.

Copilot generated this review using guidance from repository custom instructions.
The table query was built eagerly during bootedInteractsWithTable(),
baking filter values into raw SQL. When #[Reactive] updated pageFilters,
the stale Builder was reused. Wrapping in a closure ensures the query
is rebuilt with current filter values on each render.

Also removes dead pollingInterval property and fixes inaccurate docblock
on CreationSource::getColor(). Updates design doc to match implementation.
@ManukMinasyan ManukMinasyan merged commit 578fe23 into main Feb 16, 2026
9 checks passed
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.

2 participants