fix: remove discount balance UI entirely — 100% discount auto-applied by server
Build and Deploy to Kubernetes / build-and-deploy (push) Has been cancelled

This commit is contained in:
masoodafar-web
2026-02-16 21:57:18 +03:30
parent 1dc60faf4a
commit 01b9f1eb98
2 changed files with 8 additions and 105 deletions
@@ -52,55 +52,6 @@
}
</MudPaper>
<!-- Discount Balance (Auto Applied) -->
<MudPaper Elevation="2" Class="pa-4 rounded-lg mb-3">
<MudStack Row="true" Spacing="2" AlignItems="AlignItems.Center" Class="mb-3">
<MudIcon Icon="@Icons.Material.Filled.Loyalty" Color="Color.Secondary" />
<MudText Typo="Typo.h6">تخفیف کیف تخفیفی</MudText>
</MudStack>
<MudStack Spacing="2">
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center" Class="flex-wrap">
<MudText Typo="Typo.body2">موجودی کیف تخفیفی شما:</MudText>
<MudText Typo="Typo.subtitle1" Color="Color.Secondary" Class="fw-bold">
@FormatPrice(_discountBalance) تومان
</MudText>
</MudStack>
@if (MaxUsable > 0)
{
<MudAlert Severity="Severity.Success" Variant="Variant.Outlined" Dense="true">
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center" Class="flex-wrap">
<MudText Typo="Typo.body2">مبلغ تخفیف اعمال‌شده:</MudText>
<MudText Typo="Typo.subtitle1" Color="Color.Success" Class="fw-bold">
@FormatPrice(MaxUsable) تومان
</MudText>
</MudStack>
</MudAlert>
@if (GatewayAmount > 0)
{
<MudAlert Severity="Severity.Info" Variant="Variant.Outlined" Dense="true">
مبلغ @FormatPrice(MaxUsable) تومان از کیف تخفیفی کسر و
مبلغ @FormatPrice(GatewayAmount) تومان از درگاه پرداخت دریافت خواهد شد.
</MudAlert>
}
else
{
<MudAlert Severity="Severity.Success" Variant="Variant.Outlined" Dense="true">
کل مبلغ سفارش از کیف تخفیفی پرداخت خواهد شد.
</MudAlert>
}
}
else
{
<MudAlert Severity="Severity.Warning" Variant="Variant.Outlined" Dense="true">
موجودی کیف تخفیفی شما کافی نیست. کل مبلغ از درگاه پرداخت دریافت خواهد شد.
</MudAlert>
}
</MudStack>
</MudPaper>
<!-- Notes -->
<MudPaper Elevation="2" Class="pa-4 rounded-lg">
<MudText Typo="Typo.h6" Class="mb-2">توضیحات سفارش</MudText>
@@ -149,30 +100,15 @@
<MudStack Spacing="1">
<MudStack Row="true" Justify="Justify.SpaceBetween">
<MudText Typo="Typo.body2">جمع کل:</MudText>
<MudText Typo="Typo.body2">@FormatPrice(DiscountCart.TotalPrice)</MudText>
</MudStack>
@if (MaxUsable > 0)
{
<MudStack Row="true" Justify="Justify.SpaceBetween">
<MudText Typo="Typo.body2" Color="Color.Success">از کیف تخفیفی:</MudText>
<MudText Typo="Typo.body2" Color="Color.Success">@FormatPrice(MaxUsable)-</MudText>
</MudStack>
}
<MudDivider Class="my-1" />
<MudStack Row="true" Justify="Justify.SpaceBetween">
<MudText Typo="Typo.subtitle1" Class="fw-bold">پرداخت از درگاه:</MudText>
<MudText Typo="Typo.subtitle1" Class="fw-bold">جمع کل:</MudText>
<MudText Typo="Typo.subtitle1" Color="Color.Primary" Class="fw-bold">
@FormatPrice(GatewayAmount) تومان
@FormatPrice(DiscountCart.TotalPrice) تومان
</MudText>
</MudStack>
<MudText Typo="Typo.caption" Class="mud-text-secondary">
مالیات بر ارزش افزوده صرفاً بر مبلغ درگاه محاسبه خواهد شد.
</MudText>
<MudAlert Severity="Severity.Success" Variant="Variant.Text" Dense="true" Class="mt-1">
تخفیف ۱۰۰٪ از کیف تخفیفی اعمال می‌شود.
</MudAlert>
</MudStack>
<MudButton Disabled="@(!CanPlaceOrder || _placing)" Class="mt-3 w-100-mobile"