From a27237324614543d8bd9369e1531e753ae56f8a6 Mon Sep 17 00:00:00 2001 From: SysAdmin Date: Thu, 13 Nov 2025 19:17:05 +0000 Subject: [PATCH] feat: Complete Phase 2 - Products responsive mobile cards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added comprehensive mobile card layout for Products/Index, completing Phase 2 responsive design. **Products Mobile View Features:** - Horizontal layout with 80x80px product image on left - Product name, category badge, price, and status on right - Full description (100 chars) below header - 2-column grid for Stock and Weight info - Conditional badges for multi-buys and variants - Full-width "View Details & Edit" button **Mobile UX Highlights:** - Larger product images (80px vs 50px desktop thumbnail) - Price prominently displayed in green (fs-5) - Stock status color-coded (success/warning) - Variations clearly shown with icon badges - Touch-friendly full-width action button **Technical Implementation:** - d-flex for image + info horizontal layout - flex-grow-1 for responsive info section - row g-2 for 2-column grid with gutters - Conditional rendering for variations badges - ARIA labels for accessibility **Phase 2 Now Complete:** ✅ Categories - Simple cards with description ✅ Users - Minimal cards with user info ✅ ShippingRates - 2x2 grid for rate details ✅ VariantCollections - Cards with JSON preview ✅ Products - Rich cards with images and variations ✅ Orders - Mobile cards (already implemented) All main Index views now mobile-optimized! 🚀 Generated with Claude Code Co-Authored-By: Claude --- .../Areas/Admin/Views/Products/Index.cshtml | 92 ++++++++++++++++++- 1 file changed, 91 insertions(+), 1 deletion(-) diff --git a/LittleShop/Areas/Admin/Views/Products/Index.cshtml b/LittleShop/Areas/Admin/Views/Products/Index.cshtml index 78b75b6..17df41e 100644 --- a/LittleShop/Areas/Admin/Views/Products/Index.cshtml +++ b/LittleShop/Areas/Admin/Views/Products/Index.cshtml @@ -30,7 +30,8 @@
@if (Model.Any()) { -
+ +
@@ -118,6 +119,95 @@
+ + +
+ @foreach (var product in Model) + { +
+
+
+ @if (product.Photos.Any()) + { + @product.Photos.First().AltText + } + else + { +
+ +
+ } +
+
@product.Name
+ @product.CategoryName +
+ £@product.Price + @if (product.IsActive) + { + Active + } + else + { + Inactive + } +
+
+
+ +

+ @product.Description.Substring(0, Math.Min(100, product.Description.Length))@(product.Description.Length > 100 ? "..." : "") +

+ +
+
+
+ Stock + @if (product.StockQuantity > 0) + { + @product.StockQuantity units + } + else + { + Out of stock + } +
+
+
+
+ Weight + @product.Weight @product.WeightUnit.ToString().ToLower() +
+
+
+ + @if (product.MultiBuys.Any() || product.Variants.Any()) + { +
+ @if (product.MultiBuys.Any()) + { + + @product.MultiBuys.Count() multi-buys + + } + @if (product.Variants.Any()) + { + + @product.Variants.Count() variants + + } +
+ } + + +
+
+ } +
} else {