feat: full FrontOffice updates - discount store, blog, payment gateway, UI improvements
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 4m55s
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 4m55s
- Discount store pages (products, cart, orders, order detail) - Blog pages and services - Payment gateway callback page - AppImage component, EmptyState, LoadingState, PageHeader - DiscountCartService, DiscountOrderService, DiscountProductService - BlogCategoryService, BlogPostService, SitePageService, ImageCacheService - PhoneVerifyForm component - Profile Hub page - UI/UX improvements across all pages - landing.js for homepage - Config and routing updates
This commit is contained in:
@@ -0,0 +1,130 @@
|
||||
@attribute [Route(RouteConstants.DiscountStore.Orders)]
|
||||
|
||||
<PageTitle>سفارشهای فروشگاه تخفیفی</PageTitle>
|
||||
|
||||
<MudContainer MaxWidth="MaxWidth.Large" Class="py-6">
|
||||
<MudStack Spacing="3">
|
||||
<PageHeader Title="سفارشهای تخفیفی" BackHref="@RouteConstants.DiscountStore.Products" />
|
||||
|
||||
@if (_loading)
|
||||
{
|
||||
<LoadingState />
|
||||
}
|
||||
else if (_orders.Count == 0)
|
||||
{
|
||||
<MudAlert Severity="Severity.Info">هنوز سفارشی ثبت نشده است.</MudAlert>
|
||||
<MudButton Variant="Variant.Outlined" StartIcon="@Icons.Material.Filled.Store"
|
||||
Href="@RouteConstants.DiscountStore.Products">
|
||||
مشاهده فروشگاه تخفیفی
|
||||
</MudButton>
|
||||
}
|
||||
else
|
||||
{
|
||||
<!-- Desktop Table -->
|
||||
<MudHidden Breakpoint="Breakpoint.MdAndUp" Invert="true">
|
||||
<MudPaper Elevation="1" Class="pa-4 rounded-lg">
|
||||
<MudTable Items="_orders">
|
||||
<HeaderContent>
|
||||
<MudTh>شماره سفارش</MudTh>
|
||||
<MudTh>تعداد اقلام</MudTh>
|
||||
<MudTh>مبلغ کل</MudTh>
|
||||
<MudTh>از کیف تخفیفی</MudTh>
|
||||
<MudTh>درگاه</MudTh>
|
||||
<MudTh>وضعیت پرداخت</MudTh>
|
||||
<MudTh>وضعیت ارسال</MudTh>
|
||||
<MudTh>تاریخ</MudTh>
|
||||
<MudTh></MudTh>
|
||||
</HeaderContent>
|
||||
<RowTemplate>
|
||||
<MudTd>@context.OrderNumber</MudTd>
|
||||
<MudTd>@context.ItemsCount</MudTd>
|
||||
<MudTd>@FormatPrice(context.TotalPrice)</MudTd>
|
||||
<MudTd>
|
||||
@if (context.DiscountBalanceUsed > 0)
|
||||
{
|
||||
<MudText Color="Color.Success">@FormatPrice(context.DiscountBalanceUsed)</MudText>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudText Class="mud-text-secondary">—</MudText>
|
||||
}
|
||||
</MudTd>
|
||||
<MudTd>@FormatPrice(context.GatewayAmount)</MudTd>
|
||||
<MudTd>
|
||||
<MudChip T="string" Size="Size.Small"
|
||||
Color="@(context.PaymentCompleted ? Color.Success : Color.Warning)"
|
||||
Variant="Variant.Filled">
|
||||
@(context.PaymentCompleted ? "پرداخت شده" : "در انتظار پرداخت")
|
||||
</MudChip>
|
||||
</MudTd>
|
||||
<MudTd>
|
||||
<MudChip T="string" Size="Size.Small"
|
||||
Color="@DiscountOrderService.GetDeliveryStatusColor(context.DeliveryStatus)"
|
||||
Variant="Variant.Outlined">
|
||||
@DiscountOrderService.GetDeliveryStatusText(context.DeliveryStatus)
|
||||
</MudChip>
|
||||
</MudTd>
|
||||
<MudTd>@FormatDate(context.Created)</MudTd>
|
||||
<MudTd>
|
||||
<MudButton Size="Size.Small" Variant="Variant.Outlined" Color="Color.Primary"
|
||||
OnClick="() => ViewOrder(context.Id)">
|
||||
جزئیات
|
||||
</MudButton>
|
||||
</MudTd>
|
||||
</RowTemplate>
|
||||
</MudTable>
|
||||
</MudPaper>
|
||||
</MudHidden>
|
||||
|
||||
<!-- Mobile Cards -->
|
||||
<MudHidden Breakpoint="Breakpoint.MdAndUp">
|
||||
<MudStack Spacing="2">
|
||||
@foreach (var order in _orders)
|
||||
{
|
||||
<MudPaper Class="pa-3 rounded-lg cursor-pointer" Outlined="true"
|
||||
@onclick="() => ViewOrder(order.Id)">
|
||||
<MudStack Spacing="1">
|
||||
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
|
||||
<MudText Typo="Typo.subtitle2">سفارش #@order.OrderNumber</MudText>
|
||||
<MudChip T="string" Size="Size.Small"
|
||||
Color="@(order.PaymentCompleted ? Color.Success : Color.Warning)"
|
||||
Variant="Variant.Filled">
|
||||
@(order.PaymentCompleted ? "پرداخت شده" : "در انتظار")
|
||||
</MudChip>
|
||||
</MudStack>
|
||||
<MudStack Row="true" Justify="Justify.SpaceBetween">
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">@FormatDate(order.Created)</MudText>
|
||||
<MudChip T="string" Size="Size.Small"
|
||||
Color="@DiscountOrderService.GetDeliveryStatusColor(order.DeliveryStatus)"
|
||||
Variant="Variant.Outlined">
|
||||
@DiscountOrderService.GetDeliveryStatusText(order.DeliveryStatus)
|
||||
</MudChip>
|
||||
</MudStack>
|
||||
<MudDivider />
|
||||
<MudStack Row="true" Justify="Justify.SpaceBetween">
|
||||
<MudText Typo="Typo.body2">@order.ItemsCount قلم</MudText>
|
||||
<MudText Typo="Typo.body2" Class="fw-semibold">@FormatPrice(order.TotalPrice) تومان</MudText>
|
||||
</MudStack>
|
||||
@if (order.DiscountBalanceUsed > 0)
|
||||
{
|
||||
<MudText Typo="Typo.caption" Color="Color.Success">
|
||||
از کیف تخفیفی: @FormatPrice(order.DiscountBalanceUsed) تومان
|
||||
</MudText>
|
||||
}
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
}
|
||||
</MudStack>
|
||||
</MudHidden>
|
||||
|
||||
@if (_totalPages > 1)
|
||||
{
|
||||
<MudStack AlignItems="AlignItems.Center" Class="mt-4">
|
||||
<MudPagination Count="@_totalPages" Selected="@_currentPage"
|
||||
SelectedChanged="OnPageChanged" Color="Color.Primary"
|
||||
Variant="Variant.Outlined" />
|
||||
</MudStack>
|
||||
}
|
||||
}
|
||||
</MudStack>
|
||||
</MudContainer>
|
||||
Reference in New Issue
Block a user