hide past rest days
This commit is contained in:
parent
9c604e9455
commit
33fa8ffffc
1 changed files with 2 additions and 2 deletions
|
|
@ -42,9 +42,9 @@ const remainingDays = computed<ScheduleDay[]>(() => {
|
|||
return schedule.days.flatMap((day) => {
|
||||
const assignments = day.assignments.filter((assignment) => assignment.completedAt === null)
|
||||
const isActiveDate = day.date >= schedule.startDate && day.date <= schedule.targetDate
|
||||
const isRestDay = isActiveDate && day.assignments.length === 0
|
||||
const isVisibleRestDay = isActiveDate && day.assignments.length === 0 && day.date >= todayDate
|
||||
|
||||
return assignments.length > 0 || isRestDay ? [{ date: day.date, assignments }] : []
|
||||
return assignments.length > 0 || isVisibleRestDay ? [{ date: day.date, assignments }] : []
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue