Update order system with new gRPC services and wallet integration

This commit is contained in:
masoodafar-web
2025-11-28 05:12:55 +03:30
parent 973beb9e2f
commit d8e1fe77b3
20 changed files with 502 additions and 209 deletions
@@ -1,3 +1,4 @@
@using FrontOffice.BFF.UserOrder.Protobuf.Protos.UserOrder
@attribute [Route(RouteConstants.Store.CheckoutSummary)]
<PageTitle>خلاصه خرید</PageTitle>
@@ -20,7 +21,7 @@
<MudAlert Severity="Severity.Warning">
هیچ آدرسی ثبت نشده است. لطفاً از بخش پروفایل آدرس خود را اضافه کنید.
</MudAlert>
<MudButton Class="mt-2" Variant="Variant.Outlined" Href="/profile">افزودن آدرس</MudButton>
<MudButton Class="mt-2" Variant="Variant.Outlined" Href="/profile/addresses">افزودن آدرس</MudButton>
}
else
{
@@ -51,7 +52,15 @@
<MudPaper Elevation="2" Class="pa-4 rounded-lg">
<MudText Typo="Typo.h6" Class="mb-2">روش پرداخت</MudText>
<MudRadioGroup T="PaymentMethod" @bind-SelectedOption="_payment" Color="Color.Primary">
<MudRadio T="PaymentMethod" Option="@PaymentMethod.Wallet" Color="Color.Primary">کیف پول</MudRadio>
<MudRadio T="PaymentMethod" Option="@PaymentMethod.Wallet" Color="Color.Primary">
@* <MudText></MudText> *@
@* <MudText>20000</MudText> *@
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
<MudText Typo="Typo.subtitle1">کیف پول <b></b></MudText>
<MudText Typo="Typo.subtitle2"> @(FormatPrice(walletBalance)) <b></b></MudText>
</MudStack>
</MudRadio>
</MudRadioGroup>
<MudAlert Severity="Severity.Info" Variant="Variant.Outlined">در حال حاضر تنها پرداخت از طریق کیف پول فعال است.</MudAlert>
</MudPaper>
@@ -70,9 +79,15 @@
@foreach (var item in Cart.Items)
{
<MudListItem T="CartItem">
<MudStack Row="true" Justify="Justify.SpaceBetween" Class="w-100">
<MudText>@item.Title x @item.Quantity</MudText>
<MudText>@FormatPrice(item.LineTotal)</MudText>
<MudStack Spacing="1" Class="w-100">
<MudStack Row="true" Justify="Justify.SpaceBetween">
<MudText>@item.Title x @item.Quantity</MudText>
<MudText>@FormatPrice(item.LineTotal)</MudText>
</MudStack>
@if (item.Discount > 0)
{
<MudText Typo="Typo.caption" Class="mud-text-secondary">@($"تخفیف: {item.Discount}%")</MudText>
}
</MudStack>
</MudListItem>
}