-
-
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.
Merge pull request #150 from SaintAngeLs/frontend_update
Frontend update
- Loading branch information
Showing
28 changed files
with
787 additions
and
327 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
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
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
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
46 changes: 46 additions & 0 deletions
46
MiniSpace.Web/src/MiniSpace.Web/Components/RadzenEventCard.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,46 @@ | ||
@using MiniSpace.Web.DTO | ||
@inject NavigationManager NavigationManager | ||
|
||
<RadzenCard Class="rz-border-radius-3" Style="cursor: pointer" | ||
@onclick="@(() => NavigationManager.NavigateTo($"/events/{Event.Id}"))"> | ||
<RadzenRow Size="12"> | ||
<RadzenColumn Size="12" SizeMD="6"> | ||
<RadzenText TextStyle="TextStyle.Overline" class="rz-display-flex rz-mt-1 rz-my-0">Name</RadzenText> | ||
<RadzenText TextStyle="TextStyle.Body1"><b>@(Event.Name)</b></RadzenText> | ||
</RadzenColumn> | ||
<RadzenColumn Size="12" SizeMD="5"> | ||
<RadzenText TextStyle="TextStyle.Overline" class="rz-display-flex rz-mt-1 rz-my-0">Status</RadzenText> | ||
@switch (Event.Status) | ||
{ | ||
case "Published": | ||
<RadzenText TextStyle="TextStyle.Body1" Style="color: green"><b>@Event.Status</b></RadzenText> | ||
break; | ||
case "Archived": | ||
<RadzenText TextStyle="TextStyle.Body1" Style="color: indianred"><b>@Event.Status</b></RadzenText> | ||
break; | ||
default: | ||
<RadzenText TextStyle="TextStyle.Body1"><b>@Event.Status</b></RadzenText> | ||
break; | ||
} | ||
</RadzenColumn> | ||
</RadzenRow> | ||
<RadzenRow Size="12"> | ||
<RadzenColumn Size="12" SizeMD="6"> | ||
<RadzenText TextStyle="TextStyle.Overline" class="rz-display-flex rz-mt-3 rz-mb-0">Start date</RadzenText> | ||
<RadzenText TextStyle="TextStyle.Body1"><b>@(Event.StartDate.ToLocalTime().ToString(dateFormat))</b></RadzenText> | ||
</RadzenColumn> | ||
<RadzenColumn Size="12" SizeMD="5"> | ||
<RadzenText TextStyle="TextStyle.Overline" class="rz-display-flex rz-mt-3 rz-mb-0">End date</RadzenText> | ||
<RadzenText TextStyle="TextStyle.Body1"><b>@(Event.EndDate.ToLocalTime().ToString(dateFormat))</b></RadzenText> | ||
</RadzenColumn> | ||
</RadzenRow> | ||
<hr style="border: none; background-color: rgba(0,0,0,.2); height: 1px; margin: 1rem 0;"/> | ||
</RadzenCard> | ||
|
||
@code | ||
{ | ||
[Parameter] | ||
public EventDto Event { get; set; } | ||
|
||
private const string dateFormat = "dd/MM/yyyy HH:mm"; | ||
} |
12 changes: 12 additions & 0 deletions
12
MiniSpace.Web/src/MiniSpace.Web/DTO/Wrappers/EventParticipantsDto.cs
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,12 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace MiniSpace.Web.DTO.Wrappers | ||
{ | ||
public class EventParticipantsDto | ||
{ | ||
public Guid EventId { get; set; } | ||
public IEnumerable<ParticipantDto> InterestedStudents { get; set; } | ||
public IEnumerable<ParticipantDto> SignedUpStudents { get; set; } | ||
} | ||
} |
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
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
59 changes: 0 additions & 59 deletions
59
MiniSpace.Web/src/MiniSpace.Web/Pages/Account/UpdateAccount.razor
This file was deleted.
Oops, something went wrong.
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
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
33 changes: 33 additions & 0 deletions
33
MiniSpace.Web/src/MiniSpace.Web/Pages/Events/Dialogs/DeleteEventDialog.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,33 @@ | ||
@page "/events/{EventId}/delete" | ||
@using MiniSpace.Web.Areas.Events | ||
@using Radzen | ||
@inject DialogService DialogService | ||
@inject IEventsService EventsService | ||
@inject NavigationManager NavigationManager | ||
|
||
<RadzenStack Gap="1rem"> | ||
|
||
<RadzenStack Gap="1rem" Orientation="Orientation.Vertical" JustifyContent="JustifyContent.SpaceBetween" Style="height: 100%;"> | ||
<RadzenStack Orientation="Orientation.Horizontal" JustifyContent="JustifyContent.Center" Gap="0.5rem"> | ||
<RadzenButton Click="@(() => DeleteEvent(EventId))" Variant="Variant.Flat" Text="Delete" Style="width: 100px"/> | ||
<RadzenButton Click="@(() => DialogService.Close(true))" Variant="Variant.Flat" Text="Cancel" Style="width: 100px"/> | ||
</RadzenStack> | ||
</RadzenStack> | ||
</RadzenStack> | ||
|
||
@code { | ||
[Parameter] | ||
public Guid EventId { get; set; } | ||
|
||
protected override async Task OnInitializedAsync() | ||
{ | ||
await base.OnInitializedAsync(); | ||
} | ||
|
||
private async void DeleteEvent(Guid eventId) | ||
{ | ||
await EventsService.DeleteEventAsync(eventId); | ||
DialogService.Close(true); | ||
NavigationManager.NavigateTo("/events/organize"); | ||
} | ||
} |
Oops, something went wrong.