diff --git a/Client/Modules/SZUAbsolventenverein.Module.PremiumArea/ApplicationList.razor b/Client/Modules/SZUAbsolventenverein.Module.PremiumArea/ApplicationList.razor index 3b60774..f84af89 100644 --- a/Client/Modules/SZUAbsolventenverein.Module.PremiumArea/ApplicationList.razor +++ b/Client/Modules/SZUAbsolventenverein.Module.PremiumArea/ApplicationList.razor @@ -16,7 +16,7 @@ else if (_applications.Count == 0) {
- Datei: @app.FileId
- Status: Veröffentlicht
- Datum: @(app.ApprovedOn?.ToShortDateString() ?? app.CreatedOn.ToShortDateString())
+ @if (!string.IsNullOrEmpty(app.ShortDescription))
+ {
+
@app.ShortDescription
+ } ++ + Datum: @(app.ApprovedOn?.ToShortDateString() ?? app.CreatedOn.ToShortDateString()) +
Bitte laden Sie Ihren Ingenieur-Antrag als PDF-Datei hoch.
+Status: Veröffentlicht
+ @if (!string.IsNullOrEmpty(_existingApp.Title)) + { ++ Titel: @_existingApp.Title +
+ } + @if (!string.IsNullOrEmpty(_existingApp.ShortDescription)) + { ++ Kurzbeschreibung: @_existingApp.ShortDescription +
+ }Datum: @_existingApp.CreatedOn.ToShortDateString()
@@ -104,8 +126,10 @@ else { ApplicationId = _existingApp?.ApplicationId ?? 0, ModuleId = ModuleState.ModuleId, - UserId = PageState.User.UserId, // Ensure UserID is set + UserId = PageState.User.UserId, FileId = _existingApp.FileId, + Title = _existingApp.Title, + ShortDescription = _existingApp.ShortDescription, Status = "Published", // Auto-publish SubmittedOn = DateTime.UtcNow, ApprovedOn = DateTime.UtcNow, // Auto-approved diff --git a/Client/Modules/SZUAbsolventenverein.Module.PremiumArea/ModuleInfo.cs b/Client/Modules/SZUAbsolventenverein.Module.PremiumArea/ModuleInfo.cs index 33f104c..d213092 100644 --- a/Client/Modules/SZUAbsolventenverein.Module.PremiumArea/ModuleInfo.cs +++ b/Client/Modules/SZUAbsolventenverein.Module.PremiumArea/ModuleInfo.cs @@ -9,10 +9,12 @@ namespace SZUAbsolventenverein.Module.PremiumArea public ModuleDefinition ModuleDefinition => new ModuleDefinition { Name = "PremiumArea", - Description = "This module adds a premium member system to Octane. Users receive premium status after completing a payment. Premium members get access to exclusive features and content.", - Version = "1.0.2", - ServerManagerType = "SZUAbsolventenverein.Module.PremiumArea.Manager.PremiumAreaManager, SZUAbsolventenverein.Module.PremiumArea.Server.Oqtane", - ReleaseVersions = "1.0.0,1.0.1,1.0.2", + Description = + "This module adds a premium member system to Octane. Users receive premium status after completing a payment. Premium members get access to exclusive features and content.", + Version = "1.0.3", + ServerManagerType = + "SZUAbsolventenverein.Module.PremiumArea.Manager.PremiumAreaManager, SZUAbsolventenverein.Module.PremiumArea.Server.Oqtane", + ReleaseVersions = "1.0.0,1.0.1,1.0.2,1.0.3", Dependencies = "SZUAbsolventenverein.Module.PremiumArea.Shared.Oqtane", PackageName = "SZUAbsolventenverein.Module.PremiumArea", // Hier definieren Sie, WELCHE Permissions verfügbar sind diff --git a/Server/Migrations/01000003_AddTitleAndDescription.cs b/Server/Migrations/01000003_AddTitleAndDescription.cs new file mode 100644 index 0000000..60b7a0b --- /dev/null +++ b/Server/Migrations/01000003_AddTitleAndDescription.cs @@ -0,0 +1,32 @@ +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Oqtane.Databases.Interfaces; +using Oqtane.Migrations; +using SZUAbsolventenverein.Module.PremiumArea.Migrations.EntityBuilders; +using SZUAbsolventenverein.Module.PremiumArea.Repository; + +namespace SZUAbsolventenverein.Module.PremiumArea.Migrations +{ + [DbContext(typeof(PremiumAreaContext))] + [Migration("SZUAbsolventenverein.Module.PremiumArea.01.00.00.03")] + public class AddTitleAndDescription : MultiDatabaseMigration + { + public AddTitleAndDescription(IDatabase database) : base(database) + { + } + + protected override void Up(MigrationBuilder migrationBuilder) + { + var table = new EngineerApplicationEntityBuilder(migrationBuilder, ActiveDatabase); + table.AddStringColumn("Title", 256, true); + table.AddMaxStringColumn("ShortDescription", true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + var table = new EngineerApplicationEntityBuilder(migrationBuilder, ActiveDatabase); + table.DropColumn("Title"); + table.DropColumn("ShortDescription"); + } + } +} diff --git a/Server/Migrations/EntityBuilders/EngineerApplicationEntityBuilder.cs b/Server/Migrations/EntityBuilders/EngineerApplicationEntityBuilder.cs index de7516d..aa53b6b 100644 --- a/Server/Migrations/EntityBuilders/EngineerApplicationEntityBuilder.cs +++ b/Server/Migrations/EntityBuilders/EngineerApplicationEntityBuilder.cs @@ -11,10 +11,16 @@ namespace SZUAbsolventenverein.Module.PremiumArea.Migrations.EntityBuilders public class EngineerApplicationEntityBuilder : AuditableBaseEntityBuilder