Update order system with new gRPC services and wallet integration
This commit is contained in:
@@ -24,13 +24,13 @@ else
|
||||
<MudPaper Elevation="2" Class="pa-4 rounded-lg">
|
||||
<MudStack Spacing="2">
|
||||
<MudText Typo="Typo.h5">سفارش #@_order.Id</MudText>
|
||||
<MudText Typo="Typo.body2" Class="mud-text-secondary">تاریخ: @_order.CreatedAt.ToString("yyyy/MM/dd HH:mm")</MudText>
|
||||
<MudText Typo="Typo.body2">وضعیت: @GetStatusText(_order.Status)</MudText>
|
||||
<MudText Typo="Typo.body2">روش پرداخت: کیف پول</MudText>
|
||||
<MudText Typo="Typo.body2">آدرس: @_order.AddressSummary</MudText>
|
||||
<MudText Typo="Typo.body2" Class="mud-text-secondary">تاریخ: @_order.PaymentDate.ToDateTime().MiladiToJalaliWithTime()</MudText>
|
||||
<MudText Typo="Typo.body2">وضعیت: @GetStatusText(_order.PaymentStatus)</MudText>
|
||||
<MudText Typo="Typo.body2">روش پرداخت: @GetPaymentMethodText(_order.PaymentMethod)</MudText>
|
||||
<MudText Typo="Typo.body2">آدرس: @_order.UserAddressText</MudText>
|
||||
<MudDivider Class="my-2" />
|
||||
<MudHidden Breakpoint="Breakpoint.MdAndUp" Invert="true">
|
||||
<MudTable Items="_order.Items">
|
||||
<MudTable Items="_order.FactorDetails">
|
||||
<HeaderContent>
|
||||
<MudTh>محصول</MudTh>
|
||||
<MudTh>قیمت واحد</MudTh>
|
||||
@@ -40,39 +40,39 @@ else
|
||||
<RowTemplate>
|
||||
<MudTd>
|
||||
<MudStack Row="true" Spacing="2" AlignItems="AlignItems.Center">
|
||||
<MudAvatar Image="@context.ImageUrl" Size="Size.Medium" />
|
||||
<MudText>@context.Title</MudText>
|
||||
<MudAvatar Image="@context.ProductThumbnailPath" Size="Size.Medium" />
|
||||
<MudText>@context.ProductTitle</MudText>
|
||||
</MudStack>
|
||||
</MudTd>
|
||||
<MudTd>@FormatPrice(context.UnitPrice)</MudTd>
|
||||
<MudTd>@context.Quantity</MudTd>
|
||||
<MudTd>@FormatPrice(context.LineTotal)</MudTd>
|
||||
<MudTd>@FormatPrice(context.UnitPrice.Value)</MudTd>
|
||||
<MudTd>@context.Count</MudTd>
|
||||
<MudTd>@FormatPrice(context.UnitPrice.Value*context.Count.Value)</MudTd>
|
||||
</RowTemplate>
|
||||
</MudTable>
|
||||
</MudHidden>
|
||||
|
||||
<MudHidden Breakpoint="Breakpoint.MdAndUp">
|
||||
<MudStack Spacing="2">
|
||||
@foreach (var it in _order.Items)
|
||||
@foreach (var it in _order.FactorDetails)
|
||||
{
|
||||
<MudPaper Class="pa-3 rounded-lg" Outlined="true">
|
||||
<MudStack Spacing="1">
|
||||
<MudStack Row="true" Spacing="2" AlignItems="AlignItems.Center">
|
||||
<MudAvatar Image="@it.ImageUrl" />
|
||||
<MudText>@it.Title</MudText>
|
||||
<MudAvatar Image="@it.ProductThumbnailPath" />
|
||||
<MudText>@it.ProductTitle</MudText>
|
||||
</MudStack>
|
||||
<MudStack Row="true" Justify="Justify.SpaceBetween">
|
||||
<MudText Class="mud-text-secondary">@FormatPrice(it.UnitPrice) واحد</MudText>
|
||||
<MudText>تعداد: @it.Quantity</MudText>
|
||||
<MudText Class="mud-text-secondary">@FormatPrice(it.UnitPrice.Value) واحد</MudText>
|
||||
<MudText>تعداد: @it.Count</MudText>
|
||||
</MudStack>
|
||||
<MudText>جمع: @FormatPrice(it.LineTotal)</MudText>
|
||||
<MudText>جمع: @FormatPrice(it.UnitPrice.Value*it.Count.Value)</MudText>
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
}
|
||||
</MudStack>
|
||||
</MudHidden>
|
||||
<MudDivider Class="my-2" />
|
||||
<MudText Typo="Typo.h6" Align="Align.End">مبلغ کل: @FormatPrice(_order.Total)</MudText>
|
||||
<MudText Typo="Typo.h6" Align="Align.End">مبلغ کل: @FormatPrice(_order.FactorDetails.Sum(s=>s.UnitPrice.Value*s.Count.Value))</MudText>
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
</MudContainer>
|
||||
|
||||
Reference in New Issue
Block a user