瀏覽代碼

Patients list: Show only patients the pro has access to

Vijayakrishnan Krishnan 5 年之前
父節點
當前提交
bb69a64d86
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/Http/Controllers/HomeController.php

+ 1 - 1
app/Http/Controllers/HomeController.php

@@ -75,7 +75,7 @@ class HomeController extends Controller
                     ->orWhere('cm_pro_id', $proID)
                     ->orWhere('rmm_pro_id', $proID)
                     ->orWhere('rme_pro_id', $proID)
-                    ->orWhereRaw('id IN (SELECT client_id FROM client_pro_access WHERE pro_id = ?)', [$proID]);
+                    ->orWhereRaw('id IN (SELECT client_id FROM client_pro_access WHERE is_active AND pro_id = ?)', [$proID]);
             })
             ->orderBy('name_last', 'asc')
             ->orderBy('name_first', 'asc')