feat(T4.2+T4.3+F3): conditional payment, re-purchase, PV display
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 2m33s
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 2m33s
T4.2: Conditional Payment in Checkout - Load package flags via PackageService.GetAllPackagesAsync - Respect SupportsDirectPurchase/SupportsDayaPurchase flags - Add Daya loan payment button when supported - Show alert when no payment method available T4.3: MyPackages Re-Purchase Logic - Load MagicWallet status to detect cycle completion - Show re-purchase CTA when magic cycle is complete - Show magic wallet progress bar during active cycle - Display deposit progress, remaining, and credited amounts F3: PV Display in Order Details - Add CalculateOrderPVAsync to OrderService - Show per-product PV and total PV in Store OrderDetail - Update NuGet to v0.0.188
This commit is contained in:
@@ -112,6 +112,30 @@ else
|
||||
</MudStack>
|
||||
}
|
||||
</MudStack>
|
||||
|
||||
@* نمایش PV سفارش *@
|
||||
@if (_pvData != null && _pvData.TotalPv > 0)
|
||||
{
|
||||
<MudDivider Class="my-2" />
|
||||
<MudStack Spacing="1" Class="pa-2" Style="background-color: var(--mud-palette-background-grey); border-radius: 8px;">
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1">
|
||||
<MudIcon Icon="@Icons.Material.Filled.TrendingUp" Color="Color.Info" Size="Size.Small" />
|
||||
<MudText Typo="Typo.subtitle2" Color="Color.Info">امتیاز فروش (PV)</MudText>
|
||||
</MudStack>
|
||||
@foreach (var product in _pvData.Products)
|
||||
{
|
||||
<MudStack Row="true" Justify="Justify.SpaceBetween">
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">@product.ProductTitle × @product.Quantity</MudText>
|
||||
<MudText Typo="Typo.caption">@string.Format("{0:N0}", product.TotalPv) PV</MudText>
|
||||
</MudStack>
|
||||
}
|
||||
<MudDivider Class="my-1" />
|
||||
<MudStack Row="true" Justify="Justify.SpaceBetween">
|
||||
<MudText Typo="Typo.body2" Class="fw-bold">جمع PV:</MudText>
|
||||
<MudText Typo="Typo.body2" Color="Color.Info" Class="fw-bold">@string.Format("{0:N0}", _pvData.TotalPv) PV</MudText>
|
||||
</MudStack>
|
||||
</MudStack>
|
||||
}
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
</MudContainer>
|
||||
|
||||
@@ -12,12 +12,17 @@ public partial class OrderDetail : ComponentBase
|
||||
[Parameter] public long id { get; set; }
|
||||
|
||||
private GetUserOrderResponse? _order;
|
||||
private CalculateOrderPVResponse? _pvData;
|
||||
private bool _loading;
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
_loading = true;
|
||||
_order = await OrderService.GetOrderAsync(id);
|
||||
if (_order != null)
|
||||
{
|
||||
_pvData = await OrderService.CalculateOrderPVAsync(id);
|
||||
}
|
||||
_loading = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user