59 lines
1.9 KiB
Plaintext
59 lines
1.9 KiB
Plaintext
@using Flypaper.Storage.Entities
|
|
|
|
<div class="table-scroll">
|
|
<table class="idea-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Idee</th>
|
|
<th>Aufwand</th>
|
|
<th>Effizienz</th>
|
|
<th>Status</th>
|
|
<th>Umgesetzt</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var idea in Ideas)
|
|
{
|
|
<tr>
|
|
<td>
|
|
<strong>@idea.Title</strong>
|
|
<div class="markdown muted">@MarkdownRenderer.Render(idea.Rationale)</div>
|
|
</td>
|
|
<td class="nowrap">@Level(idea.Effort)</td>
|
|
<td class="nowrap">@Level(idea.Efficiency)</td>
|
|
<td class="nowrap"><span class="badge status-@idea.Status.ToString().ToLowerInvariant()">@StatusLabel(idea.Status)</span></td>
|
|
<td class="nowrap">
|
|
@if (idea.ImplementedOn is { } date)
|
|
{
|
|
@date.ToString("dd.MM.yyyy")
|
|
}
|
|
@if (idea.Commit is { } commit)
|
|
{
|
|
<code title="@commit">@(commit.Length > 8 ? commit[..8] : commit)</code>
|
|
}
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
@code {
|
|
[Parameter, EditorRequired] public required IReadOnlyList<IdeaEntity> Ideas { get; set; }
|
|
|
|
private static string Level(IdeaLevel level) => level switch
|
|
{
|
|
IdeaLevel.Low => "Gering",
|
|
IdeaLevel.Medium => "Mittel",
|
|
_ => "Hoch"
|
|
};
|
|
|
|
private static string StatusLabel(IdeaStatus status) => status switch
|
|
{
|
|
IdeaStatus.Open => "Offen",
|
|
IdeaStatus.InProgress => "In Arbeit",
|
|
IdeaStatus.Done => "Umgesetzt",
|
|
_ => "Verworfen"
|
|
};
|
|
}
|