no message

This commit is contained in:
StudioTem committed 2024-07-12 12:29:44 +02:00
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),