Skip to content

feat(admin/products): rework product management UX - #24

Merged
laithanhhung merged 1 commit into
devfrom
feat/products-management-ux
Jul 24, 2026
Merged

feat(admin/products): rework product management UX#24
laithanhhung merged 1 commit into
devfrom
feat/products-management-ux

Conversation

@laithanhhung

@laithanhhung laithanhhung commented Jul 24, 2026

Copy link
Copy Markdown
Member
  • List shows active products only (filtered by isDeleted, not isActive)
  • Fetch all products via full offset pagination (was capped at 100)
  • Details column → actions (edit/deactivate); edit moved to a dialog
  • Category picker: parent → child cascade, active-only, child-first auto-fills parent; child is a searchable autocomplete
  • Table category cell shows parent + child; even column spacing
  • Read-only meta: id/created/updated on one even row
  • Edit image is click-to-enlarge in a preview dialog
  • Units in the product form are active-only
  • Fix "no image" placeholder clipping Vietnamese diacritics

Summary by CodeRabbit

  • New Features
    • Added parent and sub-category selection when creating or editing products.
    • Added product edit dialogs with image preview, upload/remove controls, descriptions, and record details.
    • Added direct row actions for editing and deactivating products.
    • Added image viewing and created/updated timestamp displays.
  • Improvements
    • Product lists now load more complete results and show active units and categories.
    • Added English and Vietnamese labels for CRUD fields, statuses, timestamps, IDs, images, and category levels.

- List shows active products only (filtered by isDeleted, not isActive)
- Fetch all products via full offset pagination (was capped at 100)
- Details column → actions (edit/deactivate); edit moved to a dialog
- Category picker: parent → child cascade, active-only, child-first
  auto-fills parent; child is a searchable autocomplete
- Table category cell shows parent + child; even column spacing
- Read-only meta: id/created/updated on one even row
- Edit image is click-to-enlarge in a preview dialog
- Units in the product form are active-only
- Fix "no image" placeholder clipping Vietnamese diacritics

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kody-ai

kody-ai Bot commented Jul 24, 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 28ac251 into dev Jul 24, 2026
1 of 3 checks passed
@coderabbitai

coderabbitai Bot commented Jul 24, 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: e230064f-13d0-40d8-9775-cc0d640121f6

📥 Commits

Reviewing files that changed from the base of the PR and between e5195f0 and ea3c215.

📒 Files selected for processing (5)
  • public/i18n/en.json
  • public/i18n/vi.json
  • src/app/modules/admin/catalog/catalog-admin.service.ts
  • src/app/modules/admin/catalog/products.component.html
  • src/app/modules/admin/catalog/products.component.ts

📝 Walkthrough

Walkthrough

The admin product catalog now loads complete product lists, filters inactive records, supports parent/child category selection, and uses dedicated edit dialogs with image previews and metadata. English and Vietnamese translations add CRUD and category labels.

Changes

Catalog workflow

Layer / File(s) Summary
Catalog data loading
src/app/modules/admin/catalog/catalog-admin.service.ts, src/app/modules/admin/catalog/products.component.ts
Unit loading supports active-only requests, product loading uses paginated retrieval, and catalog option loading uses active categories and units.
Category and product state
src/app/modules/admin/catalog/products.component.ts
Product filtering, edit state, parent/child category selection, deactivation, category labels, image previews, and localized date formatting were updated.
Catalog dialogs and row actions
src/app/modules/admin/catalog/products.component.html, src/app/modules/admin/catalog/products.component.ts, public/i18n/en.json, public/i18n/vi.json
Rows now expose edit/deactivate actions; create and edit dialogs support hierarchical categories, image controls, metadata, and new localized labels.

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

Sequence Diagram(s)

sequenceDiagram
  participant ProductsComponent
  participant CatalogAdminService
  participant Catalog APIs
  participant Edit dialog
  ProductsComponent->>CatalogAdminService: Load active catalog options
  CatalogAdminService->>Catalog APIs: Request products, units, and categories
  Catalog APIs-->>CatalogAdminService: Return catalog data
  ProductsComponent->>Edit dialog: Open selected product
  Edit dialog->>ProductsComponent: Submit edited product fields
  ProductsComponent->>CatalogAdminService: Save or deactivate product
  CatalogAdminService->>Catalog APIs: Persist catalog change
Loading

Possibly related PRs

Poem

A bunny hops through categories bright,
Parent then child, selected just right.
Edit dialogs open, images glow,
Old inactive rows now hide below.
New labels bloom in every tongue—
CRUD carrots for everyone!

✨ 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/products-management-ux

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