Feat/admin fetch all filters - #25
Conversation
- Add fetchAllOffset / fetchAllCursor helpers that page an admin list to completion (backend caps pageSize at 100). Cursor loop stops when the backend returns no nextCursor, so it never regresses or spins. - Apply to products, market-products, hubs, vehicles, hub-manager and market-agent user pickers, and restaurant credit statements/transactions — all previously capped at the first 100 rows. - Products list: replace the single category filter with a parent → child cascade (child narrows by parent; picking a child auto-fills the parent), matching the create/edit dialog. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Fix market-agent assignment never showing: the GET market-assignments
body wraps the ids as { userId, marketIds: [...] }, which the generic
list parser missed (always []). Parse marketIds/markets/assignments
explicitly, tolerating string or object entries.
- Market-agent user list is fetched in full without a pageSize param;
setMarketAgent takes the previous agent from the row instead of
re-scanning every agent (cuts the N+1 request storm).
- Even column widths; fixed pricing/details columns so the header lines
up with the rows. Agent cell truncates the email with an ellipsis.
- LocationPicker: optional queryControl + searchLabelKey — the market
address seeds the map search, so the address is entered once (drives
geocoding) instead of twice. Detail/create forms redesigned compact.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Material buttons default to inline-flex, so the long agent email overflowed its cell. Force the agent button to display:flex and let the label span flex-shrink + truncate so it ellipsises within the column. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Tailwind truncate classes weren't taking inside the Material button, so the email still overflowed. Add explicit width-constraining CSS on the button and an .agent-label rule (min-width:0 + overflow/ellipsis/nowrap), independent of the button's internal structure. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rework the order-groups console around the documented contract (§4.2): - Auto-batch: validate targetDate client-side (optional yyyy-MM-dd) and disable submit until valid, mirroring the backend rule; label the submit as preview vs apply; warn on force/apply. - Render the run result as UI — created/batched/skipped tiles, the batches list (market, zone, order count) and skipped orders with a localized reason — instead of dumping raw JSON. - Explain failures: VALIDATION_ERROR marks the date field, AUTO_BATCH_ALREADY_RUNNING / 409 shows a "busy" banner, everything else an error banner, all via readApiError + describeApiError. - Table gains a status pill and a Created column; cancel opens a dialog with an optional reason; agent assign stays required-only. - Type the auto-batch result (AdminAutoBatchResult) end to end. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Backend list responses carry a `pagination: { total, page, pageSize }`
block, which the old total-only extractor missed. Add extractPagination()
and teach extractTotal to look inside `pagination`. The admin
server-paginated lists — order groups, users, restaurants, audit logs —
sync their paginator's page/size/total from what the backend echoes back.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Load one page of products at a time from the backend (page/pageSize), pushing search and category filtering to the server (`search`/`category`, `includeInactive:false`) and tracking the paginator from the returned `pagination` block — instead of fetching every page up front and filtering/paging on the client. Sorting reorders the loaded page. Pickers that still need the whole catalog (add-product-to-market) use a new productOptions() that pages to completion. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The admin checkboxes (order-groups dry-run/force, settings, hub-staff) had no color, so they rendered in the indigo accent palette. Set color="primary" so they match FreshFlow's green brand, like the auth and checkout checkboxes already do. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Material tints an unselected checkbox's hover/focus ripple with a dark on-surface colour — a heavy grey circle. Tint the state layer and click ripple of primary checkboxes with the brand primary so hover reads smooth and matches the checked state. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move platform settings into a dialog from order groups, align hubs/resource-crud with the markets inventory layout (manager assign, address+map detail), remove hub staff routing, and wire shared page/pageSize across admin tables. Dashboard date range uses Material datepicker; MatTimepicker formats are fixed in app config. Co-authored-by: Cursor <cursoragent@cursor.com>
BE has no offset pagination for these master-data lists — load once and paginate in the table instead of calling listPage per MatPaginator change. Co-authored-by: Cursor <cursoragent@cursor.com>
Code Review Could Not Complete
|
| Options | Enabled |
|---|---|
| Bug | ✅ |
| Performance | ✅ |
| Security | ✅ |
| Business Logic | ✅ |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (37)
📝 WalkthroughWalkthroughAdmin APIs and CRUD screens now support shared pagination, cursor/offset aggregation, assignment dialogs, combined location fields, typed auto-batching, cancellation dialogs, and updated settings and analytics forms. ChangesAdmin foundation
Catalog and logistics
Admin workflows
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
New Features
Improvements