feat(#2): адаптивный шедулер — сдвигает напоминания на «хорошие» часы из истории
This commit is contained in:
@@ -118,6 +118,8 @@ export function validateExerciseInput(
|
||||
}
|
||||
if (category !== undefined) out.category = category
|
||||
if (dailyGoal !== undefined) out.dailyGoal = dailyGoal
|
||||
const adaptive = bool(raw.adaptive)
|
||||
if (adaptive !== undefined) out.adaptive = adaptive
|
||||
return out
|
||||
}
|
||||
|
||||
@@ -166,6 +168,11 @@ export function validateExercisePatch(
|
||||
out.dailyGoal = v
|
||||
}
|
||||
}
|
||||
if ('adaptive' in raw) {
|
||||
const v = bool(raw.adaptive)
|
||||
if (v === undefined) return null
|
||||
out.adaptive = v
|
||||
}
|
||||
// Allow scheduler-controlled fields to be patched (used by store.markDone
|
||||
// through this same boundary), but range-check them.
|
||||
if ('nextFireAt' in raw) {
|
||||
|
||||
Reference in New Issue
Block a user