Skip to content

feat(replacement): offer teammates first and warn when they are away - #220

Merged
skjnldsv merged 1 commit into
mainfrom
feature/replacement-picker
Nov 17, 2026
Merged

skjnldsv merged 1 commit into
mainfrom
feature/replacement-picker

Conversation

@skjnldsv

Copy link
Copy Markdown
Member

The replacement field was empty until you typed. When it opens, it now offers the colleagues you picked before, then your teammates: same manager, your manager, your reports. Typing still searches the whole company.

When the chosen replacement is off on some of the requested days, a warning says so. It shows neither the type nor the dates. The server only answers that question for HR, for teammates, or when the shared team calendar is on.

Before After

👾 This pull request was assisted by Claude Code, commits carry an Assisted-by trailer.

@skjnldsv skjnldsv added 3. to review Waiting for reviews enhancement New feature request AI assisted This PR contains AI-assisted commits labels Nov 17, 2026
@skjnldsv skjnldsv self-assigned this Nov 17, 2026
The replacement picker was empty until two letters were typed, and
nothing said when the chosen colleague was away themselves.

Before anything is typed, the picker now offers the colleagues chosen
before, then the teammates of the person whose absence it is: who shares
their manager, the manager and their direct reports, employees only.
Typing still searches the whole company. GET /api/employees/teammates
answers for the caller, or for any employee when HR asks.

Once a replacement and both dates are set, the dialog asks
GET /api/employees/{uid}/away whether that colleague has leave pending,
escalated, approved or awaiting withdrawal on any of those days, and
shows a warning without the type or the days. It answers HR, the
colleague's teammates, or everyone while the shared team calendar is on,
and null otherwise. Saving is never blocked.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
@skjnldsv
skjnldsv force-pushed the feature/replacement-picker branch from 3f023a8 to 10799c0 Compare November 17, 2026 13:43
@skjnldsv
skjnldsv merged commit e82b782 into main Nov 17, 2026
48 checks passed
@skjnldsv
skjnldsv deleted the feature/replacement-picker branch November 17, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted This PR contains AI-assisted commits enhancement New feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant