feat: implement VAT management service and integrate VAT calculations across components
This commit is contained in:
@@ -58,11 +58,11 @@
|
||||
<div class="d-flex align-center gap-2">
|
||||
@if (_isAuthenticated)
|
||||
{
|
||||
<MudBadge Content="@_cartCount" Color="Color.Error" Overlap="true" Visible="@(_cartCount > 0)">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.ShoppingCart" Color="Color.Inherit"
|
||||
Href="@(RouteConstants.Store.Cart)" />
|
||||
</MudBadge>
|
||||
|
||||
@* <MudBadge Content="@_cartCount" Color="Color.Error" Overlap="true" Visible="@(_cartCount > 0)"> *@
|
||||
@* *@
|
||||
@* </MudBadge> *@
|
||||
<MudIconButton Icon="@Icons.Material.Filled.ShoppingCart" Color="@(_cartCount > 0?Color.Success:Color.Inherit)"
|
||||
Href="@(RouteConstants.Store.Cart)" />
|
||||
<MudMenu Icon="@Icons.Material.Filled.Person" Color="Color.Inherit" Size="Size.Medium">
|
||||
<MudMenuItem OnClick="NavigateToProfile" Disabled="@(!AuthService.IsCompleteRegister())">
|
||||
پروفایل
|
||||
|
||||
@@ -38,6 +38,8 @@ public partial class MainLayout : IDisposable
|
||||
|
||||
if (_isAuthenticated)
|
||||
{
|
||||
// لود سبد خرید فقط برای کاربر لاگین شده
|
||||
await CartService.EnsureInitializedAsync();
|
||||
CartService.OnChange += OnCartChanged;
|
||||
_cartCount = CartService.Count;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user