Titel und Kurzbeschreibung hinzugefügt

This commit is contained in:
2026-02-19 14:41:35 +01:00
parent b51b37a6e8
commit eda0ad794d
7 changed files with 90 additions and 25 deletions

View File

@@ -22,6 +22,16 @@
<div class="card p-3">
<p>Bitte laden Sie Ihren Ingenieur-Antrag als PDF-Datei hoch.</p>
<div class="mb-3">
<label for="title" class="form-label">Titel</label>
<input id="title" type="text" class="form-control" @bind="_existingApp.Title" maxlength="256"/>
</div>
<div class="mb-3">
<label for="description" class="form-label">Kurzbeschreibung</label>
<textarea id="description" class="form-control" rows="3" @bind="_existingApp.ShortDescription" placeholder="Kurze Beschreibung Ihres Ingenieur-Antrags..."></textarea>
</div>
@* <div class="mb-3">
<label for="pdfUpload" class="form-label">Antrags-PDF</label>
<InputFile OnChange="@LoadFiles" class="form-control" accept=".pdf"/>
@@ -49,6 +59,18 @@ else
<p>
<strong>Status:</strong> <span class="badge bg-success">Veröffentlicht</span>
</p>
@if (!string.IsNullOrEmpty(_existingApp.Title))
{
<p>
<strong>Titel:</strong> @_existingApp.Title
</p>
}
@if (!string.IsNullOrEmpty(_existingApp.ShortDescription))
{
<p>
<strong>Kurzbeschreibung:</strong> @_existingApp.ShortDescription
</p>
}
<p>
<strong>Datum:</strong> @_existingApp.CreatedOn.ToShortDateString()
</p>
@@ -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