@extends('layouts.head_office_app') @section('title', 'Patient Safety Alerts') @section('content')
Alerts
{{-- --}} {{--
--}}

@include('layouts.error')
@if(!count($alerts)) @else @foreach($alerts as $alert) @endforeach @endif
Date of Alert Type Origin Name Class Send To Actions
No Patient Safety Alerts Found.
{{ date('d/m/Y',strtotime($alert->national_alert->start_time))}}
{{ date('h:i a',strtotime($alert->national_alert->start_time))}} @if(time() < strtotime($alert->national_alert->start_time))
Scheduled
@endif
@if($alert->national_alert->type != 'None') Type: @if($alert->national_alert->type == 'Custom') {{$alert->national_alert->custom_type }} @else {{ $alert->national_alert->type }} @if($alert->national_alert->type == 'Company-Led Medicines Recall/Notification' || $alert->national_alert->type == 'Medicines Recall' ) @if($alert->national_alert->patient_level_recall)
Patient Level Recall @endif @endif @endif

@endif Originator(s): @foreach($alert->national_alert->originators as $o) @if($o->originator == 'Custom') {{$alert->national_alert->custom_originator}} @if(!$loop->last), @endif @else {{$o->originator}}@if(!$loop->last), @endif @endif @endforeach
@if($alert->national_alert->created_by == 'CAS') Central Alerting System @else Head Office @endif {{$alert->national_alert->title}} @if($alert->national_alert->class !== 'None') {{$alert->national_alert->class}} {{$alert->national_alert->showClassTitle($alert->national_alert->class)}} @else Class None @endif

Action Within: {{$alert->national_alert->showActionWithinTitle()}}
Countries: @if($alert->national_alert->send_to_all_countries) All @endif {{$alert->national_alert->countries->implode('country', ', ')}}

Positions: @if($alert->national_alert->send_to_all_designations) All @else @foreach($alert->national_alert->designations as $d) {{$d->position->name}}@if(!$loop->last), @endif @endforeach @endif @if($alert->national_alert->created_by != 'CAS')

Branch/Pharmacies: @if($alert->national_alert->send_to_all_locations) All @else @foreach($alert->national_alert->locations as $d) {{$d->location->short_name()}}@if(!$loop->last), @endif @endforeach @endif @endif @if($alert->national_alert->created_by != 'CAS')

Tier/Groups: @if($alert->national_alert->send_to_groups == 'all') All @else @foreach($alert->national_alert->groups as $d) {{$d->group->group}}@if(!$loop->last), @endif @endforeach @endif @endif @if($alert->national_alert->created_by == 'CAS')

Tier/Groups: All
@endif
{!! $alerts->render('pagination::bootstrap-5') !!}



No alerts found
@endsection @section('styles') @endsection @section('scripts') @endsection