fix(companies): render every site on the company detail Sites card (MAPPS-316) #345
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
psa-systems/mokosh-apps!345
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/MAPPS-316-sites-card-show-all"
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?
QA report: a company shows N sites in the Sites card header badge
but only N-or-fewer rows are visible with no way to reach the rest.
Two stacked caps were hiding the tail:
sites_resourcefetched?per_page=5(MAPPS-247's preview-cappolicy, copied from Contacts above it).
CompanySitesCardthen rendered onlypage.data.iter().take(3)(MAPPS-249's three-row preview policy).
Other resource cards on the same page (Contacts, Tickets, Contracts,
Projects) carry a "View all" link to a filtered list page so a
capped preview is escapable. Sites has no equivalent destination, so
the cap was a dead end - the badge said 6 but the user saw 3 with no
way forward.
Fix:
?per_page=200. Sites per company are smallin practice (typical 1-20; hard ceiling well under 100), so a
high ceiling renders every site inline without justifying a
dedicated list page.
.take(3)so the render reflects what the fetch returned.Header badge stays accurate (it already read
meta.total, not thepreview length). New / edit / delete affordances per row are
unaffected.
#MAPPS-316