feat(contacts): collapsible company-detail sections (MAPPS-247) #261
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/mapps-247-collapsible-company-detail-sections"
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?
Add a reusable CollapsibleCard component (src/components/collapsible_card.rs, exported from the components barrel) that renders like Card but collapses its body behind a chevron toggle in the header, shows an optional item count beside the title, and keeps the "View all" action visible while collapsed. Only a dedicated chevron button toggles the body so header action links/buttons keep working.
Convert the growable company-detail child sections in CompanyDetailPage to CollapsibleCard: Contacts, Sites, Contracts, Projects, Invoices, Assets. CompanyTicketsCard stays a plain Card (already bounded at 5, the reference pattern).
Cap the previously uncapped Contacts and Sites preview fetches at per_page=5 so they no longer pull an unbounded payload, add meta to PaginatedSites, and feed each card's header count from the envelope's meta.total. Add a "View All" link to the Contacts card (ContactList) to reveal items beyond the preview; the MAPPS-195 cards already carry their own "View All" links. Loading, empty, and error table states are unchanged inside the new collapsible body. No backend changes.
#MAPPS-247
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com