Fix planning controller (generate planning for current week if missing)
This commit is contained in:
parent
f208ab5740
commit
ac8bb4e726
1 changed files with 1 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ class PlanningController extends Controller
|
|||
->with('user')->get();
|
||||
foreach ($userIds as $id) {
|
||||
// auto create missing planning for user
|
||||
if ($date >= Carbon::now() and !$weeks->contains('user.id', $id)) {
|
||||
if ($date >= Carbon::now()->startOfWeek() and !$weeks->contains('user.id', $id)) {
|
||||
$wp = new WeekPlanning([
|
||||
'start' => $date,
|
||||
'planning' => WeekPlanning::getWeekBlock($date),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue