feat(time): explain disabled timesheet Submit + add jump-to-current-week (PMS-310) #166

Merged
longjacksonle merged 1 commit from feat/PMS-310-timesheet-empty-week-affordances into main 2026-06-15 22:28:27 +02:00

Implements PMS-310.

Problem

On the Timesheets page, paging the week selector forward to a future (empty) week left the user with a silently greyed-out "Submit Timesheet" button and no quick way back to the current week, so the page felt stuck.

Changes (src/pages/time.rs, TimesheetsPage)

  • When Submit is disabled because the week has no logged time (!has_entries && !already_approved && !is_pending), a caption "No time logged this week yet." now sits directly under the button, giving the greyed state a stated reason.
  • The week selector shows a "Jump to current week" control whenever the selected week differs from monday_of_week(today), returning in one click. Hidden when already on the current week.

Verification

just pre-commit (pinned rust 1.94 image, = CI) passes: fmt, clippy -D warnings, cargo check --target wasm32-unknown-unknown, all 90 lib tests.

Acceptance criteria

  • Empty week shows a visible reason by the disabled Submit button.
  • "Jump to current week" appears whenever off the current week and returns in one click.
  • Hidden when already on the current week.
  • No regression to submit / withdraw / status badges; caption only for the empty-draft case.

🤖 Generated with Claude Code

Implements PMS-310. ## Problem On the Timesheets page, paging the week selector forward to a future (empty) week left the user with a silently greyed-out "Submit Timesheet" button and no quick way back to the current week, so the page felt stuck. ## Changes (`src/pages/time.rs`, `TimesheetsPage`) - When Submit is disabled because the week has no logged time (`!has_entries && !already_approved && !is_pending`), a caption "No time logged this week yet." now sits directly under the button, giving the greyed state a stated reason. - The week selector shows a "Jump to current week" control whenever the selected week differs from `monday_of_week(today)`, returning in one click. Hidden when already on the current week. ## Verification `just pre-commit` (pinned rust 1.94 image, = CI) passes: fmt, clippy `-D warnings`, `cargo check --target wasm32-unknown-unknown`, all 90 lib tests. ## Acceptance criteria - [x] Empty week shows a visible reason by the disabled Submit button. - [x] "Jump to current week" appears whenever off the current week and returns in one click. - [x] Hidden when already on the current week. - [x] No regression to submit / withdraw / status badges; caption only for the empty-draft case. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(time): explain the disabled timesheet Submit and add jump-to-current-week (PMS-310)
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 56s
1c04965321
Paging the Timesheets week selector forward to a future (empty) week left the user with a silently greyed-out "Submit Timesheet" button and no quick way back, so the page felt stuck. Two small affordances make the empty-week state self-explanatory:

- When Submit is disabled because the week has no logged time (and is not already approved or pending), a caption "No time logged this week yet." now sits directly under the button, so the greyed state has a stated reason instead of being a dead button.
- The week selector shows a "Jump to current week" control whenever the selected week differs from the current week, returning to it in one click. It is hidden when already on the current week.

No workflow change: submit, withdraw, and the approved/pending/rejected badges behave exactly as before; the caption only appears for the empty-draft case.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
longjacksonle deleted branch feat/PMS-310-timesheet-empty-week-affordances 2026-06-15 22:28:27 +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!166
No description provided.