|
|
|
@ -0,0 +1,57 @@ |
|
|
|
|
@page "/dialogcard/{EmployeeId}" |
|
|
|
|
|
|
|
|
|
@inject InMemoryData data; |
|
|
|
|
@inject Radzen.DialogService dialogService; |
|
|
|
|
|
|
|
|
|
@rendermode RenderMode.InteractiveServer |
|
|
|
|
|
|
|
|
|
@if (employee is null) |
|
|
|
|
{ |
|
|
|
|
<RadzenText class="rz-color-on-warning-light" TextStyle="TextStyle.DisplayH5">No data</RadzenText> |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
<RadzenStack class="rz-p-4" Orientation="Orientation.Horizontal" JustifyContent="JustifyContent.Start" Gap="1rem"> |
|
|
|
|
<RadzenImage Path="@employee.Photo" Style="width:100px; height:100px; border-radius:50%" /> |
|
|
|
|
<RadzenStack Gap="0"> |
|
|
|
|
<RadzenText class="rz-display-flex rz-mt-2 rz-my-0" TextStyle="TextStyle.Overline">Employee</RadzenText> |
|
|
|
|
<RadzenText TextStyle="TextStyle.Body1"><b>@($"{employee.FirstName} {employee.LastName}")</b></RadzenText> |
|
|
|
|
<RadzenText class="rz-display-flex rz-mt-4 rz-mb-0" TextStyle="TextStyle.Overline">Job Title</RadzenText> |
|
|
|
|
<RadzenText TextStyle="TextStyle.Body1"><b>@($"{employee.Title} {employee.Job}")</b></RadzenText> |
|
|
|
|
</RadzenStack> |
|
|
|
|
</RadzenStack> |
|
|
|
|
<RadzenCard class="rz-background-color-primary-light rz-shadow-0 rz-border-radius-0 rz-p-8" style="margin: 1rem calc(-1 * var(--rz-card-padding));"> |
|
|
|
|
<RadzenText class="rz-color-on-primary-light" TextStyle="TextStyle.H6"><strong>Personal Information</strong></RadzenText> |
|
|
|
|
<RadzenRow RowGap="0"> |
|
|
|
|
<RadzenColumn SizeSM="4"> |
|
|
|
|
<RadzenText class="rz-color-on-primary-light rz-display-flex rz-mt-4 rz-mb-0" TextStyle="TextStyle.Overline">Hire Date</RadzenText> |
|
|
|
|
<RadzenText class="rz-color-on-primary-light" TextStyle="TextStyle.Body1">@employee.HireDate.ToString("yyyy-MM-dd")</RadzenText> |
|
|
|
|
<RadzenText class="rz-color-on-primary-light rz-display-flex rz-mt-4 rz-mb-0" TextStyle="TextStyle.Overline">Phone</RadzenText> |
|
|
|
|
<RadzenText class="rz-color-on-primary-light" TextStyle="TextStyle.Body1">@employee.Phone</RadzenText> |
|
|
|
|
</RadzenColumn> |
|
|
|
|
<RadzenColumn OffsetSM="2" SizeSM="6"> |
|
|
|
|
<RadzenText class="rz-color-on-primary-light rz-display-flex rz-mt-4 rz-mb-0" TextStyle="TextStyle.Overline">Region</RadzenText> |
|
|
|
|
<RadzenText class="rz-color-on-primary-light" TextStyle="TextStyle.Body1">@employee.Region</RadzenText> |
|
|
|
|
<RadzenText class="rz-color-on-primary-light rz-display-flex rz-mt-4 rz-mb-0" TextStyle="TextStyle.Overline">Address</RadzenText> |
|
|
|
|
<RadzenText class="rz-color-on-primary-light" TextStyle="TextStyle.Body1">@employee.Address</RadzenText> |
|
|
|
|
</RadzenColumn> |
|
|
|
|
</RadzenRow> |
|
|
|
|
</RadzenCard> |
|
|
|
|
<RadzenStack Orientation="Orientation.Horizontal" JustifyContent="JustifyContent.End" Gap="0"> |
|
|
|
|
<RadzenButton Variant="Variant.Text" Text="Send" Click="@((args) => dialogService.Close(true))" /> |
|
|
|
|
<RadzenButton class="rz-text-secondary-color" Variant="Variant.Text" Text="Cancel" Click="@((args) => dialogService.Close(false))" /> |
|
|
|
|
</RadzenStack> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@code { |
|
|
|
|
[Parameter] |
|
|
|
|
public int EmployeeId { get; set; } |
|
|
|
|
|
|
|
|
|
Employee employee; |
|
|
|
|
|
|
|
|
|
protected override async Task OnInitializedAsync() |
|
|
|
|
{ |
|
|
|
|
var employees = await data.GetFixedEmployeeDataAsync(); |
|
|
|
|
employee = employees.Where(e => e.ID == EmployeeId).FirstOrDefault(); |
|
|
|
|
} |
|
|
|
|
} |