|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
@section('content')
|
|
@section('content')
|
|
|
|
|
|
- <div class="p-3 mcp-theme-1">
|
|
|
|
|
|
+ <div id="practice-supply-orders" class="p-3 mcp-theme-1">
|
|
<div class="card">
|
|
<div class="card">
|
|
|
|
|
|
<div class="card-header px-3 py-2 d-flex align-items-center">
|
|
<div class="card-header px-3 py-2 d-flex align-items-center">
|
|
@@ -10,28 +10,115 @@
|
|
<i class="fas fa-user-injured"></i>
|
|
<i class="fas fa-user-injured"></i>
|
|
Supply Orders
|
|
Supply Orders
|
|
</strong>
|
|
</strong>
|
|
-
|
|
|
|
|
|
+ <a href="/practice-management/supply-orders" class="ml-auto">Clear Filters</a>
|
|
</div>
|
|
</div>
|
|
<div class="card-body p-0">
|
|
<div class="card-body p-0">
|
|
<table class="table table-sm table-condensed p-0 m-0">
|
|
<table class="table table-sm table-condensed p-0 m-0">
|
|
<thead class="bg-light">
|
|
<thead class="bg-light">
|
|
<tr>
|
|
<tr>
|
|
- <th>Client</th>
|
|
|
|
- <th>Product</th>
|
|
|
|
- <th>Reason</th>
|
|
|
|
- <th>Client Understanding Memo</th>
|
|
|
|
- <th>Pro Sign</th>
|
|
|
|
- <th>Client Sign</th>
|
|
|
|
- <th>Shipment</th>
|
|
|
|
- <th>Lot #</th>
|
|
|
|
- <th>IMEI</th>
|
|
|
|
- <th>Created At</th>
|
|
|
|
- <th>Cancelled?</th>
|
|
|
|
|
|
+ <th class="border-0">Client</th>
|
|
|
|
+ <th class="border-0">Product</th>
|
|
|
|
+ <th class="border-0">Reason</th>
|
|
|
|
+ <th class="border-0">Client Understanding Memo</th>
|
|
|
|
+ <th class="border-0">Pro Sign</th>
|
|
|
|
+ <th class="border-0">Client Sign</th>
|
|
|
|
+ <th class="border-0">Shipment</th>
|
|
|
|
+ <th class="border-0">Lot #</th>
|
|
|
|
+ <th class="border-0">IMEI</th>
|
|
|
|
+ <th class="border-0">Created At</th>
|
|
|
|
+ <th class="border-0">Cancelled?</th>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <th class="p-0 border-bottom-0 border-right">
|
|
|
|
+ <select class="form-control form-control-sm bg-aliceblue min-width-unset rounded-0 shadow-none border-0"
|
|
|
|
+ data-filter="client">
|
|
|
|
+ <option value="">All</option>
|
|
|
|
+ @foreach($soClients as $soClient)
|
|
|
|
+ <option value="{{$soClient->id}}"
|
|
|
|
+ {{$filters['client'] == $soClient->id ? 'selected' : ''}}>{{$soClient->displayName()}}</option>
|
|
|
|
+ @endforeach
|
|
|
|
+ </select>
|
|
|
|
+ </th>
|
|
|
|
+ <th class="p-0 border-bottom-0 border-right">
|
|
|
|
+ <select class="form-control form-control-sm bg-aliceblue min-width-unset rounded-0 shadow-none border-0"
|
|
|
|
+ data-filter="product">
|
|
|
|
+ <option value="">All</option>
|
|
|
|
+ @foreach($soProducts as $soProduct)
|
|
|
|
+ <option value="{{$soProduct->id}}"
|
|
|
|
+ {{$filters['product'] == $soProduct->id ? 'selected' : ''}}>{{$soProduct->title}}</option>
|
|
|
|
+ @endforeach
|
|
|
|
+ </select>
|
|
|
|
+ </th>
|
|
|
|
+ <th class="p-0 border-bottom-0 border-right">
|
|
|
|
+ <input type="text" class="form-control form-control-sm bg-aliceblue min-width-unset rounded-0 shadow-none border-0"
|
|
|
|
+ data-filter="reason"
|
|
|
|
+ value="{{$filters['reason']}}" placeholder="Any">
|
|
|
|
+ </th>
|
|
|
|
+ <th class="p-0 border-bottom-0 border-right">
|
|
|
|
+ <input type="text" class="form-control form-control-sm bg-aliceblue min-width-unset rounded-0 shadow-none border-0"
|
|
|
|
+ data-filter="cu_memo"
|
|
|
|
+ value="{{$filters['cu_memo']}}" placeholder="Any">
|
|
|
|
+ </th>
|
|
|
|
+ <th class="p-0 border-bottom-0 border-right">
|
|
|
|
+ <select class="form-control form-control-sm bg-aliceblue min-width-unset rounded-0 shadow-none border-0"
|
|
|
|
+ data-filter="pro_sign">
|
|
|
|
+ <option value="">All</option>
|
|
|
|
+ <option {{$filters['pro_sign'] == 'not_signed' ? 'selected' : ''}} value="not_signed">Not Signed</option>
|
|
|
|
+ <option {{$filters['pro_sign'] == 'signed' ? 'selected' : ''}} value="signed">Signed</option>
|
|
|
|
+ </select>
|
|
|
|
+ </th>
|
|
|
|
+ <th class="p-0 border-bottom-0 border-right">
|
|
|
|
+ <select class="form-control form-control-sm bg-aliceblue min-width-unset rounded-0 shadow-none border-0"
|
|
|
|
+ data-filter="client_sign">
|
|
|
|
+ <option value="">All</option>
|
|
|
|
+ <option {{$filters['client_sign'] == 'not_signed' ? 'selected' : ''}} value="not_signed">Not Signed</option>
|
|
|
|
+ <option {{$filters['client_sign'] == 'signed' ? 'selected' : ''}} value="signed">Signed</option>
|
|
|
|
+ <option {{$filters['client_sign'] == 'waived' ? 'selected' : ''}} value="waived">Waived</option>
|
|
|
|
+ </select>
|
|
|
|
+ </th>
|
|
|
|
+ <th class="p-0 border-bottom-0 border-right">
|
|
|
|
+ <select class="form-control form-control-sm bg-aliceblue min-width-unset rounded-0 shadow-none border-0"
|
|
|
|
+ data-filter="shipment">
|
|
|
|
+ <option value="">All</option>
|
|
|
|
+ <optgroup label="Pro">
|
|
|
|
+ <option {{$filters['shipment'] == 'not_cleared_for_shipment' ? 'selected' : ''}} value="not_cleared_for_shipment">Not Cleared for Shipment</option>
|
|
|
|
+ <option {{$filters['shipment'] == 'cleared_for_shipment' ? 'selected' : ''}} value="cleared_for_shipment">Cleared for Shipment</option>
|
|
|
|
+ </optgroup>
|
|
|
|
+ <optgroup label="Warehouse">
|
|
|
|
+ <option {{$filters['shipment'] == 'CREATED' ? 'selected' : ''}} value="CREATED">Created</option>
|
|
|
|
+ <option {{$filters['shipment'] == 'SHIPPED' ? 'selected' : ''}} value="SHIPPED">Shipped</option>
|
|
|
|
+ <option {{$filters['shipment'] == 'DELIVERED' ? 'selected' : ''}} value="DELIVERED">Delivered</option>
|
|
|
|
+ <option {{$filters['shipment'] == 'RETURNED_TO_SENDER' ? 'selected' : ''}} value="RETURNED_TO_SENDER">Returned to Sender</option>
|
|
|
|
+ <option {{$filters['shipment'] == 'CANCELLED' ? 'selected' : ''}} value="CANCELLED">Cancelled</option>
|
|
|
|
+ </optgroup>
|
|
|
|
+ </select>
|
|
|
|
+ </th>
|
|
|
|
+ <th class="p-0 border-bottom-0 border-right">
|
|
|
|
+ <input type="text" class="form-control form-control-sm bg-aliceblue min-width-unset rounded-0 shadow-none border-0"
|
|
|
|
+ data-filter="lot_number"
|
|
|
|
+ value="{{$filters['lot_number']}}" placeholder="Any">
|
|
|
|
+ </th>
|
|
|
|
+ <th class="p-0 border-bottom-0 border-right">
|
|
|
|
+ <input type="text" class="form-control form-control-sm bg-aliceblue min-width-unset rounded-0 shadow-none border-0"
|
|
|
|
+ data-filter="imei"
|
|
|
|
+ value="{{$filters['imei']}}" placeholder="Any">
|
|
|
|
+ </th>
|
|
|
|
+ <th class="p-0 border-bottom-0 border-right">
|
|
|
|
+
|
|
|
|
+ </th>
|
|
|
|
+ <th class="p-0 border-bottom-0 border-right">
|
|
|
|
+ <select class="form-control form-control-sm bg-aliceblue min-width-unset rounded-0 shadow-none border-0"
|
|
|
|
+ data-filter="cancelled">
|
|
|
|
+ <option value="">All</option>
|
|
|
|
+ <option {{$filters['cancelled'] == 'not_cancelled' ? 'selected' : ''}} value="not_cancelled">Not Cancelled</option>
|
|
|
|
+ <option {{$filters['cancelled'] == 'cancelled' ? 'selected' : ''}} value="cancelled">Cancelled</option>
|
|
|
|
+ </select>
|
|
|
|
+ </th>
|
|
</tr>
|
|
</tr>
|
|
</thead>
|
|
</thead>
|
|
<tbody>
|
|
<tbody>
|
|
@foreach ($supplyOrders as $supplyOrder)
|
|
@foreach ($supplyOrders as $supplyOrder)
|
|
- <tr>
|
|
|
|
|
|
+ <tr class="{{$supplyOrder->is_cancelled ? 'bg-light' : ''}}">
|
|
<td>{{$supplyOrder->client->displayName()}}</a></td>
|
|
<td>{{$supplyOrder->client->displayName()}}</a></td>
|
|
<td>{{$supplyOrder->product->title}}</td>
|
|
<td>{{$supplyOrder->product->title}}</td>
|
|
<td>{{$supplyOrder->reason}}</td>
|
|
<td>{{$supplyOrder->reason}}</td>
|
|
@@ -93,7 +180,7 @@
|
|
By {{$supplyOrder->createdSession->pro->displayName()}}
|
|
By {{$supplyOrder->createdSession->pro->displayName()}}
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</td>
|
|
- <td>{{$supplyOrder->is_cancelled ? 'Yes' : 'No'}}</td>
|
|
|
|
|
|
+ <td>{!! $supplyOrder->is_cancelled ? '<b class="text-warning-mellow">Yes</b>' : 'No' !!}</td>
|
|
</tr>
|
|
</tr>
|
|
@endforeach
|
|
@endforeach
|
|
</tbody>
|
|
</tbody>
|
|
@@ -105,4 +192,42 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
+ <script>
|
|
|
|
+ (function() {
|
|
|
|
+
|
|
|
|
+ function applyFilters() {
|
|
|
|
+ let params = {}, queryLine = [];
|
|
|
|
+ $('[data-filter]').each(function() {
|
|
|
|
+ if($.trim($(this).val())) {
|
|
|
|
+ params[$(this).attr('data-filter')] = $.trim($(this).val());
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ for(let x in params) {
|
|
|
|
+ if(params.hasOwnProperty(x)) {
|
|
|
|
+ queryLine.push(x + '=' + encodeURIComponent(params[x]));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ queryLine = queryLine.join('&');
|
|
|
|
+
|
|
|
|
+ fastLoad('/practice-management/supply-orders?' + queryLine);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function init() {
|
|
|
|
+ $('select[data-filter]')
|
|
|
|
+ .off('change')
|
|
|
|
+ .on('change', applyFilters);
|
|
|
|
+ $('input[data-filter]')
|
|
|
|
+ .off('keyup')
|
|
|
|
+ .on('keyup', function(_event) {
|
|
|
|
+ if(_event.which === 13) {
|
|
|
|
+ applyFilters();
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ addMCInitializer('practice-supply-orders', init, '#practice-supply-orders')
|
|
|
|
+
|
|
|
|
+ }).call(window);
|
|
|
|
+ </script>
|
|
@endsection
|
|
@endsection
|