@foreach($entry->calls as $call) @php $trClass = ""; if ($call->aiPrescriptions()->exists()) { if (!$call->hasNotReadyAiPrescriptions() ) { $trClass = "bg-light-green"; } // All Prescription Complete if (!$call->hasIncompleteAiPrescriptions() ) { $trClass = "bg-light-blue"; } if ($call->hasNotReadyAiPrescriptions() && $call->hasIncompleteAiPrescriptions() ) { $trClass = "bg-light-red"; } } @endphp @php $url = backpack_url('call/' . $call->id . '/show'); @endphp @endforeach
Call ID Status Summary Call Create Call End Action
{{ $call->call_id }} {{ $call->status }} {{ \Illuminate\Support\Str::limit($call->ai_summary, 20) }} {{ \Carbon\Carbon::parse($call->call_created_at)->format('Y-m-d H:i:s'); }} {{ \Carbon\Carbon::parse($call->call_ended_at)->format('Y-m-d H:i:s'); }} @foreach( $call->aiPrescriptions as $prescription) @php $class = ""; if ( $prescription->has_update) { $class = "collect"; } if ( $prescription->has_collect ) { $class = "completed"; } $showUrl = backpack_url('ai-prescription/' . $prescription->id . '/edit'); $messageUrl = route('message', [ 'call_id' => $call->id, 'prescription_id' => $prescription->id, ]); $updateUrl = route('updateAiPrescriptionAiEndpoint', ['prescription_id' => $prescription->id]); $completeUrl = route('collectAiPrescriptionAiEndpoint', ['prescription_id' => $prescription->id]); $pivot = $prescription->calls()->wherePivot('call_id', $call->id)->first(); $textBackNumber = $pivot->pivot->text_back_number; @endphp
{{ $prescription->rx_id}}
@if (!empty($textBackNumber)) @endif
@endforeach
@section('after_styles') {{-- DATA TABLES --}} @basset('https://cdn.datatables.net/1.13.1/css/dataTables.bootstrap5.min.css') @endsection @section('after_scripts') @basset('https://cdn.datatables.net/1.13.1/js/jquery.dataTables.min.js') @basset('https://cdn.datatables.net/1.13.1/js/dataTables.bootstrap5.min.js') @basset('https://cdn.datatables.net/responsive/2.4.0/js/dataTables.responsive.min.js') @basset('https://cdn.datatables.net/responsive/2.4.0/css/responsive.dataTables.min.css') @basset('https://cdn.datatables.net/fixedheader/3.3.1/js/dataTables.fixedHeader.min.js') @basset('https://cdn.datatables.net/fixedheader/3.3.1/css/fixedHeader.dataTables.min.css') @endsection