Design;
This commit is contained in:
@@ -5,87 +5,122 @@
|
||||
@inject ITicketService TicketService
|
||||
@inject NavigationManager Nav
|
||||
|
||||
<div class="detail-container">
|
||||
<PageTitle>Ticket Bearbeiten</PageTitle>
|
||||
|
||||
<div class="main-container detail-wrapper">
|
||||
@if (ticket == null)
|
||||
{
|
||||
<p>Lade Ticket...</p>
|
||||
<div class="loading-state">Lade Ticket...</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="header-actions">
|
||||
<button class="btn btn-link" @onclick="GoBack">← Zurück zum Dashboard</button>
|
||||
<span class="badge @(ticket.IsCompleted ? "bg-success" : "bg-warning")">
|
||||
@(ticket.IsCompleted ? "Erledigt" : "Offen")
|
||||
</span>
|
||||
<div class="detail-header">
|
||||
<button class="custom-btn btn-ghost" @onclick="GoBack">
|
||||
<i class="fa fa-arrow-left"></i> Zurück zum Dashboard
|
||||
</button>
|
||||
<div class="status-badges">
|
||||
@if (ticket.IsWaitingForFeedback)
|
||||
{
|
||||
<span class="badge badge-warning">Wartet auf Rückmeldung</span>
|
||||
}
|
||||
@if (ticket.IsCompleted)
|
||||
{
|
||||
<span class="badge badge-success">Erledigt</span>
|
||||
}
|
||||
else if (!ticket.IsWaitingForFeedback)
|
||||
{
|
||||
<span class="badge badge-active">Aktiv</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card shadow-sm p-4">
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-bold">Titel</label>
|
||||
<input class="form-control form-control-lg" @bind="ticket.Title" />
|
||||
<div class="ticket-card detail-main-card">
|
||||
<div class="form-group">
|
||||
<label>Titel</label>
|
||||
<input class="custom-input detail-input" @bind="ticket.Title" placeholder="Titel des Tickets" />
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-6">
|
||||
<label class="form-label fw-bold">Priorität</label>
|
||||
<select class="form-select" @bind="ticket.Priority">
|
||||
<div class="form-row">
|
||||
<div class="form-group half-width">
|
||||
<label>Priorität</label>
|
||||
<select class="custom-input detail-input" @bind="ticket.Priority">
|
||||
@foreach (var prio in Enum.GetValues<TicketPriority>())
|
||||
{
|
||||
<option value="@prio">@prio</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6 d-flex align-items-end gap-4">
|
||||
<div class="form-check mb-2">
|
||||
<input class="form-check-input" type="checkbox" id="isWaiting" @bind="ticket.IsWaitingForFeedback">
|
||||
<label class="form-check-label text-warning" for="isWaiting">Wartet auf Rückmeldung</label>
|
||||
</div>
|
||||
<div class="form-check mb-2">
|
||||
<input class="form-check-input" type="checkbox" id="isDone" @bind="ticket.IsCompleted">
|
||||
<label class="form-check-label text-success" for="isDone">Als erledigt markieren</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group half-width checkboxes-container">
|
||||
<label class="custom-checkbox text-warning">
|
||||
<input type="checkbox" @bind="ticket.IsWaitingForFeedback" />
|
||||
<span class="checkmark"></span>
|
||||
Wartet auf Rückmeldung
|
||||
</label>
|
||||
<label class="custom-checkbox text-success">
|
||||
<input type="checkbox" @bind="ticket.IsCompleted" />
|
||||
<span class="checkmark"></span>
|
||||
Als erledigt markieren
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-bold">Beschreibung</label>
|
||||
<textarea class="form-control" rows="5" @bind="ticket.Description" placeholder="Beschreibe das Ticket näher..."></textarea>
|
||||
<div class="form-group">
|
||||
<label>Beschreibung</label>
|
||||
<textarea class="custom-input detail-input" rows="6" @bind="ticket.Description" placeholder="Detaillierte Beschreibung..."></textarea>
|
||||
</div>
|
||||
|
||||
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
|
||||
<button class="btn btn-primary px-5" @onclick="Save">Speichern</button>
|
||||
<div class="action-footer">
|
||||
<button class="custom-btn btn-primary" @onclick="Save">
|
||||
<i class="fa fa-save"></i> Ticket Speichern
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-7">
|
||||
<h5 class="mb-3">Kommentare (@ticket.Comments.Count)</h5>
|
||||
<div class="comment-list mb-3">
|
||||
<div class="detail-grid">
|
||||
<div class="ticket-card detail-sub-card">
|
||||
<h3>Kommentare <span>(@ticket.Comments.Count)</span></h3>
|
||||
|
||||
<div class="comment-list">
|
||||
@foreach (var c in ticket.Comments.OrderByDescending(x => x.CreatedAt))
|
||||
{
|
||||
<div class="card mb-2 p-2 bg-light border-0">
|
||||
<small class="text-muted">@c.CreatedAt.ToLocalTime().ToString("g")</small>
|
||||
<p class="mb-0">@c.Text</p>
|
||||
<div class="comment-item">
|
||||
<div class="comment-meta">@c.CreatedAt.ToLocalTime().ToString("g")</div>
|
||||
<div class="comment-text">@c.Text</div>
|
||||
</div>
|
||||
}
|
||||
@if (!ticket.Comments.Any())
|
||||
{
|
||||
<div class="empty-state">Noch keine Kommentare vorhanden.</div>
|
||||
}
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input class="form-control" placeholder="Kommentar schreiben..." @bind="newCommentText" />
|
||||
<button class="btn btn-outline-secondary" @onclick="AddComment">Senden</button>
|
||||
|
||||
<div class="comment-input-group">
|
||||
<input class="custom-input detail-input" placeholder="Neuen Kommentar schreiben..." @bind="newCommentText" />
|
||||
<button class="custom-btn btn-outline" @onclick="AddComment">Senden</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-5">
|
||||
<h5 class="mb-3">Anhänge</h5>
|
||||
<div class="list-group mb-2">
|
||||
<div class="ticket-card detail-sub-card">
|
||||
<h3>Anhänge <span>(@ticket.AttachmentNames.Count)</span></h3>
|
||||
|
||||
<div class="attachment-list">
|
||||
@foreach (var file in ticket.AttachmentNames)
|
||||
{
|
||||
<div class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<span><i class="bi bi-file-earmark"></i> @file</span>
|
||||
<div class="attachment-item">
|
||||
<i class="fa fa-file-pdf"></i>
|
||||
<span>@file</span>
|
||||
</div>
|
||||
}
|
||||
@if (!ticket.AttachmentNames.Any())
|
||||
{
|
||||
<div class="empty-state">Keine Anhänge vorhanden.</div>
|
||||
}
|
||||
</div>
|
||||
<button class="btn btn-sm btn-outline-primary" @onclick="MockAddFile">+ Datei simulieren</button>
|
||||
|
||||
<button class="custom-btn btn-outline full-width mt-15" @onclick="MockAddFile">
|
||||
<i class="fa fa-plus"></i> Datei simulieren
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -126,6 +161,71 @@
|
||||
}
|
||||
|
||||
<style>
|
||||
.detail-container { max-width: 1000px; margin: 2rem auto; }
|
||||
.header-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
|
||||
/* Spezifisches Layout für die Detailseite */
|
||||
.detail-wrapper { max-width: 900px; padding-top: 20px; }
|
||||
|
||||
.loading-state, .empty-state { color: var(--text-muted); font-style: italic; text-align: center; padding: 20px; }
|
||||
|
||||
/* Header */
|
||||
.detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
|
||||
.btn-ghost { background: transparent; color: var(--text-muted); padding: 0; }
|
||||
.btn-ghost:hover { color: var(--text-main); }
|
||||
.btn-ghost i { margin-right: 8px; }
|
||||
|
||||
.status-badges { display: flex; gap: 10px; }
|
||||
.badge { padding: 6px 12px; border-radius: var(--radius-small); font-size: 12px; font-weight: bold; text-transform: uppercase; }
|
||||
.badge-warning { background: rgba(255, 235, 59, 0.1); color: var(--accent-yellow); border: 1px solid rgba(255, 235, 59, 0.3); }
|
||||
.badge-success { background: rgba(222, 255, 154, 0.1); color: var(--accent-green); border: 1px solid rgba(222, 255, 154, 0.3); }
|
||||
.badge-active { background: rgba(255, 255, 255, 0.05); color: #ccc; border: 1px solid rgba(255, 255, 255, 0.1); }
|
||||
|
||||
/* Formularelemente */
|
||||
.detail-main-card { margin-bottom: 30px; }
|
||||
.form-group { margin-bottom: 20px; }
|
||||
.form-group label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }
|
||||
.form-row { display: flex; gap: 20px; }
|
||||
.half-width { flex: 1; }
|
||||
|
||||
.detail-input { background: #121212; border-color: var(--border-color); }
|
||||
.detail-input:focus { border-color: var(--accent-green); }
|
||||
select.detail-input { appearance: none; cursor: pointer; }
|
||||
|
||||
/* Checkbox Styling (Eckig und modern) */
|
||||
.checkboxes-container { display: flex; flex-direction: column; justify-content: flex-end; gap: 15px; padding-bottom: 10px; }
|
||||
.custom-checkbox { position: relative; padding-left: 30px; cursor: pointer; font-size: 15px; display: flex; align-items: center; }
|
||||
.custom-checkbox input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
|
||||
.checkmark { position: absolute; top: 0; left: 0; height: 20px; width: 20px; background-color: #121212; border: 1px solid var(--border-color); border-radius: var(--radius-small); transition: all 0.2s; }
|
||||
.custom-checkbox:hover input ~ .checkmark { border-color: #555; }
|
||||
.custom-checkbox input:checked ~ .checkmark { background-color: var(--accent-green); border-color: var(--accent-green); }
|
||||
.checkmark:after { content: ""; position: absolute; display: none; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #121212; border-width: 0 2px 2px 0; transform: rotate(45deg); }
|
||||
.custom-checkbox input:checked ~ .checkmark:after { display: block; }
|
||||
.text-warning { color: var(--accent-yellow) !important; }
|
||||
.text-success { color: var(--accent-green) !important; }
|
||||
|
||||
/* Buttons */
|
||||
.action-footer { display: flex; justify-content: flex-end; margin-top: 10px; border-top: 1px solid var(--border-color); padding-top: 20px; }
|
||||
.btn-primary { background: var(--accent-green); color: #121212; font-weight: bold; border-color: var(--accent-green); }
|
||||
.btn-primary:hover { background: #c6e589; }
|
||||
.btn-outline { background: transparent; border: 1px solid var(--border-color); color: #ccc; }
|
||||
.btn-outline:hover { border-color: var(--text-main); color: var(--text-main); }
|
||||
.full-width { width: 100%; }
|
||||
.mt-15 { margin-top: 15px; }
|
||||
|
||||
/* Grid (Kommentare & Anhänge nebeneinander) */
|
||||
.detail-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; }
|
||||
.detail-sub-card { padding: 20px; }
|
||||
.detail-sub-card h3 { margin: 0 0 20px 0; font-size: 18px; color: #f5f5f5; font-weight: 500; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
|
||||
.detail-sub-card h3 span { color: var(--text-muted); font-size: 14px; }
|
||||
|
||||
/* Kommentare */
|
||||
.comment-list { max-height: 300px; overflow-y: auto; margin-bottom: 15px; display: flex; flex-direction: column; gap: 10px; padding-right: 5px; }
|
||||
.comment-item { background: #121212; padding: 12px 15px; border-radius: var(--radius-small); border-left: 2px solid var(--accent-green); }
|
||||
.comment-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 5px; }
|
||||
.comment-text { font-size: 14px; line-height: 1.5; color: var(--text-main); }
|
||||
.comment-input-group { display: flex; gap: 10px; }
|
||||
.comment-input-group .custom-input { flex-grow: 1; }
|
||||
|
||||
/* Anhänge */
|
||||
.attachment-list { display: flex; flex-direction: column; gap: 8px; }
|
||||
.attachment-item { background: #121212; padding: 10px 15px; border-radius: var(--radius-small); display: flex; align-items: center; gap: 10px; font-size: 14px; border: 1px solid var(--border-color); }
|
||||
.attachment-item i { color: #ff4444; } /* Rotes PDF Icon */
|
||||
</style>
|
||||
Reference in New Issue
Block a user