Files
blazor-saas-crm/Features/Purchase/Bill/Components/_BillPurchaseOrderItemDataTable.razor
2026-07-21 14:14:44 +07:00

39 lines
2.3 KiB
Plaintext

@using Indotalent.Features.Purchase.Bill.Cqrs
@using MudBlazor
<MudPaper Elevation="0" Outlined="true" Style="border-radius: 12px; border: 1px solid #E5E7EB;">
<div style="padding: 16px; border-bottom: 1px solid #E5E7EB; background-color: #ffffff;">
<MudText Typo="Typo.button" Color="Color.Primary" Style="font-weight: 600;">Referenced Purchase Order Items</MudText>
</div>
<MudTable Class="mud-table-styled" Striped="true" Items="Items" Hover="true" Elevation="0" Dense="true" T="BillPurchaseOrderItemResponse">
<HeaderContent>
<MudTh Style="font-weight: 500; letter-spacing: 0.05em;">Product</MudTh>
<MudTh Style="font-weight: 500; letter-spacing: 0.05em;">Summary</MudTh>
<MudTh Style="font-weight: 500; text-align: right; letter-spacing: 0.05em;">Unit Price</MudTh>
<MudTh Style="font-weight: 500; text-align: right; letter-spacing: 0.05em;">Quantity</MudTh>
<MudTh Style="font-weight: 500; text-align: right; letter-spacing: 0.05em;">Total</MudTh>
</HeaderContent>
<RowTemplate>
<MudTd DataLabel="Product">@context.ProductName</MudTd>
<MudTd DataLabel="Summary">@context.Summary</MudTd>
<MudTd DataLabel="UnitPrice" Style="text-align: right;">@context.UnitPrice?.ToString("N2")</MudTd>
<MudTd DataLabel="Quantity" Style="text-align: right;">@context.Quantity</MudTd>
<MudTd DataLabel="Total" Style="text-align: right; font-weight: 500;">@context.Total?.ToString("N2")</MudTd>
</RowTemplate>
</MudTable>
</MudPaper>
<style>
.mud-table-styled .mud-table-row:hover { background-color: #F9FAFB !important; }
.mud-table-styled .mud-table-cell { padding-top: 0.75rem; padding-bottom: 0.75rem; color: #6B7280; font-size: 0.875rem; }
.mud-table-styled .mud-table-cell .mud-text-body2 { font-weight: 600; color: #374151; }
.mud-input-outlined-border { border-radius: 8px !important; }
.custom-select-dense .mud-input-control { margin-top: 0 !important; }
.custom-select-dense .mud-input-slot { padding-top: 4px !important; padding-bottom: 4px !important; padding-left: 8px !important; font-size: 12px !important; }
</style>
@code {
[Parameter] public List<BillPurchaseOrderItemResponse> Items { get; set; } = new();
[Parameter] public bool ReadOnly { get; set; } = true;
}