diff --git a/Client/Modules/SZUAbsolventenverein.Module.EventRegistration/Details.razor b/Client/Modules/SZUAbsolventenverein.Module.EventRegistration/Details.razor index eda60dc..6cd31a2 100644 --- a/Client/Modules/SZUAbsolventenverein.Module.EventRegistration/Details.razor +++ b/Client/Modules/SZUAbsolventenverein.Module.EventRegistration/Details.razor @@ -11,6 +11,12 @@

Anmeldung zum Event

Willst du am Event (@_name) teilnehmen?

+@_eventDate - @_location +
+

@_description

+

Erstellt von: @_createdby am @_createdon

+

Zuletzt aktualisiert von: @_modifiedby am @_modifiedon

+
@if (PageState.User != null) { @@ -35,7 +41,7 @@ } } else { -

Um dich für dieses Event zu registrieren, muss man sich zuerst anmelden.

+

Um dich für dieses Event zu registrieren, muss man sich zuerst anmelden.

} @code { @@ -55,6 +61,10 @@ private int _id; private string _name; + private string _description; + private DateTime _eventDate; + private string _location; + private string _createdby; private DateTime _createdon; private string _modifiedby; @@ -103,6 +113,9 @@ if (currentEvent != null) { _name = currentEvent.Name; + _description = currentEvent.Description; + _eventDate = currentEvent.EventDate; + _location = currentEvent.Location; _createdby = currentEvent.CreatedBy; _createdon = currentEvent.CreatedOn; _modifiedby = currentEvent.ModifiedBy; @@ -121,41 +134,4 @@ AddModuleMessage(Localizer["Message.LoadError"], MessageType.Error); } } - - private async Task Save() - { - try - { - validated = true; - var interop = new Oqtane.UI.Interop(JSRuntime); - if (await interop.FormValid(form)) - { - if (PageState.Action == "Add") - { - Event EventRegistration = new Event(); - EventRegistration.ModuleId = ModuleState.ModuleId; - EventRegistration.Name = _name; - EventRegistration = await EventRegistrationService.AddEventAsync(EventRegistration); - await logger.LogInformation("EventRegistration Added {EventRegistration}", EventRegistration); - } - else - { - Event EventRegistration = await EventRegistrationService.GetEventAsync(_id, ModuleState.ModuleId); - EventRegistration.Name = _name; - await EventRegistrationService.UpdateEventAsync(EventRegistration); - await logger.LogInformation("EventRegistration Updated {EventRegistration}", EventRegistration); - } - NavigationManager.NavigateTo(NavigateUrl()); - } - else - { - AddModuleMessage(Localizer["Message.SaveValidation"], MessageType.Warning); - } - } - catch (Exception ex) - { - await logger.LogError(ex, "Error Saving EventRegistration {Error}", ex.Message); - AddModuleMessage(Localizer["Message.SaveError"], MessageType.Error); - } - } } diff --git a/Client/Modules/SZUAbsolventenverein.Module.EventRegistration/Edit.razor b/Client/Modules/SZUAbsolventenverein.Module.EventRegistration/Edit.razor index 63723c4..1b8da3d 100644 --- a/Client/Modules/SZUAbsolventenverein.Module.EventRegistration/Edit.razor +++ b/Client/Modules/SZUAbsolventenverein.Module.EventRegistration/Edit.razor @@ -16,13 +16,31 @@ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
@Localizer["Cancel"]

@if (PageState.Action == "Edit") { - + } @@ -43,6 +61,10 @@ private int _id; private string _name; + private string _description; + private DateTime _eventDate; + private string _location; + private string _createdby; private DateTime _createdon; private string _modifiedby; @@ -59,6 +81,10 @@ if (EventRegistration != null) { _name = EventRegistration.Name; + _description = EventRegistration.Description; + _eventDate = EventRegistration.EventDate; + _location = EventRegistration.Location; + _createdby = EventRegistration.CreatedBy; _createdon = EventRegistration.CreatedOn; _modifiedby = EventRegistration.ModifiedBy; @@ -86,6 +112,9 @@ Event EventRegistration = new Event(); EventRegistration.ModuleId = ModuleState.ModuleId; EventRegistration.Name = _name; + EventRegistration.Description = _description; + EventRegistration.EventDate = _eventDate; + EventRegistration.Location = _location; EventRegistration = await EventRegistrationService.AddEventAsync(EventRegistration); await logger.LogInformation("EventRegistration Added {EventRegistration}", EventRegistration); } @@ -93,6 +122,9 @@ { Event EventRegistration = await EventRegistrationService.GetEventAsync(_id, ModuleState.ModuleId); EventRegistration.Name = _name; + EventRegistration.Description = _description; + EventRegistration.EventDate = _eventDate; + EventRegistration.Location = _location; await EventRegistrationService.UpdateEventAsync(EventRegistration); await logger.LogInformation("EventRegistration Updated {EventRegistration}", EventRegistration); } diff --git a/Client/Modules/SZUAbsolventenverein.Module.EventRegistration/ModuleInfo.cs b/Client/Modules/SZUAbsolventenverein.Module.EventRegistration/ModuleInfo.cs index 775c53e..8d40bd9 100644 --- a/Client/Modules/SZUAbsolventenverein.Module.EventRegistration/ModuleInfo.cs +++ b/Client/Modules/SZUAbsolventenverein.Module.EventRegistration/ModuleInfo.cs @@ -9,9 +9,9 @@ namespace SZUAbsolventenverein.Module.EventRegistration { Name = "EventRegistration", Description = "A module to manage registration for events", - Version = "1.0.0", + Version = "1.0.5", ServerManagerType = "SZUAbsolventenverein.Module.EventRegistration.Manager.EventRegistrationManager, SZUAbsolventenverein.Module.EventRegistration.Server.Oqtane", - ReleaseVersions = "1.0.0", + ReleaseVersions = "1.0.0,1.0.1,1.0.2,1.0.3,1.0.4,1.0.5", Dependencies = "SZUAbsolventenverein.Module.EventRegistration.Shared.Oqtane", PackageName = "SZUAbsolventenverein.Module.EventRegistration" }; diff --git a/Shared/Models/Event.cs b/Shared/Models/Event.cs index ea5aae5..316fdfa 100644 --- a/Shared/Models/Event.cs +++ b/Shared/Models/Event.cs @@ -13,6 +13,10 @@ namespace SZUAbsolventenverein.Module.EventRegistration.Models public int ModuleId { get; set; } public string Name { get; set; } + public string Description { get; set; } + public DateTime EventDate { get; set; } + public string Location { get; set; } + public string CreatedBy { get; set; } public DateTime CreatedOn { get; set; } public string ModifiedBy { get; set; }