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:
@@ -317,7 +317,6 @@ final class Schedule {
|
||||
var goalRaw: String?
|
||||
var recurrenceRaw: String = ScheduleRecurrence.daily.rawValue
|
||||
var weekdays: [Int]?
|
||||
var timesPerWeek: Int?
|
||||
var date: Date?
|
||||
var order: Int = 0
|
||||
var createdAt: Date = Date()
|
||||
@@ -325,7 +324,7 @@ final class Schedule {
|
||||
var jsonRelativePath: String = ""
|
||||
|
||||
init(id: String, routineID: String, routineName: String, goalRaw: String?,
|
||||
recurrenceRaw: String, weekdays: [Int]?, timesPerWeek: Int?, date: Date? = nil,
|
||||
recurrenceRaw: String, weekdays: [Int]?, date: Date? = nil,
|
||||
order: Int, createdAt: Date, updatedAt: Date, jsonRelativePath: String) {
|
||||
self.id = id
|
||||
self.routineID = routineID
|
||||
@@ -333,7 +332,6 @@ final class Schedule {
|
||||
self.goalRaw = goalRaw
|
||||
self.recurrenceRaw = recurrenceRaw
|
||||
self.weekdays = weekdays
|
||||
self.timesPerWeek = timesPerWeek
|
||||
self.date = date
|
||||
self.order = order
|
||||
self.createdAt = createdAt
|
||||
@@ -352,8 +350,8 @@ final class Schedule {
|
||||
}
|
||||
|
||||
/// Human-readable recurrence line — shares its formatting with `ScheduleDocument`
|
||||
/// via `ScheduleRecurrence.summary(weekdays:timesPerWeek:date:)`.
|
||||
/// via `ScheduleRecurrence.summary(weekdays:date:)`.
|
||||
var recurrenceSummary: String {
|
||||
recurrenceEnum.summary(weekdays: weekdays, timesPerWeek: timesPerWeek, date: date)
|
||||
recurrenceEnum.summary(weekdays: weekdays, date: date)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user