feat: add withdrawal requests feature and update VAT loading mechanism
Build and Deploy / build (push) Successful in 1m25s
Build and Deploy / build (push) Successful in 1m25s
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user