Schedule Toggle UI #64

Open
opened 2026-02-23 10:01:56 +00:00 by ottomata · 0 comments
Owner

Tasks

  • Add enable/disable toggle switch to the schedule section of the job detail page
  • Uses shadcn/ui Switch component
  • Label: "Enabled" (when on) / "Disabled" (when off)
  • On toggle: call PATCH /jobs/:id/schedule/toggle optimistically (update UI first, revert on error)
  • Show toast: "Schedule enabled" / "Schedule disabled"
  • Disabled schedules show next_run_at as "—" (not applicable)
  • Only Operator and Admin can toggle (Viewer sees the switch disabled/read-only)

Acceptance Criteria

  • Toggle switch reflects current schedule state on page load
  • Toggling calls the API and updates the UI
  • Optimistic update reverts correctly on API failure
  • Viewer sees a read-only switch (cannot interact)
### Tasks - [ ] Add enable/disable toggle switch to the schedule section of the job detail page - [ ] Uses shadcn/ui `Switch` component - [ ] Label: "Enabled" (when on) / "Disabled" (when off) - [ ] On toggle: call `PATCH /jobs/:id/schedule/toggle` optimistically (update UI first, revert on error) - [ ] Show toast: "Schedule enabled" / "Schedule disabled" - [ ] Disabled schedules show `next_run_at` as "—" (not applicable) - [ ] Only Operator and Admin can toggle (Viewer sees the switch disabled/read-only) ### Acceptance Criteria - [ ] Toggle switch reflects current schedule state on page load - [ ] Toggling calls the API and updates the UI - [ ] Optimistic update reverts correctly on API failure - [ ] Viewer sees a read-only switch (cannot interact)
ottomata added this to the Phase 1 project 2026-02-23 10:02:14 +00:00
ottomata modified the project from Phase 1 to Phase 6 2026-02-23 10:02:27 +00:00
Sign in to join this conversation.
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
ottomata/acsm#64
No description provided.