-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#57) add showing signed up and interested friends in event
- Loading branch information
Showing
3 changed files
with
223 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
150 changes: 150 additions & 0 deletions
150
MiniSpace.Web/src/MiniSpace.Web/Pages/Events/Dialogs/ParticipantDetailsDialog.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
@page "/events/{EventId}/participants/{ParticipantDto.Id}/details" | ||
@using MiniSpace.Web.Areas.Students | ||
@using Radzen | ||
@using MiniSpace.Web.DTO | ||
@inject DialogService DialogService | ||
@inject IIdentityService IdentityService | ||
@inject IStudentsService StudentsService | ||
|
||
@if (dialogInitialized) | ||
{ | ||
<RadzenStack Gap="1rem"> | ||
<RadzenFieldset> | ||
<HeaderTemplate> | ||
<RadzenStack Gap="0" Orientation="Orientation.Horizontal"> | ||
<RadzenIcon Icon="account_box" class="me-1"/> | ||
<b>Identification</b> | ||
</RadzenStack> | ||
</HeaderTemplate> | ||
<ChildContent> | ||
<RadzenStack Gap="2rem"> | ||
<RadzenRow Size="12" AlignItems="AlignItems.Center"> | ||
<RadzenColumn Size="12"> | ||
<RadzenStack Orientation="Orientation.Horizontal" JustifyContent="JustifyContent.Center"> | ||
<RadzenImage Path="@($"data:image/jpeg;base64,{studentDto.ProfileImage}")" | ||
AlternateText="Not set" | ||
Style="width: 8em" class="rz-border-radius-5"/> | ||
</RadzenStack> | ||
</RadzenColumn> | ||
</RadzenRow> | ||
|
||
<RadzenRow AlignItems="AlignItems.Center"> | ||
<RadzenColumn Size="12" SizeMD="12"> | ||
|
||
</RadzenColumn> | ||
</RadzenRow> | ||
</RadzenStack> | ||
</ChildContent> | ||
</RadzenFieldset> | ||
|
||
<RadzenFieldset> | ||
<HeaderTemplate> | ||
<RadzenStack Gap="0" Orientation="Orientation.Horizontal"> | ||
<RadzenIcon Icon="face" class="me-1"/> | ||
<b>Personal info</b> | ||
</RadzenStack> | ||
</HeaderTemplate> | ||
<ChildContent> | ||
<RadzenStack> | ||
<RadzenRow Size="12" AlignItems="AlignItems.Center"> | ||
<RadzenColumn Size="6"> | ||
<RadzenText TextStyle="TextStyle.Body2" class="rz-display-flex rz-mt-3 rz-my-0">First name</RadzenText> | ||
<RadzenText TextStyle="TextStyle.H6"><b>@(studentDto.FirstName)</b></RadzenText> | ||
</RadzenColumn> | ||
|
||
<RadzenColumn Size="6"> | ||
<RadzenText TextStyle="TextStyle.Body2" class="rz-display-flex rz-mt-3 rz-my-0">Last name</RadzenText> | ||
<RadzenText TextStyle="TextStyle.H6"><b>@(studentDto.LastName)</b></RadzenText> | ||
</RadzenColumn> | ||
</RadzenRow> | ||
|
||
<RadzenRow Size="12"> | ||
<RadzenColumn Size="6"> | ||
<RadzenText TextStyle="TextStyle.Body2" class="rz-display-flex rz-mt-3 rz-my-0">Email</RadzenText> | ||
<RadzenText TextStyle="TextStyle.H6"><b>@(studentDto.Email)</b></RadzenText> | ||
</RadzenColumn> | ||
|
||
<RadzenColumn Size="6"> | ||
<RadzenText TextStyle="TextStyle.Body2" class="rz-display-flex rz-mt-3 rz-my-0">Description</RadzenText> | ||
<RadzenText TextStyle="TextStyle.H6"><b>@(studentDto.Description)</b></RadzenText> | ||
</RadzenColumn> | ||
</RadzenRow> | ||
|
||
<RadzenRow AlignItems="AlignItems.Center"> | ||
<RadzenColumn Size="12" SizeMD="12"> | ||
|
||
</RadzenColumn> | ||
</RadzenRow> | ||
</RadzenStack> | ||
</ChildContent> | ||
</RadzenFieldset> | ||
|
||
<RadzenFieldset> | ||
<HeaderTemplate> | ||
<RadzenStack Gap="0" Orientation="Orientation.Horizontal"> | ||
<RadzenIcon Icon="event" class="me-1"/> | ||
<b>Other info</b> | ||
</RadzenStack> | ||
</HeaderTemplate> | ||
<ChildContent> | ||
<RadzenStack> | ||
<RadzenRow Size="12" AlignItems="AlignItems.Center"> | ||
<RadzenColumn Size="6"> | ||
<RadzenText TextStyle="TextStyle.Body2" class="rz-display-flex rz-mt-3 rz-my-0">Status</RadzenText> | ||
<RadzenText TextStyle="TextStyle.H6"><b>@(studentDto.State.Normalize())</b></RadzenText> | ||
</RadzenColumn> | ||
|
||
<RadzenColumn Size="6"> | ||
<RadzenText TextStyle="TextStyle.Body2" class="rz-display-flex rz-mt-3 rz-my-0">Email notifications</RadzenText> | ||
<RadzenText TextStyle="TextStyle.H6"><b>@(studentDto.EmailNotifications)</b></RadzenText> | ||
</RadzenColumn> | ||
</RadzenRow> | ||
|
||
<RadzenRow Size="12"> | ||
<RadzenColumn Size="6"> | ||
<RadzenText TextStyle="TextStyle.Body2" class="rz-display-flex rz-mt-3 rz-my-0">Date of birth</RadzenText> | ||
<RadzenText TextStyle="TextStyle.H6"><b>@(studentDto.DateOfBirth.ToLocalTime().ToString(shortDateFormat))</b></RadzenText> | ||
</RadzenColumn> | ||
|
||
<RadzenColumn Size="6"> | ||
<RadzenText TextStyle="TextStyle.Body2" class="rz-display-flex rz-mt-3 rz-my-0">Created at</RadzenText> | ||
<RadzenText TextStyle="TextStyle.H6"><b>@(studentDto.CreatedAt.ToLocalTime().ToString(dateFormat))</b></RadzenText> | ||
</RadzenColumn> | ||
</RadzenRow> | ||
|
||
<RadzenRow AlignItems="AlignItems.Center"> | ||
<RadzenColumn Size="12" SizeMD="12"> | ||
|
||
</RadzenColumn> | ||
</RadzenRow> | ||
</RadzenStack> | ||
</ChildContent> | ||
</RadzenFieldset> | ||
|
||
<RadzenStack Gap="1rem" Orientation="Orientation.Vertical" JustifyContent="JustifyContent.SpaceBetween" Style="height: 100%;"> | ||
<RadzenStack Orientation="Orientation.Horizontal" JustifyContent="JustifyContent.Center" Gap="0.5rem"> | ||
<RadzenButton Click="@(() => DialogService.Close(true))" Variant="Variant.Flat" Text="Close" Style="width: 120px"/> | ||
</RadzenStack> | ||
</RadzenStack> | ||
</RadzenStack> | ||
} | ||
|
||
@code { | ||
[Parameter] | ||
public string EventId { get; set; } | ||
[Parameter] | ||
public ParticipantDto ParticipantDto { get; set; } | ||
|
||
private StudentDto studentDto = new(); | ||
private bool dialogInitialized = false; | ||
|
||
private const string dateFormat = "dd/MM/yyyy HH:mm"; | ||
private const string shortDateFormat = "dd/MM/yyyy"; | ||
|
||
protected override async Task OnInitializedAsync() | ||
{ | ||
studentDto = await StudentsService.GetStudentAsync(ParticipantDto.StudentId); | ||
await base.OnInitializedAsync(); | ||
dialogInitialized = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters