Redesign menu admin screen with two-panel layout and modal forms

UX improvements:
- Two-panel layout: sticky category sidebar (desktop) + items grid
- Mobile: horizontal scrolling category pills above items
- Category sidebar shows item count badge per category; edit on hover
- Items search bar + instant filter (name, English name, Arabic name)
- Category filter drives items grid (click sidebar = filter items)
- Item cards: image hover reveals Edit button (progressive disclosure)
- Out-of-stock overlay + inline toggle switch (replaces text button)
- Add/Edit item opens in clean modal overlay (no jarring inline expansion)
- Add/Edit category opens in separate modal
- nameEn made optional (was blocking new item creation)
- Consolidated form state with single object per form
- Empty state with illustration and Add CTA
- Skeleton loading grid
- Branch overrides tab wired to branchId from store
- New i18n keys for search, counts, states in en/fa/ar

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-05-28 08:10:25 +03:30
parent 79deab543a
commit 8f81a62ec9
4 changed files with 840 additions and 425 deletions
+18 -1
View File
@@ -651,7 +651,24 @@
"media": "صورة وفيديو",
"tabCatalog": "الكتالوج",
"tabBranch": "إعدادات الفرع",
"selectBranchForOverrides": "اختر فرعاً من الأعلى لإدارة قائمة الفرع."
"selectBranchForOverrides": "اختر فرعاً من الأعلى لإدارة قائمة الفرع.",
"allItems": "كل الأصناف",
"searchItemsPlaceholder": "ابحث عن أصناف…",
"itemCount": "{count} أصناف",
"noItemsInCategory": "لا أصناف في هذه الفئة بعد",
"noItemsMatchSearch": "لا أصناف تطابق بحثك",
"outOfStock": "نفد المخزون",
"newItem": "صنف جديد",
"newCategory": "فئة جديدة",
"editCategoryTitle": "تعديل الفئة",
"close": "إغلاق",
"saving": "جاري الحفظ…",
"model3d": "نموذج ثلاثي الأبعاد",
"nameEnOptional": "الاسم بالإنجليزية (اختياري)",
"addItemSuccess": "تمت إضافة الصنف",
"updateItemSuccess": "تم تحديث الصنف",
"addCategorySuccess": "تمت إضافة الفئة",
"updateCategorySuccess": "تم تحديث الفئة"
},
"branchMenu": {
"title": "قائمة الفرع",
+18 -1
View File
@@ -668,7 +668,24 @@
"media": "Image & video",
"tabCatalog": "Catalog",
"tabBranch": "Branch settings",
"selectBranchForOverrides": "Select a branch above to manage its menu overrides."
"selectBranchForOverrides": "Select a branch above to manage its menu overrides.",
"allItems": "All items",
"searchItemsPlaceholder": "Search items…",
"itemCount": "{count} items",
"noItemsInCategory": "No items in this category yet",
"noItemsMatchSearch": "No items match your search",
"outOfStock": "Out of stock",
"newItem": "New item",
"newCategory": "New category",
"editCategoryTitle": "Edit category",
"close": "Close",
"saving": "Saving…",
"model3d": "3D model",
"nameEnOptional": "English name (optional)",
"addItemSuccess": "Item added",
"updateItemSuccess": "Item updated",
"addCategorySuccess": "Category added",
"updateCategorySuccess": "Category updated"
},
"branchMenu": {
"title": "Branch Menu",
+18 -1
View File
@@ -668,7 +668,24 @@
"media": "تصویر و ویدیو",
"tabCatalog": "کاتالوگ",
"tabBranch": "تنظیمات شعبه",
"selectBranchForOverrides": "برای تنظیم منوی شعبه، یک شعبه از بالا انتخاب کنید."
"selectBranchForOverrides": "برای تنظیم منوی شعبه، یک شعبه از بالا انتخاب کنید.",
"allItems": "همه آیتم‌ها",
"searchItemsPlaceholder": "جستجوی آیتم‌ها…",
"itemCount": "{count} آیتم",
"noItemsInCategory": "هنوز آیتمی در این دسته نیست",
"noItemsMatchSearch": "آیتمی با این عبارت یافت نشد",
"outOfStock": "ناموجود",
"newItem": "آیتم جدید",
"newCategory": "دسته جدید",
"editCategoryTitle": "ویرایش دسته",
"close": "بستن",
"saving": "در حال ذخیره…",
"model3d": "مدل سه‌بعدی",
"nameEnOptional": "نام انگلیسی (اختیاری)",
"addItemSuccess": "آیتم اضافه شد",
"updateItemSuccess": "آیتم به‌روز شد",
"addCategorySuccess": "دسته اضافه شد",
"updateCategorySuccess": "دسته به‌روز شد"
},
"branchMenu": {
"title": "منوی شعبه",
File diff suppressed because it is too large Load Diff