Skip to content

feat(hr): route time-off approver, add leave types & document expiry banding - #39

Merged
xuyushun441-sys merged 1 commit into
mainfrom
optimize/hr
Jun 14, 2026
Merged

xuyushun441-sys merged 1 commit into
mainfrom
optimize/hr

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

Why

  • The "My Pending Approvals" dashboard tile / view filter on approver, but nothing set it on submit (the hook comment claimed it did; the code didn't) — so the tile was always empty.
  • Only 4 leave types; statutory parental/bereavement were missing.
  • Document expiry was two booleans with no single severity to sort/colour by.
  • The charter oversold field sensitivity ("salary visible to self") vs. what the profile actually does.

What changed (within caps — 4 objects, 2 flows, 1 approval, 1 sharing)

  • Approver routing: set approver = employee.manager in time_off_submitted.flow (which already resolves the manager to notify) — real routing, no new flow, no unsafe cross-object hook read. Hook docstring corrected.
  • Leave types: add parental + bereavement (en + zh-CN).
  • expiry_status formula on hr_document (none / expired / expiring_30d / expiring_60d / valid).
  • CHARTER: salary is HR-Admin-only; self-visibility is a documented fork, not shipped.

Verification

typecheck + objectstack build + repo format:check clean. Build: 4 Objects / 2 Flows.

🤖 Generated with Claude Code

…banding

- The "My Pending Approvals" surfaces filter on `approver`, but nothing ever
  set it on submit (the hook comment claimed it did; the code didn't). Set the
  approver = employee's manager inside time_off_submitted.flow, which already
  loads the manager to notify — so approval routing is real without a new flow
  or an unsafe cross-object hook read. Hook docstring corrected.

- Add the statutory leave types real People-Ops teams need: `parental` and
  `bereavement` (en + zh-CN).

- Add an `expiry_status` formula on hr_document (none / expired / expiring_30d
  / expiring_60d / valid) so the document list can sort and colour-band by a
  single severity instead of two booleans.

- CHARTER: correct the field-sensitivity claim — salary is HR-Admin-only; the
  "visible to self" half is a documented fork, not shipped.

typecheck + objectstack build + format:check clean (4 Objects, 2 Flows).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@xuyushun441-sys
xuyushun441-sys merged commit 5faa26b into main Jun 14, 2026
3 checks passed
@xuyushun441-sys
xuyushun441-sys deleted the optimize/hr branch June 14, 2026 23:41
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