feat(contacts): scope company context cards with capped preview, scoped View All, and per-row edit/delete #278
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/MAPPS-249-scope-company-context-cards"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
groupfor the group-hover reveal.#MAPPS-249