mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-17 05:28:18 +01:00
Show schedules till they are completed
Currently schedules are shown on the status page when they are in the status upcoming or in progress. But, when the scheduled time is in the past - it's hidden, even when it's still going on. This PR fixes this issue by hiding the maintenance when it's in the status completed, or the completed time has passed.
This commit is contained in:
parent
a740d5c8c0
commit
9b4e8c1545
@ -176,7 +176,7 @@ class Schedule extends Model implements HasPresenter
|
||||
*/
|
||||
public function scopeFutureSchedules($query)
|
||||
{
|
||||
return $query->whereIn('status', [self::UPCOMING, self::IN_PROGRESS])->where('scheduled_at', '>=', Carbon::now());
|
||||
return $query->whereIn('status', [self::UPCOMING, self::IN_PROGRESS])->where('completed_at', '>=', Carbon::now());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user