|
@@ -53,6 +53,7 @@
|
|
<th class="px-2 text-secondary">Created</th>
|
|
<th class="px-2 text-secondary">Created</th>
|
|
<th class="px-2 text-secondary w-25">Category</th>
|
|
<th class="px-2 text-secondary w-25">Category</th>
|
|
<th class="px-2 text-secondary w-50">IMEI</th>
|
|
<th class="px-2 text-secondary w-50">IMEI</th>
|
|
|
|
+ <th class="px-2 text-secondary"></th>
|
|
</tr>
|
|
</tr>
|
|
</thead>
|
|
</thead>
|
|
<tbody>
|
|
<tbody>
|
|
@@ -61,17 +62,72 @@
|
|
<td class="px-2">{{ friendly_date_time($device->device->created_at) }}</td>
|
|
<td class="px-2">{{ friendly_date_time($device->device->created_at) }}</td>
|
|
<td class="px-2">{{ $device->device->category }}</td>
|
|
<td class="px-2">{{ $device->device->category }}</td>
|
|
<td class="px-2"><pre class="m-0">{{ $device->device->imei }}</pre></td>
|
|
<td class="px-2"><pre class="m-0">{{ $device->device->imei }}</pre></td>
|
|
|
|
+ <td>
|
|
|
|
+ <div moe relative>
|
|
|
|
+ <a start show class="on-hover-opaque">Deactivate</a>
|
|
|
|
+ <form url="/api/clientBdtDevice/deactivate" right>
|
|
|
|
+ <input type="hidden" name="uid" value="{{ $device->uid }}">
|
|
|
|
+ <p class="small">Are you sure you want to deactivate this device?</p>
|
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
|
+ <button class="btn btn-sm btn-danger mr-2" submit>Deactivate</button>
|
|
|
|
+ <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
</tr>
|
|
</tr>
|
|
@endforeach
|
|
@endforeach
|
|
</tbody>
|
|
</tbody>
|
|
@else
|
|
@else
|
|
<tbody>
|
|
<tbody>
|
|
<tr>
|
|
<tr>
|
|
- <td class="text-secondary p-3">No devices for this patient</td>
|
|
|
|
|
|
+ <td class="text-secondary p-3">No active devices for this patient</td>
|
|
</tr>
|
|
</tr>
|
|
</tbody>
|
|
</tbody>
|
|
@endif
|
|
@endif
|
|
</table>
|
|
</table>
|
|
|
|
+ <hr>
|
|
|
|
+ <h2>Deactivated Devices</h2>
|
|
|
|
+ <table class="table table-striped table-sm table-bordered mb-0">
|
|
|
|
+ @if($patient->deactivatedDevices && count($patient->deactivatedDevices))
|
|
|
|
+ <thead>
|
|
|
|
+ <tr>
|
|
|
|
+ <th class="px-2 text-secondary">Created</th>
|
|
|
|
+ <th class="px-2 text-secondary w-25">Category</th>
|
|
|
|
+ <th class="px-2 text-secondary w-50">IMEI</th>
|
|
|
|
+ <th class="px-2 text-secondary"></th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
|
|
+ @foreach($patient->deactivatedDevices as $deactivatedDevice)
|
|
|
|
+ <tr>
|
|
|
|
+ <td class="px-2">{{ friendly_date_time($deactivatedDevice->device->created_at) }}</td>
|
|
|
|
+ <td class="px-2">{{ $deactivatedDevice->device->category }}</td>
|
|
|
|
+ <td class="px-2"><pre class="m-0">{{ $deactivatedDevice->device->imei }}</pre></td>
|
|
|
|
+ <td>
|
|
|
|
+ <div moe relative>
|
|
|
|
+ <a start show class="on-hover-opaque">Reactivate</a>
|
|
|
|
+ <form url="/api/clientBdtDevice/reactivate" right>
|
|
|
|
+ <input type="hidden" name="uid" value="{{ $deactivatedDevice->uid }}">
|
|
|
|
+ <p class="small">Are you sure you want to reactivate this device?</p>
|
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
|
+ <button class="btn btn-sm btn-danger mr-2" submit>Reactivate</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 p-3">No deactivated devices for this patient</td>
|
|
|
|
+ </tr>
|
|
|
|
+ </tbody>
|
|
|
|
+ @endif
|
|
|
|
+ </table>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
<script>
|
|
(function() {
|
|
(function() {
|