Skip to content

feat: HR working-time PDF exports and release 2.2.0 - #38

Merged
patrickschiller merged 1 commit into
mainfrom
feat/pdf-working-time-export-2.2.0
Oct 22, 2026
Merged

patrickschiller merged 1 commit into
mainfrom
feat/pdf-working-time-export-2.2.0

Conversation

@patrickschiller

Copy link
Copy Markdown
Owner

HR can now download working-time PDFs for one employee, selected employees or everyone in a reporting period alongside CSV. Each employee starts on a separate page, with personnel number, full timestamps and UTC offsets, booking-day and period totals, approval state and warnings for open bookings. Locations and private notes are excluded.

The change prepares OpenClockwork 2.2.0, including matching API/version metadata, deployment examples, upgrade instructions and curated release notes. The release notes explain the German recording and retention requirements and the limits of policy-based break deductions; the export does not certify that actual breaks were taken or that an installation meets every legal requirement. No new database migrations are introduced relative to 2.1.0.

Requested in Discussion #37. Synthetic two-page PDF example.

Validation:

  • Full shared and web unit suites, API end-to-end suite and operations tests.
  • Workspace lint, typecheck and production builds; generated OpenAPI/client and release metadata verification.
  • German/English PDF rendering, employee pagination, overnight/DST timestamps and second precision checked with synthetic data.
  • Existing kiosk test now preserves inherited browser language properties in its geolocation mock.

Signed-off-by: Patrick Schiller <p@trickschiller.de>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T21:50:48.395801Z 11e704d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 11e704d0d8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +196 to +202
const canDownload =
validRange &&
validSelection &&
!report.isFetching &&
!report.isError &&
!pdfPending &&
Boolean(report.data?.rows.length);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Allow PDFs for employees without closed rows

When the selected employee has no completed entries in the period—such as an employee with only an open booking—canDownload is false and disables the PDF button. The PDF endpoint and renderer explicitly support this case by producing a page with the open-booking warning and “no closed entries” message, so this prevents the UI from generating a supported and useful record. Gate PDF downloads on a valid, successfully loaded selection rather than requiring report.data.rows.length.

Useful? React with 👍 / 👎.

Comment on lines +370 to +375
onChange={(event) => {
const checked = event.target.checked;
setSelectedEmployeeIds((selected) =>
checked
? [...selected, employee.id].sort()
: selected.filter((id) => id !== employee.id),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Cap the multi-employee picker at the API limit

On installations with more than 200 employees, these checkboxes allow selecting an unlimited number even though WorkingTimeReportQueryDto rejects employeeIds arrays larger than 200. Selecting the 201st employee therefore makes the JSON report fail with HTTP 400 and leaves both export buttons unavailable, without the picker enforcing or clearly presenting the limit. Disable further selections at 200 or otherwise split the request.

Useful? React with 👍 / 👎.

@patrickschiller
patrickschiller merged commit 9cfbc98 into main Oct 22, 2026
5 checks passed
@patrickschiller
patrickschiller deleted the feat/pdf-working-time-export-2.2.0 branch October 22, 2026 22:08
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.

1 participant