65 lines
2.2 KiB
Plaintext
65 lines
2.2 KiB
Plaintext
@page "/organizationUnits"
|
|
@using UserService.DatabaseLayer.DataModels
|
|
@inherits OrganizationUnitsBase
|
|
|
|
<h1>List of all organization units</h1>
|
|
|
|
@if (OrganizationUnits is null)
|
|
{
|
|
<p>
|
|
<em>Loading...</em>
|
|
</p>
|
|
}
|
|
else
|
|
{
|
|
|
|
|
|
|
|
@*<MatTable Items="@OrganizationUnits" class="mat-elevation-z5">
|
|
<MatTableHeader>
|
|
<th style="width: 20%">Common Name</th>
|
|
<th style="width: 20%">Description</th>
|
|
<th style="width: 20%">Parent</th>
|
|
<th style="width: auto">Manager</th>
|
|
<th style="width: auto"> </th>
|
|
<th style="width: auto"> </th>
|
|
</MatTableHeader>
|
|
<MatTableRow>
|
|
<td>@context.CommonName</td>
|
|
<td>@context.Description</td>
|
|
<td>@context.Parent</td>
|
|
<td>@context.Manager</td>
|
|
<td>
|
|
<a href="organizationUnits" @onclick="@(e => Edit(context))">edit</a>
|
|
</td>
|
|
<td>
|
|
<a href="organizationUnits" @onclick="@(e => Delete(context))">delete</a>
|
|
</td>
|
|
</MatTableRow>
|
|
</MatTable>*@
|
|
|
|
<MatButton @onclick="@(e => Edit(new OrganizationUnit()))">Create organization unit</MatButton>
|
|
}
|
|
|
|
@*<MatDialog @bind-IsOpen="@DialogIsOpen">
|
|
@if (OuToEdit != null)
|
|
{
|
|
<MatDialogTitle>@(OuToEdit.Id == 0 ? "New" : "Edit") @OuToEdit.CommonName (@OuToEdit.Id)</MatDialogTitle>
|
|
<MatDialogContent>
|
|
<MatTextField Label="Common name" @bind-Value="@OuToEdit.CommonName" ReadOnly="@(OuToEdit.Id != 0)"/>
|
|
<p/>
|
|
<MatTextField Label="Description" @bind-Value="@OuToEdit.Description"/>
|
|
@*<MatTextField Label="Manager" @bind-Value="@OuToEdit.Manager"/>*@
|
|
@*<p />
|
|
<MatSelectItem Items="@OrganizationUnits" Label="Parent" @bind-Value="@OuToEdit.Parent" />
|
|
</MatDialogContent>
|
|
}
|
|
else
|
|
{
|
|
<MatDialogTitle>No securityGroup selected</MatDialogTitle>
|
|
}
|
|
<MatDialogActions>
|
|
<MatButton OnClick="@(e => { DialogIsOpen = false; })">No Thanks</MatButton>
|
|
<MatButton OnClick="@OkClick">OK</MatButton>
|
|
</MatDialogActions>
|
|
</MatDialog>*@ |