feat: add withdrawal requests feature and update VAT loading mechanism
Build and Deploy / build (push) Successful in 1m25s

This commit is contained in:
masoodafar-web
2025-12-20 04:03:11 +03:30
parent 9ee464b8b4
commit 025e8d3c3e
24 changed files with 961 additions and 398 deletions
@@ -30,7 +30,7 @@ public partial class ProductDetail : ComponentBase, IDisposable
private IReadOnlyList<ProductCategoryPathInfo> _categoryPaths = Array.Empty<ProductCategoryPathInfo>();
private ProductGalleryImage? _selectedGalleryImage;
private readonly List<BreadcrumbItem> _breadcrumbItems = new();
private long TotalPrice => VAT.AddVAT((_product?.Price ?? 0) * _qty);
private long TotalPrice => (_product?.Price ?? 0) * _qty;
private bool HasDiscount => _product is { Discount: > 0 and < 100 };
private long? OriginalPrice => HasDiscount && _product is not null
@@ -55,8 +55,7 @@ public partial class ProductDetail : ComponentBase, IDisposable
await Cart.EnsureInitializedAsync();
Cart.OnChange += HandleCartChanged;
// بارگذاری نرخ VAT
await VAT.LoadAsync();
_loading = true;
_product = await ProductService.GetByIdAsync(id);
@@ -80,7 +79,15 @@ public partial class ProductDetail : ComponentBase, IDisposable
await base.OnInitializedAsync();
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
await base.OnAfterRenderAsync(firstRender);
if (firstRender)
{
// بارگذاری نرخ VAT
await VAT.LoadAsync();
}
}
private async Task AddToCart()
{