|
@@ -1,16 +1,17 @@
|
|
|
@extends ('layouts.patient')
|
|
|
@section('inner-content')
|
|
|
<div class="">
|
|
|
- <div class="d-flex align-items-center pb-2">
|
|
|
+ <div class="d-flex align-items-center mb-3">
|
|
|
<h4 class="font-weight-bold m-0">Shipments</h4>
|
|
|
<span class="mx-2 text-secondary">|</span>
|
|
|
<div moe>
|
|
|
<a start show href="#">Add</a>
|
|
|
<form url="/api/shipment/create">
|
|
|
<input type="hidden" name="clientUid" value="{{ $patient->uid }}">
|
|
|
- <label class="text-secondary font-weight-bold">Field</label>
|
|
|
+ <label class="text-secondary font-weight-bold">Add Shipment</label>
|
|
|
<div class="mb-2">
|
|
|
- TODO
|
|
|
+ <label class="text-secondary text-sm">Requested Ship Date *</label>
|
|
|
+ <input type="date" class="form-control form-control-sm" name="requestedShipDate" required>
|
|
|
</div>
|
|
|
<div class="d-flex align-items-center">
|
|
|
<button class="btn btn-sm btn-primary mr-2" type="button" submit>Save</button>
|
|
@@ -18,16 +19,337 @@
|
|
|
</form>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <table class="table table-striped table-sm table-bordered mb-0">
|
|
|
- @if($patient->shipments && count($patient->shipments))
|
|
|
|
|
|
- @else
|
|
|
- <tbody>
|
|
|
- <tr>
|
|
|
- <td class="text-secondary p-3">No shipments have been created for this patient</td>
|
|
|
+ <div class="d-flex align-items-start h-100">
|
|
|
+ <div class="flex-grow-1">
|
|
|
+
|
|
|
+ @if($patient->readyToShipSupplyOrders && count($patient->readyToShipSupplyOrders))
|
|
|
+ {{--<div class="mb-3 p-2 border bg-aliceblue">
|
|
|
+ <div class="font-weight-bold mb-2 text-info">Ready to Ship Supply Orders</div>
|
|
|
+ <table class="table table-sm table-bordered mb-0 bg-white">
|
|
|
+ @if($patient->readyToShipSupplyOrders && count($patient->readyToShipSupplyOrders))
|
|
|
+ <thead>
|
|
|
+ <tr class="">
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0">Title</th>
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0">Reason</th>
|
|
|
+ @if(!$shipment)
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0">Created At</th>
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0">Pro Signed?</th>
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0">Cancelled?</th>
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0">Shipment</th>
|
|
|
+ @endif
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ @foreach($patient->readyToShipSupplyOrders as $iSupplyOrder)
|
|
|
+ <tr class="">
|
|
|
+ <td class="px-2">
|
|
|
+ <a href="{{route('patients.view.supply-orders', ['patient' => $patient, 'supplyOrder' => $iSupplyOrder])}}">
|
|
|
+ {{ $iSupplyOrder->product->title }}
|
|
|
+ </a>
|
|
|
+ </td>
|
|
|
+ <td class="px-2">{{ $iSupplyOrder->reason }}</td>
|
|
|
+ @if(!$shipment)
|
|
|
+ <td class="px-2">{{ friendlier_date_time($iSupplyOrder->created_at) }}</td>
|
|
|
+ <td class="px-2">{{ $iSupplyOrder->is_signed_by_pro ? $iSupplyOrder->signedPro->displayName() : '-' }}</td>
|
|
|
+ <td class="px-2">{{ $iSupplyOrder->is_cancelled ? 'Yes' : 'No' }}</td>
|
|
|
+ <td class="px-2">{{ $iSupplyOrder->shipment_id ? $iSupplyOrder->shipment->status : '-' }}</td>
|
|
|
+ @endif
|
|
|
+ </tr>
|
|
|
+ @endforeach
|
|
|
+ </tbody>
|
|
|
+ @else
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td class="text-secondary p-3">No unshipped supply orders for this patient</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ @endif
|
|
|
+ </table>
|
|
|
+ </div>--}}
|
|
|
+ <div class="alert alert-info px-3 rounded-0">
|
|
|
+ There {{ count($patient->readyToShipSupplyOrders) === 1 ? 'is' : 'are' }}
|
|
|
+ <b>{{ count($patient->readyToShipSupplyOrders) }}</b> ready-to-ship
|
|
|
+ supply order{{ count($patient->readyToShipSupplyOrders) === 1 ? '' : 's' }}
|
|
|
+ for this patient
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
+ <table class="table table-sm table-bordered mb-0 mb-3">
|
|
|
+ @if($patient->shipments && count($patient->shipments))
|
|
|
+ <thead>
|
|
|
+ <tr class="bg-light">
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0">Requested Ship Date</th>
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0">Supply Orders</th>
|
|
|
+ @if(!$shipment)
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0">Courier</th>
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0">Tracking #</th>
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0">Status</th>
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0">Created At</th>
|
|
|
+ @endif
|
|
|
</tr>
|
|
|
- </tbody>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ @foreach($patient->shipments as $iShipment)
|
|
|
+ <tr class="{{@$shipment && @$shipment->uid === $iShipment->uid ? 'bg-aliceblue' : ''}}">
|
|
|
+ <td class="px-2">
|
|
|
+ <a href="{{route('patients.view.shipments', ['patient' => $patient, 'shipment' => $iShipment])}}">
|
|
|
+ {{ friendly_date($iShipment->requested_ship_date) }}
|
|
|
+ </a>
|
|
|
+ </td>
|
|
|
+ <td class="px-2">{{count($iShipment->supplyOrders)}}</td>
|
|
|
+ @if(!$shipment)
|
|
|
+ <td class="px-2">{{ $iShipment->courier }}</td>
|
|
|
+ <td class="px-2">{{ $iShipment->tracking_number }}</td>
|
|
|
+ <td class="px-2">{{ $iShipment->status }}</td>
|
|
|
+ <td class="px-2">{{ friendlier_date_time($iShipment->created_at) }}</td>
|
|
|
+ @endif
|
|
|
+ </tr>
|
|
|
+ @endforeach
|
|
|
+ </tbody>
|
|
|
+ @else
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td class="text-secondary p-3">No shipments have been created for this patient</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ @endif
|
|
|
+ </table>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ @if($shipment)
|
|
|
+ <div class="min-width-500px ml-2 border align-self-stretch p-3">
|
|
|
+ <div class="d-flex align-items-center mb-3">
|
|
|
+ <h3 class="font-size-16 m-0">Shipment (requested for {{friendly_date($shipment->requested_ship_date)}})</h3>
|
|
|
+ <a class="ml-auto" href="{{route('patients.view.shipments', ['patient' => $patient])}}">
|
|
|
+ <i class="fa fa-times-circle on-hover-opaque"></i>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ <hr class="mt-3 mb-4">
|
|
|
+
|
|
|
+ <div class="mb-4 d-flex align-items-baseline">
|
|
|
+ <label class="text-secondary mb-0 min-width-140px mr-2">Requested Ship Date</label>
|
|
|
+ <div moe bottom class="d-block">
|
|
|
+ <a start show>{{$shipment->requested_ship_date}}</a>
|
|
|
+ <form url="/api/supplyOrder/setRequestedShipDate">
|
|
|
+ <input type="hidden" name="uid" value="{{ $shipment->uid }}">
|
|
|
+ <div class="mb-2">
|
|
|
+ <label class="text-secondary mb-1 text-sm">Requested Ship Date *</label>
|
|
|
+ <input type="date" class="form-control form-control-sm" required
|
|
|
+ name="requestedShipDate" value="{{$shipment->requested_ship_date}}">
|
|
|
+ </div>
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
+ <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ @if($patient->readyToShipSupplyOrders && count($patient->readyToShipSupplyOrders))
|
|
|
+ <div class="mb-4">
|
|
|
+ <label class="mb-2 font-weight-bold text-secondary">Ready to Ship Supply Orders</label>
|
|
|
+ <table class="table table-sm table-striped table-bordered mb-0 bg-white">
|
|
|
+ <thead>
|
|
|
+ <tr class="">
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0">Title</th>
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0">Reason</th>
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0"> </th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ @foreach($patient->readyToShipSupplyOrders as $iSupplyOrder)
|
|
|
+ <tr class="">
|
|
|
+ <td class="px-2">{{ $iSupplyOrder->product->title }}</td>
|
|
|
+ <td class="px-2 text-secondary">{{ $iSupplyOrder->reason }}</td>
|
|
|
+ <td class="px-2">
|
|
|
+ <div moe relative>
|
|
|
+ <a start show class="py-0 font-weight-bold">Add</a>
|
|
|
+ <form url="/api/supplyOrder/putInShipment" right>
|
|
|
+ <input type="hidden" name="uid" value="{{ $iSupplyOrder->uid }}">
|
|
|
+ <input type="hidden" name="shipmentUid" value="{{ $shipment->uid }}">
|
|
|
+ <p class="small">Add this supply order?</p>
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
+ <button class="btn btn-sm btn-primary mr-2" submit>Submit</button>
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ @endforeach
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
+
|
|
|
+ <div class="mb-4">
|
|
|
+<!-- <label class="mb-2 font-weight-bold text-secondary">Supply Orders in this Shipment</label>-->
|
|
|
+ <table class="table table-sm table-striped table-bordered mb-0 bg-white">
|
|
|
+ @if($shipment->supplyOrders && count($shipment->supplyOrders))
|
|
|
+ <thead>
|
|
|
+ <tr class="">
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0">Supply Order</th>
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0">IMEI</th>
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0">Lot #</th>
|
|
|
+ <th class="px-2 text-nowrap text-secondary border-bottom-0"> </th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ @foreach($shipment->supplyOrders as $iSupplyOrder)
|
|
|
+ <tr class="">
|
|
|
+ <td class="px-2">{{ $iSupplyOrder->product->title }}</td>
|
|
|
+ <td class="px-2">
|
|
|
+ <div moe relative class="d-block">
|
|
|
+ <a start show>{{ $iSupplyOrder->imei ? $iSupplyOrder->imei : '(not set)' }}</a>
|
|
|
+ <form url="/api/supplyOrder/associateImei" right>
|
|
|
+ <input type="hidden" name="uid" value="{{ $iSupplyOrder->uid }}">
|
|
|
+ <div class="mb-2">
|
|
|
+ <label class="text-secondary mb-1 text-sm">IMEI *</label>
|
|
|
+ <input type="text" class="form-control form-control-sm" required
|
|
|
+ name="imei" value="{{ $iSupplyOrder->imei }}">
|
|
|
+ </div>
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
+ <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <td class="px-2">
|
|
|
+ <div moe relative class="d-block">
|
|
|
+ <a start show>{{ $iSupplyOrder->lot_number ? $iSupplyOrder->lot_number : '(not set)' }}</a>
|
|
|
+ <form url="/api/supplyOrder/updateLotNumber" right>
|
|
|
+ <input type="hidden" name="uid" value="{{ $iSupplyOrder->uid }}">
|
|
|
+ <div class="mb-2">
|
|
|
+ <label class="text-secondary mb-1 text-sm">Lot # *</label>
|
|
|
+ <input type="text" class="form-control form-control-sm" required
|
|
|
+ name="lotNumber" value="{{ $iSupplyOrder->lot_number }}">
|
|
|
+ </div>
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
+ <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <td class="px-2">
|
|
|
+ <div moe relative>
|
|
|
+ <a start show class="py-0 text-danger">Remove</a>
|
|
|
+ <form url="/api/supplyOrder/removeFromShipment" right>
|
|
|
+ <input type="hidden" name="uid" value="{{ $iSupplyOrder->uid }}">
|
|
|
+ <p class="small">Remove this supply order?</p>
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
+ <button class="btn btn-sm btn-primary mr-2" submit>Submit</button>
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ @endforeach
|
|
|
+ </tbody>
|
|
|
+ @else
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td class="text-secondary px-3 py-2">No supply orders in this shipment yet</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ @endif
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="mb-2 d-flex align-items-baseline">
|
|
|
+ <label class="text-secondary text-sm mb-0 width-70px mr-2">Ship Date</label>
|
|
|
+ <div moe bottom relative class="d-block">
|
|
|
+ <a start show>{{$shipment->ship_date ? $shipment->ship_date : '(not set)'}}</a>
|
|
|
+ <form url="/api/shipment/setShipDate">
|
|
|
+ <input type="hidden" name="uid" value="{{ $shipment->uid }}">
|
|
|
+ <div class="mb-2">
|
|
|
+ <label class="text-secondary mb-1 text-sm">Ship Date *</label>
|
|
|
+ <input type="date" class="form-control form-control-sm" required
|
|
|
+ name="shipDate" value="{{$shipment->ship_date}}">
|
|
|
+ </div>
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
+ <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="mb-2 d-flex align-items-baseline">
|
|
|
+ <label class="text-secondary text-sm mb-0 width-70px mr-2">Courier</label>
|
|
|
+ <div moe bottom relative class="d-block">
|
|
|
+ <a start show>{{$shipment->courier ? $shipment->courier : '(not set)'}}</a>
|
|
|
+ <form url="/api/shipment/setCourier">
|
|
|
+ <input type="hidden" name="uid" value="{{ $shipment->uid }}">
|
|
|
+ <div class="mb-2">
|
|
|
+ <label class="text-secondary mb-1 text-sm">Courier</label>
|
|
|
+ <input type="text" class="form-control form-control-sm"
|
|
|
+ name="courier" value="{{$shipment->courier}}">
|
|
|
+ </div>
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
+ <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="mb-2 d-flex align-items-baseline">
|
|
|
+ <label class="text-secondary text-sm mb-0 width-70px mr-2">Tracking #</label>
|
|
|
+ <div moe bottom relative class="d-block">
|
|
|
+ <a start show>{{$shipment->tracking_number ? $shipment->tracking_number : '(not set)'}}</a>
|
|
|
+ <form url="/api/shipment/setTrackingNumber">
|
|
|
+ <input type="hidden" name="uid" value="{{ $shipment->uid }}">
|
|
|
+ <div class="mb-2">
|
|
|
+ <label class="text-secondary mb-1 text-sm">Tracking #</label>
|
|
|
+ <input type="text" class="form-control form-control-sm"
|
|
|
+ name="trackingNumber" value="{{$shipment->tracking_number}}">
|
|
|
+ </div>
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
+ <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="mb-2 d-flex align-items-baseline">
|
|
|
+ <label class="text-secondary text-sm mb-0 width-70px mr-2">Status</label>
|
|
|
+ <div moe bottom relative class="d-block">
|
|
|
+ <a start show>{{$shipment->status ? $shipment->status : '(not set)'}}</a>
|
|
|
+ <form url="/api/shipment/setStatus">
|
|
|
+ <input type="hidden" name="uid" value="{{ $shipment->uid }}">
|
|
|
+ <div class="mb-2">
|
|
|
+ <label class="text-secondary mb-1 text-sm">Status *</label>
|
|
|
+ <select class="form-control form-control-sm"
|
|
|
+ name="status">
|
|
|
+ <option value=""> -- select -- </option>
|
|
|
+ <option value="CREATED">Created</option>
|
|
|
+ <option value="SHIPPED">Shipped</option>
|
|
|
+ <option value="DELIVERED">Delivered</option>
|
|
|
+ <option value="RETURNED_TO_SENDER">Returned to sender</option>
|
|
|
+ <option value="CANCELLED">Cancelled</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="mb-2">
|
|
|
+ <label class="text-secondary mb-1 text-sm">Memo</label>
|
|
|
+ <input type="text" class="form-control form-control-sm"
|
|
|
+ name="statusMemo" value="{{$shipment->status_memo}}">
|
|
|
+ </div>
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
+ <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
@endif
|
|
|
- </table>
|
|
|
+
|
|
|
+ </div>
|
|
|
</div>
|
|
|
@endsection
|