Przeglądaj źródła

Popup matrix: Cancelled Supply Orders Pending Review

Vijayakrishnan 3 lat temu
rodzic
commit
b81d8cd4c8

+ 7 - 1
app/Http/Controllers/McpController.php

@@ -153,7 +153,13 @@ class McpController extends Controller
         return view('app.mcp.cancelled_bills_pending_review', $data);
     }
     public function cancelled_supply_orders_pending_review(Request $request){
-        $data = [];
+        $data = [
+            'records' => SupplyOrder::where('signed_by_pro_id', $this->performer->pro->id)
+                ->where('is_cancelled', true)
+                ->where('is_cancellation_acknowledged', '<>', true)
+                ->orderBy('created_at')
+                ->get()
+        ];
         return view('app.mcp.cancelled_supply_orders_pending_review', $data);
     }
     public function erx_and_orders_pending_signature(Request $request){

+ 39 - 13
resources/views/app/mcp/cancelled_supply_orders_pending_review.blade.php

@@ -1,19 +1,45 @@
-@extends ('layouts/template')
+<div class="p-3 mcp-theme-1">
+    <div class="card">
 
-@section('content')
-    <div class="p-3 mcp-theme-1" id="patients-list">
-        <div class="card">
+        <div class="card-header px-3 py-2 d-flex align-items-center border-bottom-0">
+            <strong class="mr-4">
+                <i class="fas fa-user-injured"></i>
+                Cancelled Supply Orders Pending Review
+            </strong>
+        </div>
 
-            <div class="card-header px-3 py-2 d-flex align-items-center">
-                <strong class="mr-4">
-                    <i class="fas fa-user-injured"></i>
-                    Cancelled Supply Orders Pending Review
-                </strong>
-            </div>
+        <div class="card-body p-0 border-top-0 pb-0">
 
-            <div class="card-body p-0">
 
-            </div>
+            <table class="table table-sm table-striped mb-0">
+                <thead>
+                <tr>
+                    <th class="border-bottom-0">Date</th>
+                    <th class="border-bottom-0">Patient</th>
+                    <th class="border-bottom-0">Product</th>
+                    <th class="border-bottom-0">Reason</th>
+                    <th class="border-bottom-0">Status</th>
+                </tr>
+                </thead>
+                <tbody>
+                @foreach($records as $row)
+                    <tr>
+                        <td>{{ friendly_date_time($row->created_at, false) }}</td>
+                        <td>
+                            <a target="_blank" native href="{{route('patients.view.dashboard', $row->client)}}">
+                                {{$row->client->displayName()}}
+                            </a>
+                        </td>
+                        <td>{{ $row->product->title }}</td>
+                        <td>{{ $row->reason ?: '-' }}</td>
+                        <td>Cancelled</td>
+                    </tr>
+                @endforeach
+                </tbody>
+            </table>
         </div>
     </div>
-@endsection
+</div>
+
+
+