소스 검색

added remote monitoring report filter

= 3 년 전
부모
커밋
25552088a7

+ 6 - 6
app/Http/Controllers/PracticeManagementController.php

@@ -74,14 +74,14 @@ class PracticeManagementController extends Controller
             ->where('days_between_most_recent_mcp_note_date_and_end_of_care_month', '<=', 90);
 	if(!$isAdmin) $query->where('mcp_pro_id', '=', $proID);
 
-    // if($request->get('show_billing_not_closed_only')){
-    //     $query->where(function($q){
-    //         return $q->where('is_bill_closed', false)->orWhereNull('is_bill_closed');
-    //     });
-    // }
+    if($request->get('show_billing_not_closed_only')){
+        $query->where(function($q){
+            return $q->where('is_bill_closed', false)->orWhereNull('is_bill_closed');
+        });
+    }
 
 
-	$rows = $query->orderByRaw(DB::raw('start_date DESC'))->paginate(10000) ;
+	$rows = $query->orderByRaw(DB::raw('start_date DESC'))->paginate(100) ;
         return view ('app.practice-management.remote-monitoring-report', compact('rows', 'isAdmin'));
 	}
 

+ 5 - 2
resources/views/app/practice-management/remote-monitoring-report.blade.php

@@ -7,7 +7,10 @@
             <strong class="mr-4">
                 <i class="fas fa-chart-bar"></i>
                 Remote Monitoring Report
-                <a href="?show_billing_not_closed_only=1">Show 'Billing Not Closed' Only</a>
+                <span class="inline-block mr-2">|</span>
+                <a href="/practice-management/remote-monitoring-report">Show All</a>
+                <span class="inline-block mr-2">|</span>
+                <a href="/practice-management/remote-monitoring-report?show_billing_not_closed_only=1">Show 'Billing Not Closed' Only</a>
             </strong>
         </div>
 
@@ -158,7 +161,7 @@
         </div>
     </div>
     <div class="mt-3">
-        {{$rows->appends($request->input())->links()}}
+        {{$rows->appends(request()->input())->links()}}
     </div>
 </div>
 @endsection