This commit is contained in:
Markus 2024-09-21 16:19:49 +02:00
commit 7b9d778eb3
29 changed files with 4876 additions and 0 deletions

61
Pages/Departments.razor Normal file
View file

@ -0,0 +1,61 @@
@page "/departments"
@inject HttpClient Http
<PageTitle>Departments</PageTitle>
<h2>Departments</h2>
<div class="dept-container">
@if (_initialized)
{
if (_departments is not null)
{
<table class="table table-striped table-hover">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Programs</th>
</tr>
</thead>
<tbody>
@foreach (var department in _departments)
{
<tr>
<td>@department.Id</td>
<td>@department.Name</td>
<td>
@if (department.Programs.Length == 0)
{
<span>-</span>
}
else
{
<ul>
@foreach (var program in department.Programs)
{
<li>@program</li>
}
</ul>
}
</td>
</tr>
}
</tbody>
</table>
}
else
{
<span class="warning-text">Data could not be loaded!</span>
}
}
else
{
<div class="progress">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
</div>
}
</div>
@code {
}