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