From 3ccce7e8a64de826013ffea493afb53fd14cea1c Mon Sep 17 00:00:00 2001 From: MaddoScientisto Date: Tue, 17 Mar 2026 22:10:19 +0100 Subject: [PATCH] feat: Add Grid View and Monthly Summary pages with workday management - Implement GridView.razor for displaying a tabular view of workdays in the current month. - Create MonthlySummary.razor to show a summary of worked hours, income, and day types for the selected month. - Introduce WorkDayEditor.razor for adding and editing workday entries with detailed calculations. - Update Home.razor to include links to the new Grid View and Monthly Summary pages. - Add IWorkDayService interface and CouchbaseLiteWorkDayService implementation for managing workday data. - Define domain models: WorkDayDocument, MonthlySummaryModel, and CoeffSnapshotDocument for data structure. - Enhance CouchbaseLiteDatabaseProvider to include a collection for workdays. - Update app settings and services to support new features. - Add CSS styles for calendar view and table formatting. --- Components/Layout/NavMenu.razor | 24 ++ Components/Layout/NavMenu.razor.css | 12 + Components/Pages/CalendarView.razor | 190 +++++++++++ Components/Pages/GridView.razor | 164 ++++++++++ Components/Pages/Home.razor | 45 ++- Components/Pages/MonthlySummary.razor | 155 +++++++++ Components/Pages/WorkDayEditor.razor | 296 ++++++++++++++++++ Components/_Imports.razor | 2 + Domain/CoeffSnapshotDocument.cs | 16 + Domain/MonthlySummaryModel.cs | 30 ++ Domain/WorkDayDocument.cs | 40 +++ Program.cs | 2 + .../Storage/CouchbaseLiteDatabaseProvider.cs | 4 + .../WorkDays/CouchbaseLiteWorkDayService.cs | 237 ++++++++++++++ Services/WorkDays/IWorkDayService.cs | 14 + plan.md | 1 - wwwroot/app.css | 43 +++ 17 files changed, 1257 insertions(+), 18 deletions(-) create mode 100644 Components/Pages/CalendarView.razor create mode 100644 Components/Pages/GridView.razor create mode 100644 Components/Pages/MonthlySummary.razor create mode 100644 Components/Pages/WorkDayEditor.razor create mode 100644 Domain/CoeffSnapshotDocument.cs create mode 100644 Domain/MonthlySummaryModel.cs create mode 100644 Domain/WorkDayDocument.cs create mode 100644 Services/WorkDays/CouchbaseLiteWorkDayService.cs create mode 100644 Services/WorkDays/IWorkDayService.cs diff --git a/Components/Layout/NavMenu.razor b/Components/Layout/NavMenu.razor index 3e899d2..3ff3c9a 100644 --- a/Components/Layout/NavMenu.razor +++ b/Components/Layout/NavMenu.razor @@ -14,6 +14,30 @@ + + + + + + + +