Files
blazor-swm/Features/Sales/Invoice/Components/_InvoiceSalesOrderItemDataTable.razor
T
2026-07-21 14:35:37 +07:00

32 lines
1.6 KiB
Plaintext

@using Indotalent.Features.Sales.Invoice.Cqrs
@using MudBlazor
<MudPaper Elevation="0" Outlined="true" Style="border-radius: 4px; border: 1px solid #E5E7EB;">
<div style="padding: 16px; border-bottom: 1px solid #E5E7EB; background-color: #F8FAFC;">
<MudText Typo="Typo.button" Color="Color.Primary" Style="font-weight: 800;">Referenced Sales Order Items</MudText>
</div>
<MudTable Items="Items" Hover="true" Elevation="0" Dense="true" T="InvoiceSalesOrderItemResponse">
<HeaderContent>
<MudTh Style="font-weight: 700;">Product</MudTh>
<MudTh Style="font-weight: 700;">Summary</MudTh>
<MudTh Style="font-weight: 700; text-align: right;">Unit Price</MudTh>
<MudTh Style="font-weight: 700; text-align: right;">Quantity</MudTh>
<MudTh Style="font-weight: 700; text-align: right;">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: 700;">@context.Total?.ToString("N2")</MudTd>
</RowTemplate>
</MudTable>
</MudPaper>
<style>
.mud-table-styled .mud-table-row:hover { background-color: #F9FAFB !important; }
</style>
@code {
[Parameter] public List<InvoiceSalesOrderItemResponse> Items { get; set; } = new();
[Parameter] public bool ReadOnly { get; set; } = true;
}