Repository navigation
feat: add scheduled workday accounting - #68
Conversation
Signed-off-by: Patrick Schiller <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d225d5934
ℹ️ 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".
| if (groupIds.length) { | ||
| // A project switch at exactly midnight can split an overnight capture | ||
| // into otherwise same-day rows. Include siblings outside the visible day. | ||
| const groups = await tx.timeEntry.groupBy({ | ||
| by: ['employeeId', 'captureGroupId'], |
There was a problem hiding this comment.
Preserve overnight detection for ungrouped Team splits
For a Team booking under a scheduled-workday plan, splitting an overnight entry exactly at midnight bypasses this protection: ordinary PWA bookings have no capture group, and TimeEntriesService.split only creates one for Solo entries (time-entries.service.ts:1216–1218). Neither resulting row crosses midnight, so both are recalculated as scheduled workdays instead of retaining the overnight calculation. With a 07:00–16:00 schedule and a 30-minute deduction at 30 credited minutes, a 23:50–00:20 booking changes from 30 credited minutes before splitting to 10 afterward. Preserve the original capture identity for these Team splits so project allocation cannot change credited working time.
Useful? React with 👍 / 👎.
Summary
Verification