Merge branch 'trunk'
This commit is contained in:
commit
30cbcb59bd
1 changed files with 4 additions and 4 deletions
|
|
@ -288,12 +288,12 @@ class Employee extends Authenticatable
|
||||||
$now = Carbon::now()->format('Y/m/d');
|
$now = Carbon::now()->format('Y/m/d');
|
||||||
$nowPlus7 = Carbon::now()->addDays(7)->format('Y/m/d');
|
$nowPlus7 = Carbon::now()->addDays(7)->format('Y/m/d');
|
||||||
return collect([
|
return collect([
|
||||||
'now' => Planning::whereDate('start', '<', $now)
|
'now' => Planning::whereDate('start', '<=', $now)
|
||||||
->whereDate('end', '>', $now)
|
->whereDate('end', '>=', $now)
|
||||||
->where('employee_id', $this->id)
|
->where('employee_id', $this->id)
|
||||||
->first(),
|
->first(),
|
||||||
'next' => Planning::whereDate('start', '<', $nowPlus7)
|
'next' => Planning::whereDate('start', '<=', $nowPlus7)
|
||||||
->whereDate('end', '>', $nowPlus7)
|
->whereDate('end', '>=', $nowPlus7)
|
||||||
->where('employee_id', $this->id)
|
->where('employee_id', $this->id)
|
||||||
->first()
|
->first()
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue