feat(favorites): full-width pages and expand icons for the drawer-only records (approvals, recurring expenses, goal KPIs/time frames, merchants, proposal templates)
What and why
Handover §4.P, fourth PR. Owner, verbatim: "Add a tiny "expand to full width" icon to the task sidebar and every similar right-side preview panel: it opens the record as that full-width page with its own URL — bookmarkable and shareable".
Stacked on #10594 (← #10590 ← #10589); base = #10594's branch, so this diff shows only this PR.
#10589 gave the task drawer its icon and page; #10594 did it for expenses, income, users, organizations and job employees. This PR covers the drawers whose records had no page at all:
| drawer | new page (ngx-record-view-route-page, organization-scoped) | guard |
|---|---|---|
| Approval requests | /pages/employees/approvals/view/:id | REQUEST_APPROVAL_VIEW (as the list) |
| Organization recurring expenses | /pages/accounting/expense-recurring/view/:id | as the list (none) |
| Employee recurring expenses | /pages/employees/recurring-expenses/view/:id | as the list (none) |
| Goal KPIs / time frames | /pages/goals/settings/kpi/:id, /pages/goals/settings/time-frame/:id | as the list (none) |
| Inventory merchants | /pages/organization/inventory/merchants/view/:id | ORG_INVENTORY_VIEW (parent) |
| Proposal templates | /pages/jobs/proposal-template/view/:id | ORG_PROPOSAL_TEMPLATES_VIEW |
Each drawer now shares its section builder with its page (moved out of the component, unchanged), so a record reads the same in both.
Decision (owner asleep): the Zapier actions/triggers drawers keep the drawer only — they show catalog entries (name, description, slug) fetched from Zapier through the integration's access token, not records of the organization, and a page would re-fetch the whole catalog to show three fields.
Red → green
New apps/gauzy/src/app/pages/drawer-full-view-links.routes.spec.ts resolves every drawer's expand link against the real router config (lazy modules loaded; the route matcher moved from the favorites spec into pages/testing/route-matcher.ts, used by both). Red without the new routes:
Tests: 7 failed, 6 passed, 13 total
● approval requests → /pages/employees/approvals/view/<id>
● organization recurring expenses → /pages/accounting/expense-recurring/view/<id>
● employee recurring expenses → /pages/employees/recurring-expenses/view/<id>
● goal KPIs → /pages/goals/settings/kpi/<id>
● goal time frames → /pages/goals/settings/time-frame/<id>
● inventory merchants → /pages/organization/inventory/merchants/view/<id>
● proposal templates → /pages/jobs/proposal-template/view/<id>
Green: 13/13 (each generic page also checked to carry its recordView config), with favorite-links.routes.spec.ts 41/41 and task-view-page.component.spec.ts (apps/gauzy 64/64), ui-core record-view + mapping specs 61/61.
Builds / checks
gauzy web app built from this branch (AOT); cspell + prettier on the changed files. Browser check: comment below.
🤖 Generated with Claude Code
Summary by cubic
Adds "expand to full width" icons to the drawers for approval requests, recurring expenses, goal KPIs/time frames, inventory merchants, and proposal templates. Each icon opens the record as a new full-width page with its own URL, bookmarkable and shareable.
- New record pages (approval requests, organization and employee recurring expenses, goal KPIs/time frames, inventory merchants, proposal templates), each guarded like its list.
- Drawer and page now share the same section builder, so a record reads identically in both.
- Approval and time-frame pages keep the raw status and build the badge with the sections, so a language change re-translates it; drawers keep reading the badge from the row.
- The employee recurring expense page passes the list's own order (startDate ASC) on its read; the service otherwise sends
order=undefined, which the API answers with a 500. - The new spec resolves every drawer's expand link against the real router config; the route matcher it uses was extracted into a shared test helper also used by the favorites spec.
- Zapier actions/triggers drawers stay drawer-only: they show catalog entries fetched from Zapier, not organization records, and a page would re-fetch the whole catalog for three fields.