Update Checkout.razor

This commit is contained in:
MeysamMoghaddam
2025-10-13 16:54:22 +03:30
parent fe72c2b446
commit 6f0cd12d8d

View File

@@ -8,7 +8,7 @@
<MudGrid Spacing="4">
<!-- Header -->
<MudItem xs="12">
<MudPaper Elevation="4" Class="mud-elevation-4 pa-6 rounded-2xl mud-theme-surface">
<MudPaper Elevation="4" Class="pa-6 rounded-2xl mud-theme-surface">
<MudStack Spacing="3">
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="3">
<MudIcon Icon="@Icons.Material.Filled.ShoppingCart" Size="Size.Large" Color="Color.Primary" />
@@ -20,15 +20,14 @@
</MudStack>
</MudPaper>
</MudItem>
<!-- Package Details -->
<MudItem xs="12" md="8">
<MudPaper Elevation="4" Class="mud-elevation-4 pa-6 rounded-2xl mud-theme-surface">
<MudStack>
<!-- Package Details -->
<MudPaper Elevation="4" Class="pa-6 rounded-2xl mud-theme-surface">
<MudText Typo="Typo.h5" Class="mb-4 fw-600">جزئیات پکیج</MudText>
@if (_selectedPackage != null)
{
<MudStack Spacing="4">
<MudCard>
<MudCardContent>
<MudGrid Spacing="3" AlignItems="AlignItems.Start">
@@ -50,31 +49,6 @@
</MudGrid>
</MudCardContent>
</MudCard>
<!-- Discount Code Section -->
<MudPaper Outlined="true" Class="pa-4 rounded-xl">
<MudText Typo="Typo.subtitle1" Class="mb-3 fw-600">کد تخفیف</MudText>
<MudStack Row="true" Spacing="2" AlignItems="AlignItems.Stretch">
<MudTextField @bind-Value="_discountCode"
Label="کد تخفیف"
Variant="Variant.Outlined"
Class="flex-grow-1"
Placeholder="کد تخفیف خود را وارد کنید" />
<MudButton Variant="Variant.Filled"
Color="Color.Secondary"
OnClick="ApplyDiscountCode"
Disabled="_isApplyingDiscount">
اعمال
</MudButton>
</MudStack>
@if (!string.IsNullOrWhiteSpace(_discountMessage))
{
<MudText Typo="Typo.caption" Color="@(_discountApplied ? Color.Success : Color.Error)" Class="mt-2">
@_discountMessage
</MudText>
}
</MudPaper>
</MudStack>
}
else
{
@@ -91,13 +65,9 @@
</MudStack>
}
</MudPaper>
</MudItem>
<!-- Order Summary & Address -->
<MudItem xs="12" md="4">
<MudStack Spacing="4">
<!-- Address Selection -->
<MudPaper Elevation="4" Class="mud-elevation-4 pa-6 rounded-2xl mud-theme-surface">
<MudPaper Elevation="4" Class="pa-6 rounded-2xl mud-theme-surface">
<MudText Typo="Typo.h5" Class="mb-4 fw-600">انتخاب آدرس</MudText>
@if (_isLoadingAddresses)
@@ -148,11 +118,45 @@
</MudStack>
}
</MudPaper>
</MudStack>
</MudItem>
<!-- Order Summary -->
<MudItem xs="12" md="4">
<MudStack Spacing="4">
<!-- Discount Code Section -->
<MudPaper Elevation="4" Class="pa-6 rounded-2xl mud-theme-surface">
<MudText Typo="Typo.h5" Class="mb-4 fw-600">کد تخفیف</MudText>
<MudStack Spacing="3">
<MudStack Row="true" Spacing="2" AlignItems="AlignItems.Stretch">
<MudTextField @bind-Value="_discountCode"
Label="کد تخفیف"
Variant="Variant.Outlined"
Class="flex-grow-1"
Placeholder="کد تخفیف خود را وارد کنید" />
<MudButton Variant="Variant.Filled"
Color="Color.Secondary"
OnClick="ApplyDiscountCode"
Disabled="_isApplyingDiscount">
اعمال
</MudButton>
</MudStack>
@if (!string.IsNullOrWhiteSpace(_discountMessage))
{
<MudText Typo="Typo.caption" Color="@(_discountApplied ? Color.Success : Color.Error)" Class="mt-2">
@_discountMessage
</MudText>
}
</MudStack>
</MudPaper>
<!-- Order Summary -->
@if (_selectedPackage != null)
{
<MudPaper Elevation="4" Class="mud-elevation-4 pa-6 rounded-2xl mud-theme-surface">
<MudPaper Elevation="4" Class="pa-6 rounded-2xl mud-theme-surface">
<MudText Typo="Typo.h5" Class="mb-4 fw-600">خلاصه سفارش</MudText>
<MudStack Spacing="3">