Repository navigation
feat(admin): rebuild the incident report on the GET streams - #47
Conversation
Báo cáo sự cố is rebuilt as a Fuse-style dashboard over the only two incident
streams an admin can read: procurement exceptions from /admin/order-groups
(the agent's /procurement/tasks is market_agent-only) and hub receiving
discrepancies from /hubs/{hubId}/discrepancies. A period selector narrows the
KPI cards, the charts and the list together, so what the cards claim and what
the table shows can never disagree. Trend bucketing moved to a pure helper
with tests: daily columns up to a month, weekly past it, and reports without a
timestamp stay in the counts rather than being dropped.
Batch detail now reads GET /admin/order-groups/{batchId}, the endpoint BE
added in "Add admin procurement batch detail endpoint", instead of paging the
whole list to find one row. The scan stays as a fallback so the page still
works against a backend without the endpoint.
Dashboard shell, analytics and incidents drop the centred max-w-screen-xl
container for the px-6 / md:px-8 gutters the rest of the admin console uses,
so the tab panels line up with the header instead of stepping in and out.
Also carries in-progress console work on claims, users, restaurants, staff,
scheduled orders and order detail.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Code Review Could Not Complete
|
| Options | Enabled |
|---|---|
| Bug | ✅ |
| Performance | ✅ |
| Security | ✅ |
| Business Logic | ✅ |
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 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 |
Báo cáo sự cố is rebuilt as a Fuse-style dashboard over the only two incident streams an admin can read: procurement exceptions from /admin/order-groups (the agent's /procurement/tasks is market_agent-only) and hub receiving discrepancies from /hubs/{hubId}/discrepancies. A period selector narrows the KPI cards, the charts and the list together, so what the cards claim and what the table shows can never disagree. Trend bucketing moved to a pure helper with tests: daily columns up to a month, weekly past it, and reports without a timestamp stay in the counts rather than being dropped.
Batch detail now reads GET /admin/order-groups/{batchId}, the endpoint BE added in "Add admin procurement batch detail endpoint", instead of paging the whole list to find one row. The scan stays as a fallback so the page still works against a backend without the endpoint.
Dashboard shell, analytics and incidents drop the centred max-w-screen-xl container for the px-6 / md:px-8 gutters the rest of the admin console uses, so the tab panels line up with the header instead of stepping in and out.
Also carries in-progress console work on claims, users, restaurants, staff, scheduled orders and order detail.