Style: Add an icon on completed homework
All checks were successful
build / build (push) Successful in 54s
SonarQube Scan / SonarQube Trigger (push) Successful in 34s

This commit is contained in:
Namu
2025-12-21 12:16:17 +01:00
parent 3b72e42a4d
commit 5ae8ef655a
2 changed files with 6 additions and 7 deletions

View File

@@ -49,17 +49,17 @@ else
@foreach (var day in DaysForCurrentMonth) @foreach (var day in DaysForCurrentMonth)
{ {
var isOtherMonth = day.Month != currentMonth.Month; var isOtherMonth = day.Month != currentMonth.Month;
var hwForDay = GetHomeworksForDate(day); var homeworkForDay = GetHomeworksForDate(day);
<div class="calendar-day @(isOtherMonth ? "other-month" : "")"> <div class="calendar-day @(isOtherMonth ? "other-month" : "")">
<div class="date-number">@day.Day</div> <div class="date-number">@day.Day</div>
@if (hwForDay != null && hwForDay.Count > 0) @if (homeworkForDay != null && homeworkForDay.Count > 0)
{ {
<div class="homeworks-list"> <div class="homeworks-list">
@foreach (var hw in hwForDay) @foreach (var homework in homeworkForDay)
{ {
var color = GetSubjectColor(hw.SchoolSubject); var color = GetSubjectColor(homework.SchoolSubject);
<div class="hw-pill" title="@($"{hw.Title} - {hw.SchoolSubject?.Name}")" style="background:@color"> <div class="hw-pill" title="@($"{homework.Title} - {homework.SchoolSubject?.Name}")" style="background:@color">
@Shorten(hw.Title, 28) @Shorten(homework.Title, 28) @(homework.IsCompleted ? "✅" : string.Empty)
</div> </div>
} }
</div> </div>

View File

@@ -89,4 +89,3 @@
NavigationManager.LocationChanged -= OnLocationChanged; NavigationManager.LocationChanged -= OnLocationChanged;
} }
} }