Repository navigation
feat(planner): request cards, import confidence and hours readout per design - #1795
Merged
Merged
Conversation
… design The three parts of the #5489 design that PR #1794 left out: - Ferieønsker cards follow Anmodninger.dc.html: initials avatar, when the request was sent, a Venter chip, and a Type/Periode/Fra planen/Besked grid. "Fra planen" counts the planned work days and hours from the absence preview. The staffing warning names colleagues already absent and says how many of those planned are left at work ("så er I 5 af 7 på arbejde"), replacing the "leaves nobody" warning, which it still covers. - The Google Sheet import rates each recognised rotation Høj (every pattern day seen in 3+ cycles) or Middel (only 2), shown as a Sikkerhed chip. - The selection bar shows "= 7,5 timer" live for a valid shift, in an always-present aria-live region. The client short-form parser now returns hours using the server's rules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The snapshot lacks the parser and summation implementation needed to verify the client hours calculator’s rounding, excessive-break handling, and multi-shift parity against Microting.TimePlanningBase 11.0.0.
No open issues 🎉
What changed in this PR
This follow-up to #1794 adds the three remaining planner design features for #5489, extending the existing absence-request, schedule-import, and shift-editing flows.
Changes:
- Redesigns request cards with submission times, planned days and hours, and staffing warnings naming absent colleagues.
- Adds server-calculated import confidence and corresponding High/Medium chips.
- Adds a localized live hours readout for shift entry, with translations and expanded unit and browser-test coverage.
| File | Description |
|---|---|
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Services/PlannerService/PlannerService.cs | Returns confidence in import previews. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Infrastructure/Models/Planner/PlannerImportModels.cs | Adds the import confidence field. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn/Infrastructure/Helpers/RotationInference.cs | Rates confidence by observed repetitions. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn.Test/PlannerPureLogicTests.cs | Tests confidence thresholds and missing history. |
| eFormAPI/Plugins/TimePlanning.Pn/TimePlanning.Pn.Test/PlannerAbsenceAndImportTests.cs | Adds import-preview confidence assertions. |
| eform-client/src/app/plugins/modules/time-planning-pn/modules/planner/planner.utils.ts | Calculates short-form hours and shares capitalization logic. |
| eform-client/src/app/plugins/modules/time-planning-pn/modules/planner/planner.utils.spec.ts | Tests shift hours, breaks, and overnight shifts. |
| eform-client/src/app/plugins/modules/time-planning-pn/modules/planner/planner-shared.scss | Adds shared warning and confidence-chip styles. |
| eform-client/src/app/plugins/modules/time-planning-pn/modules/planner/models/planner.models.ts | Defines client confidence codes and field. |
| eform-client/src/app/plugins/modules/time-planning-pn/modules/planner/components/planner-requests-panel/planner-requests-panel.component.ts | Builds request details, previews, and staffing warnings. |
| eform-client/src/app/plugins/modules/time-planning-pn/modules/planner/components/planner-requests-panel/planner-requests-panel.component.spec.ts | Tests request details, preview cancellation, and staffing. |
| eform-client/src/app/plugins/modules/time-planning-pn/modules/planner/components/planner-requests-panel/planner-requests-panel.component.scss | Styles request-card headers and detail grids. |
| eform-client/src/app/plugins/modules/time-planning-pn/modules/planner/components/planner-requests-panel/planner-requests-panel.component.html | Renders redesigned cards and staffing notices. |
| eform-client/src/app/plugins/modules/time-planning-pn/modules/planner/components/planner-import-dialog/planner-import-dialog.component.ts | Maps confidence codes to chip labels and styles. |
| eform-client/src/app/plugins/modules/time-planning-pn/modules/planner/components/planner-import-dialog/planner-import-dialog.component.spec.ts | Tests confidence chips and table structure. |
| eform-client/src/app/plugins/modules/time-planning-pn/modules/planner/components/planner-import-dialog/planner-import-dialog.component.html | Adds the confidence column and adjusts column spans. |
| eform-client/src/app/plugins/modules/time-planning-pn/modules/planner/components/planner-container/planner-container.component.ts | Exposes localized shift-hours readout. |
| eform-client/src/app/plugins/modules/time-planning-pn/modules/planner/components/planner-container/planner-container.component.spec.ts | Tests hours formatting and readout visibility. |
| eform-client/src/app/plugins/modules/time-planning-pn/modules/planner/components/planner-container/planner-container.component.scss | Styles the inline hours readout. |
| eform-client/src/app/plugins/modules/time-planning-pn/modules/planner/components/planner-container/planner-container.component.html | Adds the polite live region for hours. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/ukUA.ts | Adds Ukrainian labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/svSE.ts | Adds Swedish labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/slSL.ts | Adds Slovenian labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/skSK.ts | Adds Slovak labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/roRO.ts | Adds Romanian labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/ptPT.ts | Adds European Portuguese labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/ptBR.ts | Adds Brazilian Portuguese labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/plPL.ts | Adds Polish labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/noNO.ts | Adds Norwegian labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/nlNL.ts | Adds Dutch labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/lvLV.ts | Adds Latvian labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/ltLT.ts | Adds Lithuanian labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/itIT.ts | Adds Italian labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/isIS.ts | Adds Icelandic labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/huHU.ts | Adds Hungarian labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/hrHR.ts | Adds Croatian labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/frFR.ts | Adds French labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/fiFI.ts | Adds Finnish labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/etET.ts | Adds Estonian labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/esES.ts | Adds Spanish labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/enUS.ts | Adds English labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/elGR.ts | Adds Greek labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/deDE.ts | Adds German labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/da.ts | Adds Danish labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/csCZ.ts | Adds Czech labels and replaces the staffing warning. |
| eform-client/src/app/plugins/modules/time-planning-pn/i18n/bgBG.ts | Adds Bulgarian labels and replaces the staffing warning. |
| eform-client/playwright/e2e/plugins/time-planning-pn/t/planner-import.spec.ts | Checks confidence values and rendered chips. |
| eform-client/playwright/e2e/plugins/time-planning-pn/t/planner-grid-edit.spec.ts | Checks the localized hours readout during editing. |
Review effort: Balanced
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.
Follow-up to #1794 (#5489): the three design parts that were left out.
Ferieønsker cards (Anmodninger.dc.html)
POST planner/absence/preview. The preview treats the pending request itself as an overlap, so the client counts the days that have plan hours and anapplyoroverlapoutcome.Import: Sikkerhed column
RotationInferencerates a recognised rotationhighwhen every pattern day was seen in at least 3 cycles, andmediumwhen one was seen only twice.PlannerImportWorkerModel.Confidence. The import dialog shows it as a Høj or Middel chip.Selection bar: "= 7,5 timer"
readShortForm()mirrors the server's short-form hours rules.Testing
PlannerPureLogicTestsrun passes 46/46, 8 of them new.PlannerAbsenceAndImportTestshas new asserts but wasn't run locally, so CI is its first run.🤖 Generated with Claude Code