Skip to content

Feat/admin console enhancements - #27

Merged
laithanhhung merged 3 commits into
devfrom
feat/admin-console-enhancements
Jul 28, 2026
Merged

Feat/admin console enhancements#27
laithanhhung merged 3 commits into
devfrom
feat/admin-console-enhancements

Conversation

@laithanhhung

@laithanhhung laithanhhung commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Added admin pages for managing users, restaurants, products, categories, packing codes, markets, hubs, routes, orders, invoices, and order groups.
    • Added dedicated create and detail workflows, including market pricing, hub staff assignments, restaurant credits, order cancellation, invoice viewing, and manifest actions.
    • Added localized 404/500 error pages and translated pagination labels.
    • Improved order-group filtering, status displays, and detail tabs.
  • Bug Fixes
    • Improved loading indicators, empty states, map loading behavior, and multilingual paginator updates.
  • Style
    • Added expanded status-pill colors, larger pills, and refined navigation styling.

laithanhhung and others added 3 commits July 28, 2026 15:08
Rounds out the admin console per ROLE_MATRIX: audit logs, order-group
detail/progress, restaurant credit statements, packing codes CRUD, hub
staff assignments, read-only route + hub inbound/discrepancy oversight,
and invoices. Adds shared loading-state UI across data-fetching pages,
a search+dropdown combobox on the product unit field, and branded
404/500 error pages. Hand-writes PackingCodes/Invoices API clients
(contract regen needs Docker, unavailable in this environment).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rounds out M5 Orders for the admin console: every restaurant's orders
(GET /orders, filterable by restaurant/status/date range) and a detail
page, both read-only per ROLE_MATRIX. Wires the one documented admin
override — cancelling any order in a cancellable status — via the same
cancel-dialog pattern used for order groups.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… pages

- Fix dashboard KPI card overflow (unformatted large numbers) and drop a
  redundant repeated subtitle.
- Fix AuditLogsComponent overlapping the dashboard header when embedded
  as a tab (it carried a full-page absolute-position layout it no longer
  needs).
- Localize the remaining English leaks on /admin/orders: missing status
  and payment-status i18n keys (draft, batched, not_applicable), and
  Angular Material's built-in MatPaginator labels app-wide via a new
  Transloco-backed MatPaginatorIntl provider.
- Give every order status its own distinct pill color instead of
  several statuses sharing one (added indigo/teal/pink/lime variants).
- Bring in restaurants + order-groups settings work already in the tree:
  routed restaurant create/detail pages (replacing the inline dialog and
  expand-panel), a routed order-group settings page (replacing the
  settings dialog), nav/route updates, and a normalized status-key fix
  shared by order-groups. Also translate the settings page's route-type
  dropdown, which was still showing raw enum values.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@kody-ai

kody-ai Bot commented Jul 28, 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.

@coderabbitai

coderabbitai Bot commented Jul 28, 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: 2599689e-27ee-4565-b3b6-f0cf1e6f2796

📥 Commits

Reviewing files that changed from the base of the PR and between 5ddd098 and baf2b64.

