Skip to content

feat(planner): request cards, import confidence and hours readout per design - #1795

Merged
renemadsen merged 1 commit into
stablefrom
feat/5489-planner-design-gaps
Nov 20, 2026
Merged

renemadsen merged 1 commit into
stablefrom
feat/5489-planner-design-gaps

Conversation

@renemadsen

Copy link
Copy Markdown
Member

Follow-up to #1794 (#5489): the three design parts that were left out.

Ferieønsker cards (Anmodninger.dc.html)

  • Initials avatar, "Sendt i går kl. 14:12", a Venter chip, and a Type / Periode / Fra planen / Besked grid.
  • "Fra planen" (work days and hours) comes from 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 an apply or overlap outcome.
  • The staffing warning names colleagues who are already absent and says "så er I n af m på arbejde". It replaces the "leaves nobody" warning, which it still covers.

Import: Sikkerhed column

  • RotationInference rates a recognised rotation high when every pattern day was seen in at least 3 cycles, and medium when one was seen only twice.
  • New field: PlannerImportWorkerModel.Confidence. The import dialog shows it as a Høj or Middel chip.

Selection bar: "= 7,5 timer"

  • Shows the hours live while a valid shift is typed, in an aria-live region that is always rendered.
  • readShortForm() mirrors the server's short-form hours rules.

Testing

  • Vitest: 726 pass.
  • C#: the PlannerPureLogicTests run passes 46/46, 8 of them new. PlannerAbsenceAndImportTests has new asserts but wasn't run locally, so CI is its first run.
  • Playwright shard t: assertions added for the readout and the confidence chip.
  • Checked visually against the design on a local stack.

🤖 Generated with Claude Code

… 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>
Copilot AI balanced review requested due to automatic review settings November 20, 2026 05:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

@renemadsen
renemadsen merged commit f796566 into stable Nov 20, 2026
47 checks passed
@renemadsen
renemadsen deleted the feat/5489-planner-design-gaps branch November 20, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants