initial upload
This commit is contained in:
parent
a0aa9cc28e
commit
f857f43df4
553 changed files with 46169 additions and 13 deletions
71
src/Web/Insight.Web/Pages/Management/Customers/Index.razor
Normal file
71
src/Web/Insight.Web/Pages/Management/Customers/Index.razor
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
@inherits ComponentBase
|
||||
|
||||
<TableContainer T="CustomerEntity"
|
||||
@ref="Container"
|
||||
@bind-Search="Search"
|
||||
Title="@Title"
|
||||
Breadcrumbs="@Breadcrumbs"
|
||||
Data="LoadDataAsync"
|
||||
OnAdd="OnCreate">
|
||||
<Header>
|
||||
<MudTh>
|
||||
<MudTableSortLabel SortLabel="Name" T="CustomerEntity">
|
||||
Name
|
||||
</MudTableSortLabel>
|
||||
</MudTh>
|
||||
<MudTh>
|
||||
<MudTableSortLabel SortLabel="Tag" T="CustomerEntity">
|
||||
Tag
|
||||
</MudTableSortLabel>
|
||||
</MudTh>
|
||||
<MudTh>
|
||||
<MudTableSortLabel SortLabel="Hosts" T="CustomerEntity">
|
||||
Hosts
|
||||
</MudTableSortLabel>
|
||||
</MudTh>
|
||||
</Header>
|
||||
<RowTemplate>
|
||||
<MudTd DataLabel="Name">
|
||||
<MudLink Href="@Navigation.Management.Customers.DetailsHref(context?.Id)" Typo="Typo.inherit" Underline="Underline.None">
|
||||
@context?.Name
|
||||
</MudLink>
|
||||
</MudTd>
|
||||
<MudTd DataLabel="Tag">
|
||||
@context?.Tag
|
||||
</MudTd>
|
||||
<MudTd DataLabel="Hosts">
|
||||
@{
|
||||
var value = "0";
|
||||
|
||||
if (context.Hosts is not null && context.Hosts.Any())
|
||||
{
|
||||
value = @context.Hosts.Count.ToString();
|
||||
}
|
||||
|
||||
<MudLink Href="@Navigation.Management.Customers.HostsHref(context.Id)" Typo="Typo.inherit" Underline="Underline.None">
|
||||
@value
|
||||
</MudLink>
|
||||
}
|
||||
</MudTd>
|
||||
</RowTemplate>
|
||||
<ActionTemplate>
|
||||
<MudMenuItem OnClick="@(()=>OnEdit(context))">
|
||||
Edit
|
||||
</MudMenuItem>
|
||||
<MudMenuItem OnClick="@(()=>OnDelete(context))">
|
||||
Delete
|
||||
</MudMenuItem>
|
||||
</ActionTemplate>
|
||||
</TableContainer>
|
||||
|
||||
<CascadingValue Name="Customer" Value="@Model">
|
||||
<CustomerCreateDialog @ref="_createDialog" OnChanges="OnRefreshAsync" />
|
||||
<CustomerEditDialog @ref="_editDialog" OnChanges="OnRefreshAsync" />
|
||||
<CustomerDeleteDialog @ref="_deleteDialog" OnChanges="OnRefreshAsync" />
|
||||
</CascadingValue>
|
||||
|
||||
@code{
|
||||
private CustomerCreateDialog? _createDialog;
|
||||
private CustomerEditDialog? _editDialog;
|
||||
private CustomerDeleteDialog? _deleteDialog;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue