feat(admin): visual badge manager with storefront-accurate previews

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

P0 user feedback: badges were a comma-separated text input with no preview.

- Replaced with a chip editor: current badges render as removable pills in the exact colors customers see on the storefront (colors sourced from getBadgeClass/item.utils.ts so admin preview and product card never drift)
- The standard set (new/sale/exclusive/hot/limited/bestseller/featured) is offered as one-click add chips; custom badges added via text field, unlimited, shown in the storefront's custom-badge grey
- Deliberately NOT per-badge arbitrary colors: badge colors are part of the storefront design contract (string[] + fixed palette); introducing per-badge color storage would change the product data shape consumed by the future backend
- New adminProducts keys (badgesHint, addBadge, removeBadge, customBadgePlaceholder) in en/ru/hy; verified in browser
This commit is contained in:
sdarbinyan
2026-07-19 08:44:20 +04:00
parent 31c64e9647
commit afaf79d327
7 changed files with 83 additions and 4 deletions

View File

@@ -1553,6 +1553,10 @@ export interface Translations {
seoGenerate: string;
seoGenerateHint: string;
translationsHint: string;
badgesHint: string;
addBadge: string;
removeBadge: string;
customBadgePlaceholder: string;
seoExplain: string;
searchTitle: string;
searchTitleHint: string;