feat(timesheets): admin status filter + multi-week range + history rows (PMS-506) #338

Merged
YousifShkara merged 1 commit from feat/PMS-506-timesheet-history-client into main 2026-06-25 08:53:02 +02:00
Owner

QA report: admins lose visibility of timesheets after Approve - the
queue filtered down to status=="pending" only, so approved + rejected
weeks vanished from the admin surface even though the data is
preserved server-side.

This rewrites TimesheetApprovalsPage:

  • Renamed surface to "Timesheet Approvals & History". The action queue
    still loads first (status filter defaults to "pending"); admins flip
    to Approved / Rejected / All to surface history without leaving the
    page.

  • Status filter Select (Pending / Approved / Rejected / All) drives a
    ?status= query param on /timesheets. Server (PMS-506 server PR)
    HAVING-filters the rolled status.

  • Range-mode toggle swaps the single-week selector for a from/to date
    pair, defaulting to the last 12 weeks. Switching mode rebuilds the
    fetch as ?from=&to=&status=&per_page=200 so the server returns the
    full span in one round trip.

  • ApprovalSummary DTO grows week_start, decided_by_id,
    decided_at, and rejection_reason to match the server's expanded
    TimesheetSummaryResponse.

  • Table grows a Week column, a Status badge column, and a Decision
    column that labels approved/rejected rows with the actor + decision
    timestamp + rejection reason. Approve / Reject buttons render only
    when the row is still pending; decided rows render as read-only
    history.

  • Reject target signal extended to (uid, week, name) so the modal
    acts on the right (user, week) pair across multi-week scans.

Requires the PMS-506 server PR for the new query params + audit
fields; pre-server-merge the SPA still works (server ignores unknown
params, returns rows without the audit fields, the SPA shows them as
absent).

#PMS-506

QA report: admins lose visibility of timesheets after Approve - the queue filtered down to status=="pending" only, so approved + rejected weeks vanished from the admin surface even though the data is preserved server-side. This rewrites `TimesheetApprovalsPage`: - Renamed surface to "Timesheet Approvals & History". The action queue still loads first (status filter defaults to "pending"); admins flip to Approved / Rejected / All to surface history without leaving the page. - Status filter Select (Pending / Approved / Rejected / All) drives a `?status=` query param on `/timesheets`. Server (PMS-506 server PR) HAVING-filters the rolled status. - Range-mode toggle swaps the single-week selector for a from/to date pair, defaulting to the last 12 weeks. Switching mode rebuilds the fetch as `?from=&to=&status=&per_page=200` so the server returns the full span in one round trip. - ApprovalSummary DTO grows `week_start`, `decided_by_id`, `decided_at`, and `rejection_reason` to match the server's expanded TimesheetSummaryResponse. - Table grows a Week column, a Status badge column, and a Decision column that labels approved/rejected rows with the actor + decision timestamp + rejection reason. Approve / Reject buttons render only when the row is still pending; decided rows render as read-only history. - Reject target signal extended to (uid, week, name) so the modal acts on the right (user, week) pair across multi-week scans. Requires the PMS-506 server PR for the new query params + audit fields; pre-server-merge the SPA still works (server ignores unknown params, returns rows without the audit fields, the SPA shows them as absent). #PMS-506
feat(timesheets): admin status filter + multi-week range + history rows (PMS-506)
All checks were successful
Check / fmt + clippy + tests (pull_request) Successful in 12m1s
Create release / Create release from merged PR (pull_request) Has been skipped
a665a7a149
QA report: admins lose visibility of timesheets after Approve - the
queue filtered down to status=="pending" only, so approved + rejected
weeks vanished from the admin surface even though the data is
preserved server-side.

This rewrites `TimesheetApprovalsPage`:

- Renamed surface to "Timesheet Approvals & History". The action queue
  still loads first (status filter defaults to "pending"); admins flip
  to Approved / Rejected / All to surface history without leaving the
  page.

- Status filter Select (Pending / Approved / Rejected / All) drives a
  `?status=` query param on `/timesheets`. Server (PMS-506 server PR)
  HAVING-filters the rolled status.

- Range-mode toggle swaps the single-week selector for a from/to date
  pair, defaulting to the last 12 weeks. Switching mode rebuilds the
  fetch as `?from=&to=&status=&per_page=200` so the server returns the
  full span in one round trip.

- ApprovalSummary DTO grows `week_start`, `decided_by_id`,
  `decided_at`, and `rejection_reason` to match the server's expanded
  TimesheetSummaryResponse.

- Table grows a Week column, a Status badge column, and a Decision
  column that labels approved/rejected rows with the actor + decision
  timestamp + rejection reason. Approve / Reject buttons render only
  when the row is still pending; decided rows render as read-only
  history.

- Reject target signal extended to (uid, week, name) so the modal
  acts on the right (user, week) pair across multi-week scans.

Requires the PMS-506 server PR for the new query params + audit
fields; pre-server-merge the SPA still works (server ignores unknown
params, returns rows without the audit fields, the SPA shows them as
absent).

#PMS-506
YousifShkara deleted branch feat/PMS-506-timesheet-history-client 2026-06-25 08:53:03 +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!338
No description provided.