Finish Cross Cycles migration (properties + tax lots) - #78
Conversation
- Add shared seed-cross-cycles-grid component (cycle-partitioned fetch via filterByCycle, flattened rows sorted/grouped by linking id, matching-criteria pinning, Cycle/Cycle Start columns, data-type-aware filters, clear filters, loading/empty/error states) - List page: persisted cycle multi-select + column-list-profile selection, properties/taxlots tabs - Detail page: scopes the shared grid to the current record's linking id across all cycles - Fix inventory.routes.ts: top-level /properties|taxlots/cross-cycles route was wired to the inventory-detail CrossCyclesComponent instead of the inventory-list one (both classes share a name), making the list page unreachable; export cross-cycles from the inventory-list barrel and alias the import - Guard against org users with no persisted crossCycles/profile settings (a JSONField with no backend default) - Add Cycle Start, Linking ID, and related translation keys - Update MIGRATION.md now that the grid is verified functional Preserves existing v3 filter_by_cycle endpoint/payload semantics; no backend changes required for this app. Tested against a live backend with seeded multi-cycle data (single linked record across 3 cycles, a single-cycle-only record, a 2-of-3-cycle record) covering multi-cycle grouping, configured vs missing profile, empty/no-data cycles, filters, and detail links via Playwright. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Not ready to approve
The new shared grid component has confirmed lifecycle/accessibility issues (subscription duplication on input changes and a non-accessible/untranslated detail link implementation) that should be addressed before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
Completes the Cross Cycles migration in the Angular inventory experience by introducing a shared, reusable cross-cycle ag-grid component and wiring it into both inventory list and detail routes for Properties and Tax Lots.
Changes:
- Added a shared
seed-cross-cycles-gridcomponent that fetches cross-cycle data via the existing v3filter_by_cycleendpoint and renders flattened, cycle-aware rows with profile-driven columns, filters, and states. - Updated inventory list and detail Cross Cycles pages to use the shared grid (including route-param reactivity fixes on the detail side).
- Fixed inventory routing so
/cross-cyclescorrectly loads the list Cross Cycles page; added translation keys and updatedMIGRATION.md.
File summaries
| File | Description |
|---|---|
| src/app/modules/inventory/inventory.routes.ts | Fixes the /cross-cycles route to load the list Cross Cycles component (avoids misrouting to the detail tab component). |
| src/app/modules/inventory-list/index.ts | Exports the list Cross Cycles component so routing can import it unambiguously. |
| src/app/modules/inventory-list/cross-cycles/cross-cycles.component.ts | Simplifies the list wrapper to delegate all grid behavior to the shared grid component. |
| src/app/modules/inventory-list/cross-cycles/cross-cycles.component.html | Uses Transloco for the page title and renders the shared grid in list mode. |
| src/app/modules/inventory-detail/cross-cycles/cross-cycles.component.ts | Loads the current view’s linking id across route changes and passes it into the shared grid. |
| src/app/modules/inventory-detail/cross-cycles/cross-cycles.component.html | Replaces the placeholder “in development” state with the shared grid scoped by linking id. |
| src/@seed/components/cross-cycles-grid/cross-cycles-grid.component.ts | New shared ag-grid implementation: dependencies, profile/cycle selection, flattening, grouping-by-sort, formatting, and detail navigation. |
| src/@seed/components/cross-cycles-grid/cross-cycles-grid.component.html | New shared grid UI: cycle/profile selectors, clear filters, loading/error/empty states, and ag-grid host markup. |
| public/i18n/en_US.json | Adds/extends translation keys used by the new grid UI. |
| MIGRATION.md | Updates migration status and documents Cross Cycles parity and verification evidence. |
Review details
- Files reviewed: 10/10 changed files
- Comments generated: 5
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Summary
Finishes the Cross Cycles migration for both Properties and Tax Lots (list + detail routes).
Previously
setGrid()returnedEMPTY, the grid markup was commented out, and the detail tabjust showed "Cross Cycles in development."
Changes
seed-cross-cycles-gridcomponent (src/@seed/components/cross-cycles-grid/) usedby both the list and detail pages (mirrors the existing
ColumnProfilesComponentlist/detailreuse pattern):
InventoryService.filterByCycle()(existing v3filter_by_cycleendpoint, unchanged payload)this app has no row-grouping module — that's an Enterprise-only feature — so grouping is
done via sort + a row-boundary style instead of a tree)
data-type-aware filters (date/number/text), decimal formatting from the org's
display_decimal_placesinventory-list/cross-cycles): persisted cycle multi-select +column-list-profile selection (
currentUser.settings.crossCycles/.profile.list), guardedagainst users who've never saved these settings before (a bare JSON field with no backend
default)
inventory-detail/cross-cycles): scopes the shared grid to the current record'slinking id across all of the org's cycles; fixed a hardcoded
'properties'type and reactiveroute-param handling
inventory.routes.ts's top-level/properties|taxlots/cross-cyclesroute waswired to the inventory-detail
CrossCyclesComponentinstead of the inventory-list one —both files export a class with the same name, and only the detail one was ever imported, so
the list page was completely unreachable (it 500'd trying to parse "cross-cycles" as a numeric
view id). Exported the list component from the
inventory-listbarrel and aliased the import.Cycle Start,Linking ID, and related translation keys added topublic/i18n/en_US.jsonMIGRATION.mdupdated now that the grid is verified functionalPreserves the existing v3
filter_by_cycleendpoint and payload semantics — no backend changesrequired for this app.
Testing
pnpm lintandpnpm buildpasslinked across all 3 seeded cycles, one existing in only 1 of 3 cycles, and one in 2 of 3 —
covering multi-cycle grouping, configured vs. missing column-list profile, empty/no-data
cycles, filters, tab switching, and detail links (from both the list grid and the detail-scoped
grid)
Screenshots