mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 06:20:21 +00:00
no message
This commit is contained in:
1 parent
087cdf584e
commit
c6d5522099
1 file changed
+6
-2
@@ -73,9 +73,13 @@ class SubTaskController extends Controller
|
||||
|
||||
$userIdArray = [$parameters['user_id']];
|
||||
}
|
||||
$blockers1 = Blocker::whereIn('user_id', $userIdArray)->where('start', '>', $start)->get();
|
||||
|
||||
$blockers = Blocker::whereIn('user_id', $userIdArray)->where('start', '>', $start)->where('end', '<',
|
||||
$end)->get();
|
||||
// vacation can last more than 7 days what is the date range we use in filter. we need to check also for vacations that started before 7 days and end after 7 days
|
||||
$blockers2 = Blocker::whereIn('user_id', $userIdArray)->where('start', '<=', $start)->where('end', '>',
|
||||
$start)->get();
|
||||
|
||||
$blockers = $blockers1->merge($blockers2);
|
||||
|
||||
return response()->json([
|
||||
'subtasks' => SubTaskResource::collection($subtasks),
|
||||
|
||||
Reference in new issue
Block a user