feat(timesheets): add manager UI to approve/reject submitted timesheets #207
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/mapps-194-timesheet-approvals-ui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The approval half of the timesheet workflow was unreachable: the backend implements approve/reject (manager-gated) but mokosh-apps had no surface to call them, so submitted weeks sat in "pending" forever. Add a manager/admin "Timesheet Approvals" queue.
/timesheets/approvalsroute +TimesheetApprovalsPage, gated oncan_manage_users()(manager/admin/super_admin) to match the server's RequireManager guard on approve/reject; lower roles see a notice and the page skips the tenant-wide fetch so they never trigger a 403.GET /timesheets?week=(no user_id, so the server aggregates tenant-wide), keeping the rows still awaiting approval (pending status with entries), behind a week selector that mirrors the employee timesheet page.Note: the acceptance criterion "the rejection reason is visible to the employee" depends on mokosh-server exposing rejection_reason in a response DTO (TimeEntryResponse / TimesheetSummaryResponse never return it today); the reason is captured and persisted by the reject endpoint, but surfacing it on the employee page is a backend follow-up.
#MAPPS-194
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com