feat: Update proto namespaces and enable product image management
This commit is contained in:
@@ -37,46 +37,40 @@
|
||||
### BulkEdit Module
|
||||
- ✅ `Pages/Products/BulkEdit.razor*` - ویرایش گروهی محصولات (ENABLED)
|
||||
|
||||
### BulkEdit Module
|
||||
- ✅ `Pages/Products/BulkEdit.razor*` - ویرایش گروهی محصولات (ENABLED)
|
||||
|
||||
### Product Image Management
|
||||
- ✅ `Pages/Products/Components/GalleryDialog.razor*` - گالری تصاویر (ENABLED)
|
||||
- ✅ `Pages/Products/Components/CreateDialog.razor*` - ایجاد محصول با تصویر (ENABLED)
|
||||
- ✅ `Pages/Products/Components/UpdateDialog.razor*` - ویرایش محصول با تصویر (ENABLED)
|
||||
|
||||
---
|
||||
|
||||
## ❌ فایلهای هنوز Exclude
|
||||
|
||||
### گروه 1: نیاز به Proto Methods جدید
|
||||
**هیچ فایلی Exclude نیست!** ✨
|
||||
|
||||
| فایل | Proto | متد/Message مورد نیاز |
|
||||
|------|-------|----------------------|
|
||||
| `Pages/Products/Components/GalleryDialog.razor*` | Products | `AddProductImageAsync`, `RemoveProductImageAsync`, `ImageFileModel` |
|
||||
| `Pages/Products/Components/CreateDialog.razor*` | Products | `CreateProductWithImageRequest`, `ImageFileModel` |
|
||||
| `Pages/Products/Components/UpdateDialog.razor*` | Products | `UpdateProductWithImageRequest`, `ImageFileModel` |
|
||||
تمامی فایلها فعال شدند. Proto Messages و RPCهای لازم برای Image Upload اضافه شدند.
|
||||
|
||||
**تعداد**: 3 فایل
|
||||
### ✅ وضعیت نهایی:
|
||||
همه چیز کامل و آماده است:
|
||||
- ✅ `GetProductGalleryAsync` - دریافت لیست تصاویر محصول (READY)
|
||||
- ✅ `AddProductImageAsync` - آپلود تصویر جدید (READY)
|
||||
- ✅ `RemoveProductImageAsync` - حذف تصویر (READY)
|
||||
|
||||
**راهحل**: افزودن RPCهای زیر به `products.proto`:
|
||||
```protobuf
|
||||
rpc AddProductImage(AddProductImageRequest) returns (AddProductImageResponse);
|
||||
rpc RemoveProductImage(RemoveProductImageRequest) returns (google.protobuf.Empty);
|
||||
|
||||
message ImageFileModel {
|
||||
bytes file = 1;
|
||||
string mime = 2;
|
||||
string file_name = 3;
|
||||
}
|
||||
```
|
||||
**Backend Implementation**: ✅ COMPLETED
|
||||
- ProductsService.cs: Methods uncommented
|
||||
- CQRS Handlers: Fully implemented
|
||||
- CMS Integration: Connected
|
||||
- Image Processing: Optimized with SixLabors.ImageSharp
|
||||
|
||||
---
|
||||
|
||||
### گروه 2: نیاز به Refactoring
|
||||
## آمار
|
||||
|
||||
| فایل | مشکل | راهحل |
|
||||
|------|------|---------|
|
||||
| `Pages/Products/BulkEdit.razor*` | استفاده مستقیم از `CMSMicroservice.Protobuf.Protos` | تغییر به `BackOffice.BFF` + افزودن `BulkUpdateProducts` RPC |
|
||||
|
||||
**تعداد**: 1 فایل
|
||||
|
||||
**راهحل**:
|
||||
1. حذف dependency به CMSMicroservice
|
||||
2. افزودن bulk update method به products.proto
|
||||
3. پیادهسازی در Backend
|
||||
- **✅ فایلهای Enabled**: ~38+ صفحه و ~15 سرویس
|
||||
- **❌ فایلهای Excluded**: 0 فایل ✅
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user