Sfoglia il codice sorgente

changed client sort order

= 4 anni fa
parent
commit
5ca2cace37

+ 15 - 3
resources/views/app/practice-management/supply-orders-ready-to-ship.blade.php

@@ -23,16 +23,18 @@
                         <th class="border-0">Patient</th>
                         <th class="border-0">Address</th>
                         <th class="border-0">Item(s)</th>
+                        <th class="border-0">Devices</th>
                         <th class="border-0">Actions</th>
                     </tr>
                     </thead>
-                    <tbody>
+                    <div>
                     <?php
                     $prevClientAndAddress = null;
                     $shipmentIndex = 0;
                     ?>
                     @foreach ($supplyOrders as $supplyOrder)
                         <?php
+                            $patient = $supplyOrder->client;
                         $currentClientAndAddress = implode('|', [$supplyOrder->client_id, $supplyOrder->mailing_address_full]);
                         $sameClientAndAddress = false;
                         ?>
@@ -45,7 +47,7 @@
                         @else
                             <?php $sameClientAndAddress = true; ?>
                         @endif
-                        <tr class="{{$supplyOrder->is_cancelled ? 'bg-light' : ''}}"
+                        < class="{{$supplyOrder->is_cancelled ? 'bg-light' : ''}}"
                             data-client-uid="{{$supplyOrder->client->uid}}"
                             data-address-line1="{{$supplyOrder->mailing_address_line1}}"
                             data-address-line2="{{$supplyOrder->mailing_address_line2}}"
@@ -69,12 +71,22 @@
                                 {{$supplyOrder->product->title}}
                                 <span class="text-secondary text-sm">(Created: {{friendlier_date_time($supplyOrder->created_at)}})</span>
                             </td>
+                            <td>
+                                @if(!$sameClientAndAddress)
+                            @foreach($patient->devices as $device)
+                                <div>
+                                    <div class="px-2">{{ friendly_date_time($device->device->created_at) }}</div>
+                                    <div class="px-2">{{ $device->device->category }}</div>
+                                    <div class="px-2"><pre class="m-0">{{ $device->device->imei }}</pre></div>
+                                </div>
+                                @endif
+                            </td>
                             <td class="align-top border-top-0">
                                 @if(!$sameClientAndAddress)
                                     <a href="#" id="generate-shipment">Generate Shipment</a>
                                 @endif
                             </td>
-                        </tr>
+                        </div>
                     @endforeach
                     </tbody>
                 </table>