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']]; $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', '<', // 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
$end)->get(); $blockers2 = Blocker::whereIn('user_id', $userIdArray)->where('start', '<=', $start)->where('end', '>',
$start)->get();
$blockers = $blockers1->merge($blockers2);
return response()->json([ return response()->json([
'subtasks' => SubTaskResource::collection($subtasks), 'subtasks' => SubTaskResource::collection($subtasks),