feat(time): max-hours-per-day settings page + inline day-cap error on log-time #256

Merged
vas2000-work merged 1 commit from feat/mapps-244-max-hours-per-day into main 2026-06-17 23:21:40 +02:00
Owner

Add a Time Tracking settings page that reads and writes the tenant-wide time_tracking/max_hours_per_day setting (1..=24, 404 -> 24 default), admin-gated and modeled on SchedulingSettingsPage with client-side range validation mirroring the server. Wire it through a new Route::SettingsTimeTracking entry, a dispatch wrapper, and a SettingsCard in the Settings hub.

On the Log Time page, read the configured cap and the user's existing total for today, then pre-flight check before submit: an entry that would push the day over the cap now shows a specific inline error naming the cap and the minutes remaining, instead of only the generic 24h message or a raw server error. The single-entry 24h guard stays as a hard upper bound, and a server-side 409/422 day-cap rejection is surfaced in the same red error banner via post_authed_typed.

#MAPPS-244

Add a Time Tracking settings page that reads and writes the tenant-wide time_tracking/max_hours_per_day setting (1..=24, 404 -> 24 default), admin-gated and modeled on SchedulingSettingsPage with client-side range validation mirroring the server. Wire it through a new Route::SettingsTimeTracking entry, a dispatch wrapper, and a SettingsCard in the Settings hub. On the Log Time page, read the configured cap and the user's existing total for today, then pre-flight check before submit: an entry that would push the day over the cap now shows a specific inline error naming the cap and the minutes remaining, instead of only the generic 24h message or a raw server error. The single-entry 24h guard stays as a hard upper bound, and a server-side 409/422 day-cap rejection is surfaced in the same red error banner via post_authed_typed. #MAPPS-244
feat(time): max-hours-per-day settings page + inline day-cap error on log-time
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m57s
52fc3568b7
Add a Time Tracking settings page that reads and writes the tenant-wide time_tracking/max_hours_per_day setting (1..=24, 404 -> 24 default), admin-gated and modeled on SchedulingSettingsPage with client-side range validation mirroring the server. Wire it through a new Route::SettingsTimeTracking entry, a dispatch wrapper, and a SettingsCard in the Settings hub.

On the Log Time page, read the configured cap and the user's existing total for today, then pre-flight check before submit: an entry that would push the day over the cap now shows a specific inline error naming the cap and the minutes remaining, instead of only the generic 24h message or a raw server error. The single-entry 24h guard stays as a hard upper bound, and a server-side 409/422 day-cap rejection is surfaced in the same red error banner via post_authed_typed.

#MAPPS-244
vas2000-work force-pushed feat/mapps-244-max-hours-per-day from 52fc3568b7
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m57s
to 2934c93e45
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 2m42s
Create release / Create release from merged PR (pull_request) Has been skipped
2026-06-17 23:15:04 +02:00
Compare
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
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!256
No description provided.