177 lines
6.9 KiB
Markdown
177 lines
6.9 KiB
Markdown
# فایلهای Exclude شده از Build
|
||
|
||
> آخرین بروزرسانی: December 6, 2025
|
||
>
|
||
> این فایلها از build خارج شدند ولی **حذف نشدند**
|
||
|
||
## ✅ فایلهای برگردانده شده (Enabled)
|
||
|
||
این فایلها قبلاً exclude بودند و حالا **فعال** شدند:
|
||
|
||
### DiscountShop Module
|
||
- ✅ `Pages/DiscountShop/**` - تمام صفحات فروشگاه تخفیفی
|
||
- ✅ `Services/DiscountProduct/**` - سرویس محصولات تخفیفی
|
||
- ✅ `Services/DiscountCategory/**` - سرویس دستهبندیها
|
||
- ✅ `Services/DiscountOrder/**` - سرویس سفارشات
|
||
|
||
### Tag Module
|
||
- ✅ `Pages/Tag/**` - صفحات مدیریت تگ
|
||
- ✅ `Services/Tag/**` - سرویس تگ
|
||
|
||
### PublicMessages Module
|
||
- ✅ `Pages/PublicMessages/**` - مدیریت پیامهای عمومی
|
||
- ✅ `Services/PublicMessage/**` - سرویس پیامها
|
||
|
||
### Payment Module
|
||
- ✅ `Pages/Payment/ManualPayments.razor*` - پرداختهای دستی
|
||
- ✅ `Pages/Payment/Components/ManualPaymentDialog.razor*` - دیالوگ پرداخت
|
||
- ✅ `Pages/Payment/Transactions.razor*` - صفحه تراکنشها
|
||
|
||
### Dashboard
|
||
- ✅ `Pages/Dashboard/DiscountShopWidget.razor*` - ویجت آمار فروشگاه
|
||
|
||
### DragDrop Pages
|
||
- ✅ `Pages/Category/CategoryProductsDragDropPage.razor*` - مدیریت محصولات دسته
|
||
- ✅ `Pages/Products/ProductCategoriesDragDropPage.razor*` - مدیریت دستههای محصول
|
||
|
||
### BulkEdit Module
|
||
- ✅ `Pages/Products/BulkEdit.razor*` - ویرایش گروهی محصولات (ENABLED)
|
||
|
||
---
|
||
|
||
## ❌ فایلهای هنوز Exclude
|
||
|
||
### گروه 1: نیاز به Proto Methods جدید
|
||
|
||
| فایل | 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` |
|
||
|
||
**تعداد**: 3 فایل
|
||
|
||
**راهحل**: افزودن 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;
|
||
}
|
||
```
|
||
|
||
---
|
||
|
||
### گروه 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**: ~30+ صفحه و ~15 سرویس
|
||
- **❌ فایلهای Excluded**: 4 فایل
|
||
- **Proto Projects ساخته شده**: 14
|
||
- **Build Errors**: 0
|
||
|
||
---
|
||
|
||
## Exclude های فعلی در csproj
|
||
|
||
```xml
|
||
<ItemGroup>
|
||
<!-- BulkEdit - needs refactoring -->
|
||
<Compile Remove="Pages\Products\BulkEdit.razor" />
|
||
<Content Remove="Pages\Products\BulkEdit.razor" />
|
||
<Compile Remove="Pages\Products\BulkEdit.razor.cs" />
|
||
|
||
<!-- GalleryDialog - needs AddProductImageAsync/RemoveProductImageAsync -->
|
||
<Compile Remove="Pages\Products\Components\GalleryDialog.razor" />
|
||
<Content Remove="Pages\Products\Components\GalleryDialog.razor" />
|
||
<Compile Remove="Pages\Products\Components\GalleryDialog.razor.cs" />
|
||
|
||
<!-- CreateDialog/UpdateDialog - needs ImageFileModel -->
|
||
<Compile Remove="Pages\Products\Components\CreateDialog.razor" />
|
||
<Content Remove="Pages\Products\Components\CreateDialog.razor" />
|
||
<Compile Remove="Pages\Products\Components\CreateDialog.razor.cs" />
|
||
<Compile Remove="Pages\Products\Components\UpdateDialog.razor" />
|
||
<Content Remove="Pages\Products\Components\UpdateDialog.razor" />
|
||
<Compile Remove="Pages\Products\Components\UpdateDialog.razor.cs" />
|
||
</ItemGroup>
|
||
```
|
||
|
||
---
|
||
|
||
## نکات مهم
|
||
|
||
### برای فعالسازی فایلهای Exclude:
|
||
|
||
1. **GalleryDialog, CreateDialog, UpdateDialog**:
|
||
- نیاز به پیادهسازی Image Upload API در Backend
|
||
- افزودن `ImageFileModel` message به proto
|
||
- افزودن RPC methods برای upload/remove
|
||
|
||
2. **BulkEdit**:
|
||
- حذف dependency به `CMSMicroservice.Protobuf`
|
||
- استفاده از `BackOffice.BFF.Products.Protobuf`
|
||
- افزودن `BulkUpdateProducts` RPC به backend
|
||
|
||
### فایلهای کامل شده که دیگر exclude نیستند:
|
||
|
||
- ✅ تمام ماژول DiscountShop
|
||
- ✅ تمام ماژول Tag
|
||
- ✅ تمام ماژول PublicMessages
|
||
- ✅ تمام ماژول ManualPayments
|
||
- ✅ DiscountShopWidget
|
||
- ✅ Transactions
|
||
- ✅ DragDrop Pages
|
||
|
||
---
|
||
|
||
<!-- BulkEdit -->
|
||
<Compile Remove="Pages\Products\BulkEdit.razor" />
|
||
<Content Remove="Pages\Products\BulkEdit.razor" />
|
||
<Compile Remove="Pages\Products\BulkEdit.razor.cs" />
|
||
|
||
<!-- UserOrder Components -->
|
||
<Compile Remove="Pages\UserOrder\Components\CancelOrderDialog.razor" />
|
||
<Content Remove="Pages\UserOrder\Components\CancelOrderDialog.razor" />
|
||
<Compile Remove="Pages\UserOrder\Components\CancelOrderDialog.razor.cs" />
|
||
<Compile Remove="Pages\UserOrder\Components\ApplyDiscountDialog.razor" />
|
||
<Content Remove="Pages\UserOrder\Components\ApplyDiscountDialog.razor" />
|
||
<Compile Remove="Pages\UserOrder\Components\ApplyDiscountDialog.razor.cs" />
|
||
<Compile Remove="Pages\UserOrder\Components\ChangeOrderStatusDialog.razor" />
|
||
<Content Remove="Pages\UserOrder\Components\ChangeOrderStatusDialog.razor" />
|
||
<Compile Remove="Pages\UserOrder\Components\ChangeOrderStatusDialog.razor.cs" />
|
||
|
||
<!-- Transactions -->
|
||
<Compile Remove="Pages\Payment\Transactions.razor" />
|
||
<Content Remove="Pages\Payment\Transactions.razor" />
|
||
<Compile Remove="Pages\Payment\Transactions.razor.cs" />
|
||
|
||
<!-- Product Dialogs -->
|
||
<Compile Remove="Pages\Products\Components\CreateProductDialog.razor" />
|
||
<Content Remove="Pages\Products\Components\CreateProductDialog.razor" />
|
||
<Compile Remove="Pages\Products\Components\CreateProductDialog.razor.cs" />
|
||
<Compile Remove="Pages\Products\Components\UpdateProductDialog.razor" />
|
||
<Content Remove="Pages\Products\Components\UpdateProductDialog.razor" />
|
||
<Compile Remove="Pages\Products\Components\UpdateProductDialog.razor.cs" />
|
||
<Compile Remove="Pages\Products\Components\GalleryDialog.razor" />
|
||
<Content Remove="Pages\Products\Components\GalleryDialog.razor" />
|
||
<Compile Remove="Pages\Products\Components\GalleryDialog.razor.cs" />
|
||
</ItemGroup>
|
||
```
|