feat(settings): add Scheduling page to edit the standard due date #182

Merged
vas2000-work merged 2 commits from feat/MAPPS-345-scheduling-due-date-setting into main 2026-06-16 02:23:25 +02:00
Owner

Background

PMS-345 (server PR mokosh-server#257) added the tenant setting scheduling/default_due_business_days and applies it to new tasks (when no due date is given) and to tickets that match no SLA. The setting had no UI: validate_setting_value accepts 0..=365 (0 disables), and the value is read/written at GET/PUT /settings/scheduling/default_due_business_days.

Goal

Make the standard due date editable in Settings, satisfying the PMS-345 "editable in Settings" acceptance criterion.

Proposed approach

New admin-gated page at /settings/scheduling (component SchedulingSettingsPage) plus a card under the Billing & SLA group on the Settings hub. The page:

  • GETs the current value; a 404 (unconfigured) is treated as 0 rather than an error, so the form seeds cleanly on a fresh tenant.
  • Validates the input against the same 0..=365 range as the server, giving an inline message instead of a 422 round-trip.
  • PUTs { "value": n } and shows a saved confirmation.

Mirrors the single-record edit pattern used by the Profile page (outer use_resource loads, inner form seeds its signal from props).

Acceptance criteria

  • Admin can view and edit the standard due date in Settings > Scheduling
  • Input constrained to 0..=365 (0 disables), matching the server validator
  • Unconfigured tenant (404) seeds the form to 0 without an error
  • fmt, clippy (-D warnings), wasm check green
## Background PMS-345 (server PR mokosh-server#257) added the tenant setting `scheduling/default_due_business_days` and applies it to new tasks (when no due date is given) and to tickets that match no SLA. The setting had no UI: `validate_setting_value` accepts 0..=365 (0 disables), and the value is read/written at `GET/PUT /settings/scheduling/default_due_business_days`. ## Goal Make the standard due date editable in Settings, satisfying the PMS-345 "editable in Settings" acceptance criterion. ## Proposed approach New admin-gated page at `/settings/scheduling` (component `SchedulingSettingsPage`) plus a card under the Billing & SLA group on the Settings hub. The page: - GETs the current value; a 404 (unconfigured) is treated as 0 rather than an error, so the form seeds cleanly on a fresh tenant. - Validates the input against the same 0..=365 range as the server, giving an inline message instead of a 422 round-trip. - PUTs `{ "value": n }` and shows a saved confirmation. Mirrors the single-record edit pattern used by the Profile page (outer `use_resource` loads, inner form seeds its signal from props). ## Acceptance criteria - [x] Admin can view and edit the standard due date in Settings > Scheduling - [x] Input constrained to 0..=365 (0 disables), matching the server validator - [x] Unconfigured tenant (404) seeds the form to 0 without an error - [x] fmt, clippy (-D warnings), wasm check green
feat(settings): add Scheduling page to edit the standard due date
Some checks failed
Check / clippy + fmt + tests (pull_request) Has been cancelled
424e9f64a7
Add a Settings > Scheduling page that reads and writes the tenant-wide `scheduling/default_due_business_days` setting (PMS-345) via GET/PUT `/settings/scheduling/default_due_business_days`. Admins enter a whole number of business days (0..=365, 0 disables); the page mirrors the server-side range so an out-of-range value is caught inline instead of as a 422, treats a 404 from the GET as the unconfigured state (0), and shows a saved confirmation. Wires the route `/settings/scheduling` and a card under the Billing & SLA group on the Settings hub.

#PMS-345

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Merge branch 'main' into feat/MAPPS-345-scheduling-due-date-setting
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
0cb391899a
vas2000-work deleted branch feat/MAPPS-345-scheduling-due-date-setting 2026-06-16 02:23:26 +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!182
No description provided.