feat(contacts): surface company contracts, projects, invoices, assets on detail page #208

Merged
vas2000-work merged 1 commit from feat/mapps-195-company-detail-relationships into main 2026-06-16 23:49:00 +02:00
Owner

The company detail page rendered only Contacts, Sites, and Recent Tickets, omitting the equally company-scoped Contracts, Projects, Invoices, and Assets. An account manager had to leave the company page and filter each module separately to see them.

Add four relationship cards to the company detail page, each backed by the module's existing ?company_id= list filter (/contracts, /projects, /invoices, /assets) with per_page=5. Every card mirrors the existing card style: a loading state, a clean per-entity empty state, a status badge, an identifying link into the module detail route, and a "View All" affordance. The Assets card resolves asset_type_id to a readable type name via a one-shot /asset-types fetch. The Statistics panel gains Contracts, Projects, Invoices, and Assets counts, each read from the same list envelope's meta.total so no new count endpoints are required.

No backend changes: all four filters already exist server-side. Status/money helpers are kept local to contacts.rs because the per-module versions are private; this keeps the change to a single file.

#MAPPS-195

The company detail page rendered only Contacts, Sites, and Recent Tickets, omitting the equally company-scoped Contracts, Projects, Invoices, and Assets. An account manager had to leave the company page and filter each module separately to see them. Add four relationship cards to the company detail page, each backed by the module's existing `?company_id=` list filter (`/contracts`, `/projects`, `/invoices`, `/assets`) with `per_page=5`. Every card mirrors the existing card style: a loading state, a clean per-entity empty state, a status badge, an identifying link into the module detail route, and a "View All" affordance. The Assets card resolves `asset_type_id` to a readable type name via a one-shot `/asset-types` fetch. The Statistics panel gains Contracts, Projects, Invoices, and Assets counts, each read from the same list envelope's `meta.total` so no new count endpoints are required. No backend changes: all four filters already exist server-side. Status/money helpers are kept local to contacts.rs because the per-module versions are private; this keeps the change to a single file. #MAPPS-195
feat(contacts): surface company contracts, projects, invoices, assets on detail page
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 59s
Create release / Create release from merged PR (pull_request) Has been skipped
60161e6516
The company detail page rendered only Contacts, Sites, and Recent Tickets, omitting the equally company-scoped Contracts, Projects, Invoices, and Assets. An account manager had to leave the company page and filter each module separately to see them.

Add four relationship cards to the company detail page, each backed by the module's existing `?company_id=` list filter (`/contracts`, `/projects`, `/invoices`, `/assets`) with `per_page=5`. Every card mirrors the existing card style: a loading state, a clean per-entity empty state, a status badge, an identifying link into the module detail route, and a "View All" affordance. The Assets card resolves `asset_type_id` to a readable type name via a one-shot `/asset-types` fetch. The Statistics panel gains Contracts, Projects, Invoices, and Assets counts, each read from the same list envelope's `meta.total` so no new count endpoints are required.

No backend changes: all four filters already exist server-side. Status/money helpers are kept local to contacts.rs because the per-module versions are private; this keeps the change to a single file.

#MAPPS-195
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!208
No description provided.