feat(contacts): scope company context cards with capped preview, scoped View All, and per-row edit/delete #278

Merged
David merged 2 commits from feat/MAPPS-249-scope-company-context-cards into main 2026-06-19 11:13:57 +02:00
Owner

Each company context card (tickets, contracts, projects, invoices, assets, contacts, sites) now caps its preview at three rows, links "View All" to a company-scoped destination instead of the global list, and exposes a hover three-dot menu per row offering Edit and Delete.

Cards: convert the Recent Tickets card to a CollapsibleCard (with a count badge fed by a new meta on the ticket-summary envelope) so it matches the other relationship cards; pass company_id into the contracts/projects/invoices/assets cards; slice every card's preview to three rows; add a RowActions hover component (a row-hover-revealed ⋯ dropdown) that runs Delete through the shared ConfirmDialog and the module DELETE endpoint, then restarts the card's resource. Edit routes to the module's edit/detail surface (sites reuse SiteFormModal, which already follows the per-field validation pattern).

View All: each card's link now carries ?company_id= via a plain anchor (the file's existing query-param navigation pattern). The destination list pages (tickets, projects, assets, contracts, invoices, contacts) read the param through a new utils::url::current_query_param helper and scope their fetch to that company, so the scoped list shows only that company's records and its rows stay inside the same company.

table: add an optional class prop to TableRow so rows can opt into Tailwind group for the group-hover reveal.

#MAPPS-249

Each company context card (tickets, contracts, projects, invoices, assets, contacts, sites) now caps its preview at three rows, links "View All" to a company-scoped destination instead of the global list, and exposes a hover three-dot menu per row offering Edit and Delete. Cards: convert the Recent Tickets card to a CollapsibleCard (with a count badge fed by a new meta on the ticket-summary envelope) so it matches the other relationship cards; pass company_id into the contracts/projects/invoices/assets cards; slice every card's preview to three rows; add a RowActions hover component (a row-hover-revealed ⋯ dropdown) that runs Delete through the shared ConfirmDialog and the module DELETE endpoint, then restarts the card's resource. Edit routes to the module's edit/detail surface (sites reuse SiteFormModal, which already follows the per-field validation pattern). View All: each card's link now carries ?company_id=<uuid> via a plain anchor (the file's existing query-param navigation pattern). The destination list pages (tickets, projects, assets, contracts, invoices, contacts) read the param through a new utils::url::current_query_param helper and scope their fetch to that company, so the scoped list shows only that company's records and its rows stay inside the same company. table: add an optional class prop to TableRow so rows can opt into Tailwind `group` for the group-hover reveal. #MAPPS-249
feat(contacts): scope company context cards with capped preview, scoped View All, and per-row edit/delete
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m13s
f52a763b52
Each company context card (tickets, contracts, projects, invoices, assets, contacts, sites) now caps its preview at three rows, links "View All" to a company-scoped destination instead of the global list, and exposes a hover three-dot menu per row offering Edit and Delete.

Cards: convert the Recent Tickets card to a CollapsibleCard (with a count badge fed by a new meta on the ticket-summary envelope) so it matches the other relationship cards; pass company_id into the contracts/projects/invoices/assets cards; slice every card's preview to three rows; add a RowActions hover component (a row-hover-revealed ⋯ dropdown) that runs Delete through the shared ConfirmDialog and the module DELETE endpoint, then restarts the card's resource. Edit routes to the module's edit/detail surface (sites reuse SiteFormModal, which already follows the per-field validation pattern).

View All: each card's link now carries ?company_id=<uuid> via a plain anchor (the file's existing query-param navigation pattern). The destination list pages (tickets, projects, assets, contracts, invoices, contacts) read the param through a new utils::url::current_query_param helper and scope their fetch to that company, so the scoped list shows only that company's records and its rows stay inside the same company.

table: add an optional class prop to TableRow so rows can opt into Tailwind `group` for the group-hover reveal.

#MAPPS-249
Merge branch 'main' into feat/MAPPS-249-scope-company-context-cards
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 1m22s
30c3926ab3
David merged commit 0842f91d3e into main 2026-06-19 11:13:57 +02:00
David deleted branch feat/MAPPS-249-scope-company-context-cards 2026-06-19 11:13:57 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!278
No description provided.