Skip to content

feat(admin): add claims queue and deepen ops screens - #30

Merged
laithanhhung merged 1 commit into
devfrom
feat/admin-claims-ops-screens
Aug 4, 2026
Merged

feat(admin): add claims queue and deepen ops screens#30
laithanhhung merged 1 commit into
devfrom
feat/admin-claims-ops-screens

Conversation

@laithanhhung

@laithanhhung laithanhhung commented Aug 4, 2026

Copy link
Copy Markdown
Member

Shortage/damage claim review belongs with finance; order, restaurant, hub, and catalog screens need the same depth so ops can decide without leaving the console.

Summary by CodeRabbit

  • New Features

    • Added admin claims review and approval interface for managing shortage/damage claims
    • Added hub discrepancy acknowledgment workflow for operations oversight
    • Added order quantity adjustment and status advancement capabilities
    • Added restaurant legal/e-invoice profile display and management
    • Added configurable delivery fee and window settings
  • Improvements

    • Route creation now displays specific reasons when actions are unavailable
    • Statement generation with improved period validation and selection
    • Expanded multi-language support with English and Vietnamese translations

Shortage/damage claim review belongs with finance; order,
restaurant, hub, and catalog screens need the same depth so
ops can decide without leaving the console.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kody-ai

kody-ai Bot commented Aug 4, 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 7fb5feb into dev Aug 4, 2026
1 of 3 checks passed
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8bd6910a-27d3-4cfb-a241-6c0591a0dd93

📥 Commits

Reviewing files that changed from the base of the PR and between 4d87fa9 and e648c72.

📒 Files selected for processing (28)
  • public/i18n/en.json
  • public/i18n/vi.json
  • src/app/core/api/error-codes.ts
  • src/app/core/navigation/navigation.data.ts
  • src/app/modules/admin/admin.routes.ts
  • src/app/modules/admin/admin.service.ts
  • src/app/modules/admin/admin.types.ts
  • src/app/modules/admin/catalog/market-products.component.html
  • src/app/modules/admin/catalog/market-products.component.ts
  • src/app/modules/admin/claims/claims-list.component.html
  • src/app/modules/admin/claims/claims-list.component.ts
  • src/app/modules/admin/claims/claims.service.ts
  • src/app/modules/admin/claims/claims.types.ts
  • src/app/modules/admin/logistics/hub-edit.component.html
  • src/app/modules/admin/logistics/hub-edit.component.ts
  • src/app/modules/admin/logistics/logistics-admin.service.ts
  • src/app/modules/admin/logistics/logistics-admin.types.ts
  • src/app/modules/admin/logistics/route-create.component.html
  • src/app/modules/admin/logistics/route-create.component.ts
  • src/app/modules/admin/orders/order-detail.component.html
  • src/app/modules/admin/orders/order-detail.component.ts
  • src/app/modules/admin/orders/orders-list.component.ts
  • src/app/modules/admin/restaurants/restaurant-detail.component.html
  • src/app/modules/admin/restaurants/restaurant-detail.component.ts
  • src/app/modules/admin/settings/order-group-settings-page.component.html
  • src/app/modules/admin/settings/order-group-settings-page.component.ts
  • src/app/modules/admin/settings/settings.component.html
  • src/app/modules/admin/settings/settings.component.ts
🔥 Files not summarized due to errors (1)
  • src/app/modules/admin/claims/claims.types.ts: Server error: no LLM provider could handle the message

📝 Walkthrough

Walkthrough

Admin workflows now support claims review, order quantity and status operations, hub discrepancy oversight, restaurant legal profiles, closed-period statements, route blockers, pricing validation, and expanded API error localization.

Changes

Admin operations

Layer / File(s) Summary
Backend contracts and error localization
src/app/core/api/error-codes.ts, public/i18n/*.json
API error mappings, operational data shapes, and localized messages now cover the expanded admin workflows.
Claims review workflow
src/app/modules/admin/claims/*, src/app/modules/admin/admin.routes.ts, src/app/core/navigation/navigation.data.ts
The admin claims page supports filtered listing, cursor pagination, approval, rejection, note validation, and localized decision feedback.
Catalog and order operations
src/app/modules/admin/catalog/*, src/app/modules/admin/orders/*, src/app/modules/admin/admin.service.ts, src/app/modules/admin/admin.types.ts
Market quick-add validates price and quantity inputs and handles partial failures. Order details support fulfilled-quantity adjustments and sequential status advancement.
Hub oversight and route blockers
src/app/modules/admin/logistics/*, public/i18n/*.json
Hub oversight loads handovers and eligible drivers and acknowledges open discrepancies. Route creation tracks hub loading and displays localized blocker guidance.
Restaurant profiles and operational settings
src/app/modules/admin/restaurants/*, src/app/modules/admin/settings/*, src/app/modules/admin/admin.service.ts, src/app/modules/admin/admin.types.ts
Restaurant details display legal and invoice profiles and restrict statements to closed Vietnam-local periods. Settings persist delivery fees and limit route types to backend-supported values.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant AdminUser
  participant ClaimsListComponent
  participant ClaimsService
  participant ClaimsAPI
  AdminUser->>ClaimsListComponent: Filter or review claim
  ClaimsListComponent->>ClaimsService: Request claims or submit decision
  ClaimsService->>ClaimsAPI: GET claims or PATCH decision
  ClaimsAPI-->>ClaimsService: Claim page or updated claim
  ClaimsService-->>ClaimsListComponent: Normalized claim data
  ClaimsListComponent-->>AdminUser: Updated list and decision feedback
Loading

Poem

I’m a rabbit, thumping code in the hay,
Claims get reviewed in a tidy array.
Hubs sign off, orders move on,
Profiles and prices greet the dawn.
With clear translated words in view,
Admin paths now follow through.

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/admin-claims-ops-screens

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.

@coderabbitai coderabbitai Bot mentioned this pull request Aug 6, 2026
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