Explorar el Código

Admin: Notes pending sign - query fix + link from dashboard

Vijayakrishnan hace 3 años
padre
commit
68019335fe

+ 4 - 1
app/Http/Controllers/PracticeManagementController.php

@@ -378,7 +378,10 @@ OFFSET {$offset} LIMIT {$perPage}
     public function notes(Request $request, $filter = '')
     {
         $proID = $this->performer()->pro->id;
-        $query = Note::where('hcp_pro_id', $proID)->where('is_cancelled', FALSE);
+        $query = Note::where('is_cancelled', FALSE);
+        if ($this->performer()->pro->pro_type !== 'ADMIN') {
+            $query = $query->where('hcp_pro_id', $proID);
+        }
         switch ($filter) {
             case 'not-yet-signed':
                 $query = $query->where('is_signed_by_hcp', false);

+ 1 - 1
resources/views/app/dashboard-admin.blade.php

@@ -34,7 +34,7 @@
                                 </tr>
                                 <tr>
                                     <th class="px-2 text-center">{{$pro->get_notes_pending_signature_count_as_admin()}}</th>
-                                    <th class="pl-2 font-weight-normal">Notes Pending Signature</th>
+                                    <th class="pl-2 font-weight-normal"><a href="{{route('practice-management.notes')}}">Notes Pending Signature</a></th>
                                 </tr>
                                 <tr>
                                     <th class="px-2 text-center">{{$pro->get_notes_pending_summary_suggestion_count_as_admin()}}</th>