Show only the day's docket on the Today board and add ad hoc Now workouts
- Due-filter schedules: daily always, fixed days by weekday, one-offs on their date; rest days get an empty state - Workouts with no due schedule row (ad hoc or off-day starts) now render as their own board rows - The + sheet is now "New Workout" with a "When" picker; "Now" (offered when adding on today) skips the schedule and starts the workout directly - Remove the times-per-week scheduling mode everywhere (enum, document, entity, mappers, planner, seeds, tests)
This commit is contained in:
@@ -376,7 +376,6 @@ struct ScheduleDocument: Codable, Sendable, Equatable, Identifiable {
|
||||
var goal: String? // GoalKind raw value; nil = unassigned
|
||||
var recurrence: String // ScheduleRecurrence raw value
|
||||
var weekdays: [Int]? // Calendar weekday numbers 1 (Sun) – 7 (Sat); .fixedDays only
|
||||
var timesPerWeek: Int? // .frequency only
|
||||
var date: Date? = nil // the one-off day; .once only
|
||||
var order: Int
|
||||
var createdAt: Date
|
||||
@@ -394,9 +393,9 @@ extension ScheduleDocument {
|
||||
/// The recurrence, defaulting to `.daily` on an unknown raw value.
|
||||
var recurrenceEnum: ScheduleRecurrence { ScheduleRecurrence(rawValue: recurrence) ?? .daily }
|
||||
|
||||
/// Human-readable recurrence line ("Jul 12, 2026" / "Daily" / "Mon & Thu" / "2× per week").
|
||||
/// Human-readable recurrence line ("Jul 12, 2026" / "Daily" / "Mon & Thu").
|
||||
var recurrenceSummary: String {
|
||||
recurrenceEnum.summary(weekdays: weekdays, timesPerWeek: timesPerWeek, date: date)
|
||||
recurrenceEnum.summary(weekdays: weekdays, date: date)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user