feat(time): show reviewable submit/change/approve history in approvals #416

Merged
Claude-Run merged 1 commit from feat/MAPPS-340-timesheet-approval-history into main 2026-07-04 03:12:22 +02:00
Member

The Timesheet Approvals & History view now surfaces a per-timesheet "History" button (on pending and decided rows alike) that opens a modal with a chronological submit/change/approve/reject timeline plus the applicable timesheet rules, so a reviewer can audit how a timesheet reached its current state even after it is approved.

The timeline is composed entirely from data the server already exposes, so no new endpoint is needed: each time entry's created_at yields a "Logged" event and an updated_at strictly later yields an "Edited" change event (both attributed to the employee), and the week's rolled-up decision (decided_by / decided_at / rejection_reason, already carried on the approvals summary since PMS-506) yields the terminal Approved/Rejected event. Events are merged and sorted oldest-first by build_timesheet_history, a pure function unit-tested natively (ordering, edit detection, decision folding, post-approval survival, blank-reviewer fallback).

Alongside the timeline the modal shows the applicable timesheet rules: the per-day max-hours cap (/settings/time_tracking/max_hours_per_day) and the tenant rounding rules (/time-rounding-rules), each fetched tolerantly so a missing setting or older server simply omits that line. RemoteTimeEntry gains optional created_at/updated_at fields (default-tolerant) to drive the derivation.

#MAPPS-340

The Timesheet Approvals & History view now surfaces a per-timesheet "History" button (on pending and decided rows alike) that opens a modal with a chronological submit/change/approve/reject timeline plus the applicable timesheet rules, so a reviewer can audit how a timesheet reached its current state even after it is approved. The timeline is composed entirely from data the server already exposes, so no new endpoint is needed: each time entry's created_at yields a "Logged" event and an updated_at strictly later yields an "Edited" change event (both attributed to the employee), and the week's rolled-up decision (decided_by / decided_at / rejection_reason, already carried on the approvals summary since PMS-506) yields the terminal Approved/Rejected event. Events are merged and sorted oldest-first by build_timesheet_history, a pure function unit-tested natively (ordering, edit detection, decision folding, post-approval survival, blank-reviewer fallback). Alongside the timeline the modal shows the applicable timesheet rules: the per-day max-hours cap (/settings/time_tracking/max_hours_per_day) and the tenant rounding rules (/time-rounding-rules), each fetched tolerantly so a missing setting or older server simply omits that line. RemoteTimeEntry gains optional created_at/updated_at fields (default-tolerant) to drive the derivation. #MAPPS-340
feat(time): show reviewable submit/change/approve history in approvals
All checks were successful
Check / fmt + clippy + tests (pull_request) Successful in 6m9s
Create release / Create release from merged PR (pull_request) Has been skipped
37937518c0
The Timesheet Approvals & History view now surfaces a per-timesheet "History" button (on pending and decided rows alike) that opens a modal with a chronological submit/change/approve/reject timeline plus the applicable timesheet rules, so a reviewer can audit how a timesheet reached its current state even after it is approved.

The timeline is composed entirely from data the server already exposes, so no new endpoint is needed: each time entry's created_at yields a "Logged" event and an updated_at strictly later yields an "Edited" change event (both attributed to the employee), and the week's rolled-up decision (decided_by / decided_at / rejection_reason, already carried on the approvals summary since PMS-506) yields the terminal Approved/Rejected event. Events are merged and sorted oldest-first by build_timesheet_history, a pure function unit-tested natively (ordering, edit detection, decision folding, post-approval survival, blank-reviewer fallback).

Alongside the timeline the modal shows the applicable timesheet rules: the per-day max-hours cap (/settings/time_tracking/max_hours_per_day) and the tenant rounding rules (/time-rounding-rules), each fetched tolerantly so a missing setting or older server simply omits that line. RemoteTimeEntry gains optional created_at/updated_at fields (default-tolerant) to drive the derivation.

#MAPPS-340
Claude-Run deleted branch feat/MAPPS-340-timesheet-approval-history 2026-07-04 03:12:22 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!416
No description provided.