fix(assets): make list rows clickable and add a detail breadcrumb #496
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/PMS-745-asset-list-and-detail-nav"
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?
Closes PMS-745.
Two navigation defects on the Assets surface, both reported from staging.
1. The list row was not clickable.
TableRowin the assets list passed neitherclickable: truenor anonclick, so the asset-nameLinkwas the only navigable target in a row roughly 1200px wide. An audit ofclickable: trueagainstRoute::*Detailreferences shows Assets was the only list page with a detail route that had zero clickable rows: contracts, tickets, billing, contacts, quotes, projects, time and the KB all navigate from anywhere in the row. There was a second effect:TableRowscopes its hover background andcursor-pointerto clickable rows (MAPPS-389), so the Assets list was also the one list giving no hover feedback. Fixed by matchingContractRow/TicketRow. The checkbox column needed no work, becauseSelectRowCellalready callsstop_propagation()on itstd- that is exactly how Tickets combines per-row selection with a clickable row. The nameLinkstays, so middle-click and open-in-new-tab still work.2. The detail page had no breadcrumb.
AssetDetailPagerendered aPageHeaderwithtitleandactionsbut nobreadcrumbs, leaving the browser Back button or the sidebar as the only route back to the list.AssetNewPagealready hadAssets > New Assetfrom MAPPS-294; the detail page was missed in that pass. Now rendersAssets > <asset name>, matchingContractDetailPage.Scope note worth reading. The report compares Assets against Contracts, and that comparison is accurate, but breadcrumbs on detail pages are not yet the norm: only 3 of the 9 non-portal detail pages have one (contract, rate card, company). Ticket, project, invoice, quote and contact detail pages are all missing it too. This PR fixes the reported page, and the remaining five are a separate consistency pass rather than something quietly folded in here.
The crumb list is built by
asset_detail_crumbs, split out so its labels and parent route can be asserted without standing up a router. One test added; 269 lib tests pass, clippy and fmt clean.Verify on staging: click the Type or Company cell of an asset row (opens the asset), click the row checkbox (selects, does not navigate), hover a row (background and pointer match a contract row), then open an asset and use the
Assetscrumb to get back.