* Initial plan * Initial project setup - update to .NET 8.0 for compatibility Co-authored-by: clayschaad <11883505+clayschaad@users.noreply.github.com> * Complete SBB transport integration implementation Co-authored-by: clayschaad <11883505+clayschaad@users.noreply.github.com> * Revert to .NET 9 and separate transport info into ShiftTransport class Co-authored-by: clayschaad <11883505+clayschaad@users.noreply.github.com> * Make safety buffer minutes configurable via appsettings Co-authored-by: clayschaad <11883505+clayschaad@users.noreply.github.com> * Migrade pdf export service * Update gitignore * Implement new approach: real-time transport data per shift selection with ShiftWithTransport view model Co-authored-by: clayschaad <11883505+clayschaad@users.noreply.github.com> * Refactor export methods to directly use ShiftWithTransport instead of converting to separate parameters Co-authored-by: clayschaad <11883505+clayschaad@users.noreply.github.com> * Move ShiftWithTransport class to its own file Co-authored-by: clayschaad <11883505+clayschaad@users.noreply.github.com> * Code cleanup * Fix transport timing logic to respect safety buffer and find best available connections 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> Co-authored-by: clayschaad <c.schaad@pog.ch> Co-authored-by: Claudio Schaad <clayschaad@users.noreply.github.com>
49 lines
1.8 KiB
Text
49 lines
1.8 KiB
Text
@page "/"
|
|
|
|
<h3>Shift Scheduler</h3>
|
|
|
|
<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
|
|
{
|
|
@shift.Icon
|
|
}
|
|
</button>
|
|
<span class="tooltip">@shift.Name</span>
|
|
</div>
|
|
}
|
|
</div>
|
|
@if (SelectedSchedule.ContainsKey(day))
|
|
{
|
|
<div class="transport-info">
|
|
<small>@GetTransportSummary(day)</small>
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
<div class="reset-section">
|
|
<button class="reset-btn" @onclick="ResetSchedule">Reset Schedule</button>
|
|
</div>
|
|
|
|
<div class="export-buttons">
|
|
<button class="btn export-btn" @onclick="ExportToIcs">Export to ICS</button>
|
|
<button class="btn export-btn" @onclick="ExportToPdf">Export to PDF</button>
|
|
</div>
|