feat(contacts): collapsible company-detail sections (MAPPS-247) #261

Merged
vas2000-work merged 1 commit from feat/mapps-247-collapsible-company-detail-sections into main 2026-06-17 23:01:30 +02:00
Owner

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

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>
feat(contacts): collapsible company-detail sections (MAPPS-247)
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m48s
Create release / Create release from merged PR (pull_request) Has been skipped
1da4cc3671
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>
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!261
No description provided.