⛔ Files ignored due to path filters (6)
  • src/contract/generated/apis/InvoicesApi.ts is excluded by !**/generated/**
  • src/contract/generated/apis/PackingCodesApi.ts is excluded by !**/generated/**
  • src/contract/generated/apis/index.ts is excluded by !**/generated/**
  • src/contract/generated/models/CreatePackingCodeRequest.ts is excluded by !**/generated/**
  • src/contract/generated/models/UpdatePackingCodeRequest.ts is excluded by !**/generated/**
  • src/contract/generated/models/index.ts is excluded by !**/generated/**
📒 Files selected for processing (82)
  • public/i18n/en.json
  • public/i18n/vi.json
  • src/app/app.config.ts
  • src/app/app.routes.ts
  • src/app/core/i18n/transloco-mat-paginator-intl.ts
  • src/app/core/maps/location-picker.component.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/analytics/analytics-dashboard.component.html
  • src/app/modules/admin/analytics/analytics-dashboard.component.ts
  • src/app/modules/admin/audit-logs/audit-logs.component.html
  • src/app/modules/admin/audit-logs/audit-logs.component.ts
  • src/app/modules/admin/catalog/catalog-admin.service.ts
  • src/app/modules/admin/catalog/categories-create.component.ts
  • src/app/modules/admin/catalog/categories.component.ts
  • src/app/modules/admin/catalog/category-edit.component.html
  • src/app/modules/admin/catalog/category-edit.component.ts
  • src/app/modules/admin/catalog/market-create.component.html
  • src/app/modules/admin/catalog/market-create.component.ts
  • src/app/modules/admin/catalog/market-edit.component.html
  • src/app/modules/admin/catalog/market-edit.component.ts
  • src/app/modules/admin/catalog/market-products.component.html
  • src/app/modules/admin/catalog/market-products.component.ts
  • src/app/modules/admin/catalog/markets.component.html
  • src/app/modules/admin/catalog/markets.component.ts
  • src/app/modules/admin/catalog/packing-codes-create.component.ts
  • src/app/modules/admin/catalog/packing-codes.component.ts
  • src/app/modules/admin/catalog/product-create.component.html
  • src/app/modules/admin/catalog/product-create.component.ts
  • src/app/modules/admin/catalog/products.component.html
  • src/app/modules/admin/catalog/products.component.ts
  • src/app/modules/admin/catalog/units-create.component.ts
  • src/app/modules/admin/invoices/invoice-detail.component.html
  • src/app/modules/admin/invoices/invoice-detail.component.ts
  • src/app/modules/admin/invoices/invoices-list.component.html
  • src/app/modules/admin/invoices/invoices-list.component.ts
  • src/app/modules/admin/logistics/delivery-zones-create.component.ts
  • src/app/modules/admin/logistics/hub-edit.component.html
  • src/app/modules/admin/logistics/hub-edit.component.ts
  • src/app/modules/admin/logistics/hubs-create.component.ts
  • src/app/modules/admin/logistics/logistics-admin.service.ts
  • src/app/modules/admin/logistics/route-detail.component.html
  • src/app/modules/admin/logistics/route-detail.component.ts
  • src/app/modules/admin/logistics/routes-list.component.html
  • src/app/modules/admin/logistics/routes-list.component.ts
  • src/app/modules/admin/logistics/vehicles-create.component.ts
  • src/app/modules/admin/order-groups/order-group-batch-code.ts
  • src/app/modules/admin/order-groups/order-group-detail.component.html
  • src/app/modules/admin/order-groups/order-group-detail.component.ts
  • src/app/modules/admin/order-groups/order-group-status.ts
  • src/app/modules/admin/order-groups/order-groups.component.html
  • src/app/modules/admin/order-groups/order-groups.component.ts
  • src/app/modules/admin/order-groups/order-groups.detail.spec.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.html
  • 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/restaurants/restaurants-admin.component.html
  • src/app/modules/admin/restaurants/restaurants-admin.component.ts
  • src/app/modules/admin/restaurants/restaurants-create.component.html
  • src/app/modules/admin/restaurants/restaurants-create.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/shared/admin-loading-state.component.ts
  • src/app/modules/admin/shared/resource-crud.component.html
  • src/app/modules/admin/shared/resource-crud.component.spec.ts
  • src/app/modules/admin/shared/resource-crud.component.ts
  • src/app/modules/admin/shared/resource-crud.types.ts
  • src/app/modules/admin/users/users-create.component.html
  • src/app/modules/admin/users/users-create.component.ts
  • src/app/modules/admin/users/users-list.component.html
  • src/app/modules/admin/users/users-list.component.ts
  • src/app/modules/errors/error-404.component.html
  • src/app/modules/errors/error-404.component.ts
  • src/app/modules/errors/error-500.component.html
  • src/app/modules/errors/error-500.component.ts
  • src/contract/index.ts
  • src/styles/styles.scss

📝 Walkthrough

Walkthrough

Admin functionality is expanded with routed create/edit pages, catalog and logistics management, order and invoice oversight, order-group detail workflows, restaurant and user administration, error pages, translated pagination, shared loading states, navigation updates, and new visual styles.

Changes

Admin platform and shared infrastructure

Layer / File(s) Summary
Navigation, errors, localization, maps, and shared UI
src/app/app.routes.ts, src/app/core/..., public/i18n/*, src/styles/styles.scss
Adds error routes/pages, translated paginator labels, expanded admin navigation and translations, map loading updates, shared loading states, and new status/navigation styles.
Routed resource CRUD
src/app/modules/admin/shared/*
Adds pageMode="create" and routed detail callbacks to the shared CRUD component, with corresponding tests and resource contracts.

Catalog and logistics management

Layer / File(s) Summary
Catalog create/edit flows
src/app/modules/admin/catalog/*, src/app/modules/admin/admin.routes.ts
Adds routed user, product, market, category, unit, packing-code, and delivery-zone creation/editing flows, including market pricing quick-add behavior.
Logistics oversight
src/app/modules/admin/logistics/*
Adds hub editing with staff and discrepancy oversight, route listing/detail pages, cursor loading, and logistics service methods.

Operational administration

Layer / File(s) Summary
Orders and invoices
src/app/modules/admin/orders/*, src/app/modules/admin/invoices/*, src/app/modules/admin/admin.service.ts, src/app/modules/admin/admin.types.ts
Adds paginated order and invoice lists, detail pages, status formatting, cancellation workflows, invoice parsing, and API contracts.
Order groups
src/app/modules/admin/order-groups/*
Reworks order-group filtering and pagination, adds batch-code normalization, tabbed detail views, member-order prefetching, manifest/cancel actions, and agent assignment.
Restaurants, users, and settings
src/app/modules/admin/restaurants/*, src/app/modules/admin/users/*, src/app/modules/admin/settings/*
Moves creation to dedicated pages, adds restaurant detail and credit workflows, adds user creation, and introduces order-group settings editing.
Analytics
src/app/modules/admin/analytics/*, src/app/modules/admin/audit-logs/*
Adds Overview and Audit Logs tabs, locale-formatted KPI values, and loading-state handling.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

Poem

I’m a rabbit hopping through admin halls,
Where new routes bloom and loading spinner calls.
Orders, markets, hubs now gleam,
Translated labels guide the dream.
“Save!” I thump—then dashboards shine,
With carrots sorted, neat, and fine.

✨ Finishing Touches
📝 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-console-enhancements

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.

@laithanhhung
laithanhhung merged commit 005b939 into dev Jul 28, 2026
2 of 4 checks passed
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