UI changes
This commit is contained in:
parent
8471138c06
commit
f09f57c3dd
2 changed files with 3 additions and 33 deletions
|
|
@ -7,9 +7,9 @@
|
|||
<button class="btn month-btn @(_isCurrentMonth ? "" : "selected")" @onclick="SelectNextMonth" disabled="@_isLoadingInitial">@MonthAndYear.NextMonthName</button>
|
||||
</div>
|
||||
<div class="action-buttons">
|
||||
<button class="btn export-btn" @onclick="ExportToIcs" disabled="@_isLoadingInitial">Export to ICS</button>
|
||||
<button class="btn export-btn" @onclick="ExportToPdf" disabled="@_isLoadingInitial">Export to PDF</button>
|
||||
<button class="btn config-btn" @onclick="ShowConfiguration" disabled="@_isLoadingInitial">⚙️ Configuration</button>
|
||||
<button class="btn export-btn" @onclick="ExportToIcs" disabled="@_isLoadingInitial"><span class="oi oi-calendar" aria-hidden="true"></span> Export to ICS</button>
|
||||
<button class="btn export-btn" @onclick="ExportToPdf" disabled="@_isLoadingInitial"><span class="oi oi-document" aria-hidden="true"></span>Export to PDF</button>
|
||||
<button class="btn config-btn" @onclick="ShowConfiguration" disabled="@_isLoadingInitial"><span class="oi oi-cog" aria-hidden="true"></span> Configuration</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -322,35 +322,5 @@ namespace ShiftScheduler.Client.Pages
|
|||
Shifts = await HttpClient.GetFromJsonAsync<List<Shift>>("api/shift/shifts") ?? new();
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
// Helper method to group days by week for desktop calendar view
|
||||
// Each week starts with Monday and ends with Sunday
|
||||
private List<List<DateTime>> GetWeeksInMonth()
|
||||
{
|
||||
var days = SelectedDate.DaysInMonth();
|
||||
var weeks = new List<List<DateTime>>();
|
||||
var currentWeek = new List<DateTime>();
|
||||
|
||||
foreach (var day in days)
|
||||
{
|
||||
// Start a new week if this is Monday and we have days in current week
|
||||
if (day.DayOfWeek == DayOfWeek.Monday && currentWeek.Count > 0)
|
||||
{
|
||||
weeks.Add(currentWeek);
|
||||
currentWeek = new List<DateTime>();
|
||||
}
|
||||
|
||||
// Add the day to current week
|
||||
currentWeek.Add(day);
|
||||
}
|
||||
|
||||
// Add any remaining days as the last week
|
||||
if (currentWeek.Count > 0)
|
||||
{
|
||||
weeks.Add(currentWeek);
|
||||
}
|
||||
|
||||
return weeks;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue