feat(planning): redesign version-history modal as activity-log timeline#1649
Merged
Conversation
Reformat the Historie modal into a day-grouped Aktivitetslog timeline (time, human-readable change, actor) per the Design Manual mockup, keeping the large dialog size and the GPS/snapshot side panel. Backend: CompareVersions now diffs the individually recorded pause sub-slots (Pause10-19/100-102 for shift 1, Pause20-29/200-202 for shift 2, StartedAt/StoppedAt) and Pause1-5OverrideMinutes, so punch clock pauses appear in the history instead of producing empty versions. Frontend value formatting for human readability: - planned shift start/end/break and pause overrides: minutes -> HH:mm - legacy Start/Stop/Pause 1-5 tick ids: (id-1)*5 minutes -> HH:mm, 0 = unset - punch datetimes -> HH:mm (accepts Danish-culture '.' time separators) - floats rounded to 2 decimals; unset->unset noise rows suppressed Adds 62 i18n keys across all 26 locales, two backend unit tests for the new diff fields, and a Playwright e2e spec asserting the timeline formatting end to end. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR modernizes the Time Planning version-history (“Historie”) modal into a day-grouped Activity Log timeline and fixes missing version-history rows for pause sub-slot and pause-override-minute updates by expanding backend diff coverage. It also adds human-readable value formatting in the frontend (minutes/tick-ids/datetimes/floats) and updates i18n across all locales, with new backend unit tests and a Playwright e2e spec to validate the HH:mm rendering.
Changes:
- Backend: extend
CompareVersionsto diff pause sub-slot timestamp columns (Pause10–19/100–102, Pause20–29/200–202) andPause1–5OverrideMinutes. - Frontend: replace the grid-based version-history UI with a day-grouped timeline + value formatting (minutes → HH:mm, tick-id → HH:mm, punch datetimes → HH:mm, float rounding).
- Tests/i18n: add backend unit tests + a Playwright spec, and add new translation keys across all locales.
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Services/TimePlanningPlanningService/TimePlanningPlanningService.cs | Adds pause sub-slot and pause override minute fields to version diff generation. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn.Test/PlanRegistrationVersionHistoryTests.cs | Adds unit tests asserting pause sub-slot and override-minute changes appear in version history. |
| eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-planning-actions/workday-entity/workday-entity-dialog.component.ts | Passes worker/site name + date into the history modal for richer header context. |
| eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-planning-actions/version-history-modal/version-history-modal.component.ts | Implements timeline grouping + human-readable value formatting and removes the grid implementation. |
| eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-planning-actions/version-history-modal/version-history-modal.component.html | Replaces table/grid with the Activity Log timeline layout and side-panel interactions. |
| eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-planning-actions/version-history-modal/version-history-modal.component.scss | Adds timeline styling and removes table/grid styling. |
| eform-client/playwright/e2e/plugins/time-planning-pn/b/dashboard-version-history.spec.ts | New e2e coverage validating HH:mm rendering (and preventing raw minute integers leaking). |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/enUS.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/da.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/deDE.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/ukUA.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/svSE.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/noNO.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/plPL.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/itIT.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/nlNL.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/frFR.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/esES.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/ptPT.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/ptBR.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/roRO.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/fiFI.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/etET.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/hrHR.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/slSL.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/skSK.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/csCZ.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/huHU.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/bgBG.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/elGR.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/isIS.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/ltLT.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/lvLV.ts | Adds Activity Log/timeline labels + pause sub-slot and override-minute keys. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+153
to
+154
| const [, month, day] = datePart.split('-'); | ||
| return `${day}.${month} ${time}`; |
Comment on lines
+1871
to
+1875
| data: { | ||
| planRegistrationId: this.data.planningPrDayModels.id, | ||
| workerName: this.data.planningPrDayModels.siteName, | ||
| date: this.data.planningPrDayModels.date | ||
| }, |
…spec The zero-minute case skipped the minute-face click, keeping residual minutes from earlier shard state (07:50 instead of 07:00). Mirror dashboard-edit-b's proven rotateZ(360deg) zero-minute handling. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Move dashboard-version-history.spec.ts from shard b to a new lane r so it never shares dashboard state with the existing edit specs, and force-click the zero-minute clock marker (an overlapping face number intercepts pointer events, timing out a plain click). Lane r mirrors lane q: activate-plugin + assert-true bootstraps, no own SQL seed (CI falls back to lane a's). Matrix updated in both workflows. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… force-click Completes the lane isolation: activate-plugin/assert-true bootstraps for lane r, matrix entries in both workflows, and the force-click fix for the pointer-intercepted zero-minute clock marker. Co-Authored-By: Claude Fable 5 <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
CompareVersionsnow diffs the individually recorded pause sub-slots (Pause10–19/100–102shift 1,Pause20–29/200–202shift 2, StartedAt/StoppedAt) andPause1–5OverrideMinutes. Previously a save touching only these columns produced zero visible rows in the modal.Start/Stop/Pause 1–5 Idtick fields: (id−1)×5 minutes → HH:mm, 0 = unset (—).time separators)Tests
PlanRegistrationVersionHistoryTestscovering sub-slot pause and override-minutes diffs.b/dashboard-version-history.spec.ts: edits planned shift times twice, opens the Aktivitetslog, and asserts the timeline shows07:00 → 08:00/15:00 → 16:00/01:00 → 00:30with no raw minute integers leaking.Verification
Verified end-to-end against local real data (record with 10 individually recorded pauses): all pauses render as timeline rows with HH:mm values; GPS/snapshot side panel intact; all 26 locale files parse; plugin solution builds clean.
🤖 Generated with Claude Code