Update
This commit is contained in:
@@ -2,22 +2,67 @@
|
||||
|
||||
@using BackOffice.BFF.UserOrder.Protobuf.Protos.UserOrder
|
||||
@using BackOffice.Pages.UserOrder.Components
|
||||
@using BackOffice.Common.BaseComponents
|
||||
@using DataModel = BackOffice.BFF.UserOrder.Protobuf.Protos.UserOrder.GetAllUserOrderByFilterResponseModel
|
||||
|
||||
<MudStack>
|
||||
<MudPaper Elevation="1" Class="pa-4">
|
||||
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
|
||||
<MudText>فاکتور</MudText>
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
<BackOffice.Pages.UserOrder.Components.UserOrderDataTable UserId="UserId" @ref="_table" />
|
||||
</MudStack>
|
||||
<BackOffice.Common.BaseComponents.BasePageComponent @ref="_basePage" OnClearFilterClick="OnFilterCleard" OnSubmitClick="OnFilterSubmit">
|
||||
<Filters>
|
||||
<MudNumericField HideSpinButtons="true" T="long?" Clearable="true" Label="قیمت" @bind-Value="@_request.Filter.Price" Variant="Variant.Outlined" Margin="Margin.Dense" />
|
||||
</Filters>
|
||||
<Content>
|
||||
<MudDataGrid T="DataModel" ServerData="@(new Func<GridState<DataModel>, Task<GridData<DataModel>>>(ServerReload))"
|
||||
Hover="true" @ref="_gridData" Height="72vh">
|
||||
<ColGroup>
|
||||
<col />
|
||||
<col />
|
||||
<col />
|
||||
<col style="width: 58px;" />
|
||||
</ColGroup>
|
||||
<ToolBarContent>
|
||||
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
|
||||
<MudText>فاکتور</MudText>
|
||||
</MudStack>
|
||||
</ToolBarContent>
|
||||
<Columns>
|
||||
<PropertyColumn Property="x => x.Id" Title="شناسه" />
|
||||
<PropertyColumn Property="x => x.Price" Title="مبلغ" />
|
||||
<PropertyColumn Property="x => x.PaymentStatus" Title="وضعیت پرداخت">
|
||||
<CellTemplate>
|
||||
@if (context.Item.PaymentStatus)
|
||||
{
|
||||
<MudChip T="string" Color="Color.Success">پرداخت شده</MudChip>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudChip T="string" Color="Color.Error">پرداخت نشده</MudChip>
|
||||
}
|
||||
</CellTemplate>
|
||||
</PropertyColumn>
|
||||
<PropertyColumn Property="x => x.TransactionId" Title="شناسه پرداخت" CellStyle="text-wrap: nowrap;" HeaderStyle="text-wrap: nowrap;" />
|
||||
<PropertyColumn Property="x => x.PaymentDate" Title="تاریخ پرداخت" CellStyle="text-wrap: nowrap;" HeaderStyle="text-wrap: nowrap;" />
|
||||
|
||||
|
||||
@code {
|
||||
[Parameter] public long UserId { get; set; }
|
||||
|
||||
private UserOrderDataTable _table;
|
||||
|
||||
}
|
||||
<TemplateColumn StickyLeft="true" Title="عملیات" CellStyle="text-wrap: nowrap;" HeaderStyle="text-wrap: nowrap;">
|
||||
<CellTemplate>
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center">
|
||||
|
||||
|
||||
<MudTooltip Text="آرشیو">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.DeleteOutline" Size="Size.Small" ButtonType="ButtonType.Button" OnClick="@(() => OnDelete(context.Item))" Style="cursor:pointer;" />
|
||||
</MudTooltip>
|
||||
</MudStack>
|
||||
</CellTemplate>
|
||||
</TemplateColumn>
|
||||
</Columns>
|
||||
<PagerContent>
|
||||
<MudDataGridPager T="DataModel" PageSizeOptions=@(new int[] { 30, 60, 90 }) InfoFormat="سطر {first_item} تا {last_item} از {all_items}" RowsPerPageString="تعداد سطرهای صفحه" />
|
||||
</PagerContent>
|
||||
</MudDataGrid>
|
||||
|
||||
</Content>
|
||||
</BackOffice.Common.BaseComponents.BasePageComponent>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user