* Initial plan * Complete configuration UI implementation with working dialog, API endpoints, and file import/export Co-authored-by: clayschaad <11883505+clayschaad@users.noreply.github.com> * Refactor to inject IConfigurationService directly instead of using factory singletons Co-authored-by: clayschaad <11883505+clayschaad@users.noreply.github.com> * Remove redundant ShiftService and use IConfigurationService directly Co-authored-by: clayschaad <11883505+clayschaad@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: clayschaad <11883505+clayschaad@users.noreply.github.com>
75 lines
2.9 KiB
Text
75 lines
2.9 KiB
Text
@page "/"
|
|
@using ShiftScheduler.Client.Components
|
|
|
|
<div class="top-nav-buttons">
|
|
<button class="reset-btn" @onclick="ResetSchedule" disabled="@_isLoadingInitial">Reset Schedule</button>
|
|
<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>
|
|
</div>
|
|
|
|
<h3>Shift Scheduler - @CurrentMonthYear</h3>
|
|
|
|
@if (_isLoadingInitial)
|
|
{
|
|
<div class="loading-overlay">
|
|
<div class="loading-content">
|
|
<div class="loading-spinner">⏳</div>
|
|
<p>Loading shifts and transport data...</p>
|
|
</div>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
|
|
<div class="calendar-grid">
|
|
@foreach (var day in DaysInMonth)
|
|
{
|
|
<div class="day-cell">
|
|
<div class="day-header">
|
|
@day.ToString("dd.MM.yyyy") (@day.ToString("dddd"))
|
|
</div>
|
|
<div class="shifts">
|
|
@foreach (var shift in Shifts)
|
|
{
|
|
<div class="tooltip-wrapper">
|
|
<button class="shift-button @(SelectedSchedule.ContainsKey(day) && SelectedSchedule[day] == shift.Name ? "selected" : "")"
|
|
@onclick="() => SelectShift(day, shift.Name)"
|
|
disabled="@_isLoadingTransport">
|
|
@if (_isLoadingTransport && SelectedSchedule.ContainsKey(day) && SelectedSchedule[day] == shift.Name)
|
|
{
|
|
<span class="loading-spinner">⏳</span>
|
|
}
|
|
else
|
|
{
|
|
@if (shift.IsPngIcon)
|
|
{
|
|
<img src="icons\@shift.Icon" alt="@shift.Name" style="width: 24px; height: 24px;" />
|
|
}
|
|
else
|
|
{
|
|
@shift.Icon
|
|
}
|
|
}
|
|
</button>
|
|
<span class="tooltip">@shift.Name</span>
|
|
</div>
|
|
}
|
|
</div>
|
|
@if (SelectedSchedule.ContainsKey(day))
|
|
{
|
|
<div class="shift-times">
|
|
<small>@GetShiftTimes(day)</small>
|
|
</div>
|
|
<div class="transport-info">
|
|
<small>@GetTransportSummary(day)</small>
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
|
|
<ConfigurationDialog IsVisible="_showConfigDialog"
|
|
OnClose="HideConfiguration"
|
|
OnConfigurationChanged="OnConfigurationChanged" />
|