Explorar o código

Calendar - ADMIN - if no pro selected - show nothing

Vijayakrishnan %!s(int64=3) %!d(string=hai) anos
pai
achega
ea79370ccf
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      app/Http/Controllers/AppointmentController.php

+ 4 - 2
app/Http/Controllers/AppointmentController.php

@@ -66,9 +66,11 @@ class AppointmentController extends Controller
                         ->orWhere('client_id', '=', $clientId)
                         ->orWhereRaw('client_id IN (SELECT shadow_client_id FROM pro WHERE id IN (' . implode(',', $proIds) . '))');
                 });
+            $appointments = $appointments->get();
+        }
+        else {
+            $appointments = [];
         }
-
-        $appointments = $appointments->get();
 
         $events = [];
         foreach ($appointments as $appointment) {