@extends('layouts.location_app') @section('title', 'Location Dashboard') @section('content')

Dashboard

{{--
Near Misses
{{App\Models\NearMiss::where('location_id',$location->id)->where('status','=','active')->count()}}
--}} {{--
patient safety alerts require actioning
{{App\Models\LocationReceivedAlert::where('location_id',$location->id)->where('status','=',App\Models\LocationReceivedAlert::$unactionedStatus)->count()}}
--}} {{--
Root Cause Analysis
5x
--}} {{-- Notification Table --}} @if (count($reminders) != 0)

Form Reminders

@foreach ($reminders as $reminder) @php $form = $location->group_forms()->where('id', $reminder->form_id)->first(); $reminderTime = \Carbon\Carbon::parse($reminder['time']); $now = now(); $timeDifference = $now->diffInMinutes($reminderTime, false); // Determine status if ($timeDifference < 0) { $status = 'Overdue (' . $reminderTime->diffForHumans($now) . ')'; } elseif ($timeDifference <= 60) { $status = 'Within ' . $reminderTime->diffForHumans($now) ; } elseif ($reminderTime->isToday()) { $status = 'Today (' . $reminderTime->diffForHumans($now) . ')'; } else { $status = 'Upcoming (' . $reminderTime->diffForHumans($now) . ')'; } @endphp @if ($form && isset($form->name)) @endif @endforeach
Form Status Date Time
{{ $form->name }} {{ $status }} {{ \Carbon\Carbon::parse($reminder['created_at'])->format('d F, Y h:i a') }} {{ $reminderTime->format('H:i') }}
@endif
@php use App\Helpers\Helper; $LocationServiceMessage = Helper::ServiceMessage('Location', 'location'); $LocationServiceMessageLength = count($LocationServiceMessage); @endphp @if ($LocationServiceMessageLength) @foreach ($LocationServiceMessage as $key => $service_message) @endforeach @endif {{--
@if ($location->opening_hours->set() == false) @include('location.opening_hours') @else @endif
--}}
@endsection @section('scripts') @endsection