From 7d8e40b9cffb3b12c390f8d0b5c5e31195d2b3ff Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Tue, 26 Aug 2025 17:17:09 +0200 Subject: [PATCH] Add Configuration UI for Transport and Shift Settings with Import/Export (#27) * 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> --- Client/Components/ConfigurationDialog.razor | 338 ++++++++++++++++++ Client/Pages/Index.razor | 6 + Client/Pages/Index.razor.cs | 21 ++ Client/Pages/Index.razor.css | 18 + Client/wwwroot/js/fileDownload.js | 15 + Server/Controllers/ConfigurationController.cs | 73 ++++ Server/Controllers/ShiftController.cs | 16 +- Server/Program.cs | 11 +- Services/ConfigurationService.cs | 111 ++++++ Services/ShiftService.cs | 17 - Services/TransportApiService.cs | 4 +- Services/TransportService.cs | 7 +- Shared/Configuration.cs | 8 + .../TransportApiServiceTests.cs | 8 +- .../TransportServiceTests.cs | 8 +- 15 files changed, 626 insertions(+), 35 deletions(-) create mode 100644 Client/Components/ConfigurationDialog.razor create mode 100644 Server/Controllers/ConfigurationController.cs create mode 100644 Services/ConfigurationService.cs delete mode 100644 Services/ShiftService.cs create mode 100644 Shared/Configuration.cs diff --git a/Client/Components/ConfigurationDialog.razor b/Client/Components/ConfigurationDialog.razor new file mode 100644 index 0000000..ca3279d --- /dev/null +++ b/Client/Components/ConfigurationDialog.razor @@ -0,0 +1,338 @@ +@using ShiftScheduler.Shared +@using System.Text.Json +@inject HttpClient HttpClient +@inject IJSRuntime JSRuntime + +