mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-09 10:21:03 +00:00
fix: fail closed on corrupt mute schedules and clean invalid replicas
Empty or whitespace stored schedules no longer act as all-day mutes. Invalid schedules trigger remote DELETE cleanup, and the weekly-window form gains accessibility attributes plus component coverage.
This commit is contained in:
@@ -583,6 +583,8 @@ export function NotificationSuppressionSection({
|
||||
size="sm"
|
||||
variant={selected ? 'default' : 'outline'}
|
||||
className="h-7 px-2 text-xs"
|
||||
aria-pressed={selected}
|
||||
aria-label={label}
|
||||
onClick={() => {
|
||||
setFormScheduleDays((prev) =>
|
||||
selected
|
||||
@@ -598,12 +600,22 @@ export function NotificationSuppressionSection({
|
||||
</div>
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
<div className="space-y-1">
|
||||
<Label className="text-xs text-muted-foreground">Start (UTC)</Label>
|
||||
<Input type="time" value={formScheduleStart} onChange={(e) => setFormScheduleStart(e.target.value)} />
|
||||
<Label htmlFor="mute-schedule-start" className="text-xs text-muted-foreground">Start (UTC)</Label>
|
||||
<Input
|
||||
id="mute-schedule-start"
|
||||
type="time"
|
||||
value={formScheduleStart}
|
||||
onChange={(e) => setFormScheduleStart(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-1">
|
||||
<Label className="text-xs text-muted-foreground">End (UTC)</Label>
|
||||
<Input type="time" value={formScheduleEnd} onChange={(e) => setFormScheduleEnd(e.target.value)} />
|
||||
<Label htmlFor="mute-schedule-end" className="text-xs text-muted-foreground">End (UTC)</Label>
|
||||
<Input
|
||||
id="mute-schedule-end"
|
||||
type="time"
|
||||
value={formScheduleEnd}
|
||||
onChange={(e) => setFormScheduleEnd(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
|
||||
Reference in New Issue
Block a user