Skip to content

feat(admin): rebuild the incident report on the GET streams - #47

Merged
laithanhhung merged 1 commit into
devfrom
update/layout
Aug 16, 2026
Merged

laithanhhung merged 1 commit into
devfrom
update/layout

Conversation

@laithanhhung

Copy link
Copy Markdown
Member

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.

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>
@kody-ai

kody-ai Bot commented Aug 16, 2026 •

Copy link
Copy Markdown

Code Review Could Not Complete ⚠️

The review failed before suggestions could be generated.

Reason: The configured API key (google_gemini) is out of credits or has hit its billing limit. Top up the account or adjust the plan.

After fixing the issue, comment @kody review on this PR to re-run the review.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ✅

Access your configuration settings here.

​

@laithanhhung
laithanhhung merged commit cb1159b into dev Aug 16, 2026
1 of 3 checks passed
@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Important

Review available on request

  • 🔍 Trigger review

Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment @coderabbitai review to review the latest changes. For a full review, comment @coderabbitai full review.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f4ce307d-7828-4a7a-8ee9-b96f115721e6


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant