feat: add Dagsoversigt day-overview sheet to timeplanning Excel exports#1601
Merged
Conversation
Adds a localized "Dagsoversigt" (Day overview) worksheet as the first tab in both timeplanning Excel exports: - single-worker export (reports/file): Dagsoversigt + existing Dashboard - all-workers export (reports/file-all-workers): one combined Dagsoversigt (all workers' planning days, sorted by date then employee no.) + existing Total and per-site sheets The sheet is a banded Excel Table with a fixed 21-column layout matching the reference file: Employee no, Worker, weekday, date (dd/mm/yyyy), week number, all five shift blocks (start/stop/pause as real hh:mm time values), and net hours (0.00). Net hours reuse the existing override-aware computed value. The sheet name is a new translatable resx key (DayOverview) added to the neutral resource and all 25 culture files; every column header reuses an existing resx key. New cell styles (hh:mm, 0.00, dd/mm/yyyy) were added to the shared stylesheet without altering existing style indices. Includes unit + E2E tests for the new sheet and a fix to an existing E2E helper that assumed the first worksheet was the Dashboard sheet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add DagsoversigtWorksheetExportTests (shard g) and the existing WorkingHoursExcelExportE2ETests (shard h) to the dotnet test matrix in both the PR and master workflows, so the new day-overview sheet tests actually run in CI. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a new localized “Dagsoversigt” (Day overview) worksheet as the first tab in both TimePlanning Excel exports, providing a fixed 21-column, table-formatted day-by-day overview (including real date/time numeric values and net hours), while keeping existing sheets intact.
Changes:
- Prepends a new Day overview worksheet to both single-worker and all-workers workbooks and generates it via a shared worksheet builder.
- Extends the shared OpenXML stylesheet with new number formats/styles for time (hh:mm), date (dd/mm/yyyy), and net hours (0.00).
- Adds end-to-end tests covering sheet order, headers/table definition, and numeric style/value correctness; updates an existing E2E helper to locate the Dashboard sheet by name.
Reviewed changes
Copilot reviewed 34 out of 35 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Services/TimePlanningWorkingHoursService/TimePlanningWorkingHoursService.cs | Builds and inserts the new Day overview worksheet in both exports; adds helper methods for OpenXML cell creation and time-fraction conversion. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Infrastructure/Helpers/OpenXMLHelper.cs | Adds custom numbering formats and new CellFormat entries (new style indices) for time/date/0.00 formatting. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.resx | Adds neutral DayOverview resource key (sheet name). |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.Designer.cs | Adds strongly-typed accessor for DayOverview. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.da.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.de.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.nl-NL.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.sv-SE.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.no-NO.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.fi-FI.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.fr-FR.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.es-ES.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.it-IT.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.pt-BR.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.pt-PT.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.pl-PL.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.et-EE.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.lv-LV.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.lt-LT.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.ro-RO.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.hr-HR.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.sl-SI.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.cs-CZ.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.sk-SK.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.hu-HU.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.bg-BG.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.el-GR.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.is-IS.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.uk-UA.resx | Adds DayOverview translation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn.Test/WorkingHoursExcelExportE2ETests.cs | Updates helper logic to find the Dashboard sheet by name after introducing a new first sheet. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn.Test/DagsoversigtWorksheetExportTests.cs | Adds E2E coverage for Day overview sheet order, headers/table definition, and numeric styles/values. |
| docs/superpowers/specs/2026-06-09-dagsoversigt-export-sheet-design.md | Adds design spec describing the worksheet layout, behavior, and constraints. |
| docs/superpowers/plans/2026-06-09-dagsoversigt-export-sheet.md | Adds implementation plan and verification steps for the feature. |
Files not reviewed (1)
- eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Resources/Translations.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+3001
to
+3021
| for (int i = 0; i < siteIdCount; i++) | ||
| { | ||
| var doSite = await sdkContext.Sites.FirstOrDefaultAsync(x => x.MicrotingUid == siteIds[i]); | ||
| if (doSite == null) continue; | ||
| var doSiteWorker = await sdkContext.SiteWorkers.FirstAsync(x => x.SiteId == doSite.Id); | ||
| var doWorker = await sdkContext.Workers.FirstAsync(x => x.Id == doSiteWorker.WorkerId); | ||
| perSiteCache.TryGetValue(siteIds[i], out var doCache); | ||
| var doPlannings = doCache?.TimePlannings ?? new List<TimePlanningWorkingHoursModel>(); | ||
| var doUseOneMinute = doCache?.AssignedSite?.UseOneMinuteIntervals ?? false; | ||
| foreach (var planning in doPlannings) | ||
| { | ||
| dayOverviewRows.Add(new DayOverviewRow | ||
| { | ||
| EmployeeNo = doWorker.EmployeeNo ?? string.Empty, | ||
| WorkerName = doSite.Name, | ||
| Date = planning.Date, | ||
| Planning = planning, | ||
| UseOneMinuteIntervals = doUseOneMinute | ||
| }); | ||
| } | ||
| } |
…y test The export now adds the Dagsoversigt sheet as the first tab, so the Dashboard data is no longer the first sheet. Select the Dashboard sheet by name instead of by position so the JSON-parity comparison targets the correct sheet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a localized Dagsoversigt (Day overview) worksheet as the first tab in both timeplanning Excel exports:
reports/file): Dagsoversigt + existing Dashboard sheetreports/file-all-workers): one combined Dagsoversigt (every worker's planning days, sorted by date then employee no.) + existing Total and per-site sheetsThe sheet replicates the reference file layout: a banded Excel Table with a fixed 21-column layout — Employee no, Worker, weekday, date (
dd/mm/yyyy), week number, all five shift blocks (start/stop/pause as realhh:mmtime values), and net hours (0.00). Net hours reuse the existing override-aware computed value.Translation
DayOverview(sheet name) added to the neutral resource + all 25 culture files. Lower-confidence translations to sanity-check: fi-FI, ro-RO, uk-UA, el-GR.Implementation notes
hh:mm= 165,dd/mm/yyyy= 164,0.00) added to the shared stylesheet at new style indices (3/4/5); existing indices 0/1/2 untouched, so the other sheets are unchanged.BuildDayOverviewWorksheetbuilds the sheet; called exactly once per workbook (one uniqueDayOverviewExcel Table).00:00underhh:mm.Tests
GetShiftTimeFractiontime-of-day helper.ReadShift1Cells) that assumed the first worksheet was the Dashboard sheet (now resolves Dashboard by name).Design spec and implementation plan included under
docs/superpowers/.🤖 Generated with Claude Code