@extends('layouts.vertical') @section('css') @endsection @php $currentTab = 1; if(app('request')->input('t')){ $currentTab = app('request')->input('t'); } $DailyReportType = config('constant.DailyReportType'); $MealType = config('constant.MealType'); $MealAmount = config('constant.MealAmount'); $MedicationList = config('constant.MedicationList'); @endphp @section('breadcrumb')

Daily records

@if((isset($records) && !empty($records)) && ( ( isset($records[0]->draftCount) && count($records) > 1 ) || count($records) > 0) )
{{-- --}}
@endif
@endsection @section('content') @if((isset($records) && !empty($records)) && count($records) > 0 && isset($records[0]->draftCount)) {{--
--}} @endif

Filter daily records

@if(isset($filter['room']) || isset($filter['child']) || isset($filter['dates'])) Clear @endif
@foreach($DailyReportType as $key => $type)
@endforeach
@if((isset($records) && !empty($records)) && ( ( isset($records[0]->draftCount) && count($records) > 1 ) || ( !isset($records[0]->draftCount) && count($records) > 0) ) ) @foreach ($records as $key => $record) @if(isset($records[0]->draftCount) && $key ==0) @php continue; @endphp @endif @php $recordType = isset($record->type) && isset($DailyReportType[$record->type]) ? $DailyReportType[$record->type] : null; @endphp
{{$record->child->name}}’s {{$recordType['name']}} on {{\Carbon\Carbon::parse($record->date)->format('d/m/Y')}}
{{date('d/m/Y, h:i A', strtotime($record->_createdAt))}} Posted by @if(isset($record->publisher)) {{$record->publisher->firstName}} {{$record->publisher->lastName}} @else School @endif
@if(isset($record->type) && $record->type == "2") @if(isset($record->meals) && !empty($record->meals))

At {{date('h:i A', strtotime($record->date))}}, I ate {{ $MealAmount[$record->mealAmount??""] ?? ""}} {{ $MealType[$record->mealType??""] ?? ""}}; {{implode(', ', collect($record->meals)->pluck('name')->toArray())}}

@endif @elseif(isset($record->type) && $record->type == "6") @if(isset($record->name) && !empty($record->name))

I took {{isset($record->amount) && !empty($record->amount) ? $record->amount . ' ' . ($MedicationList[$record->unit?? ""] ?? "") . ($record->amount > 1 ? 's':'') . ' of' : '' }} {{$record->name}} at {{date('h:i A', strtotime($record->date))}}.

@endif
@if(isset($record->expiry) && !empty($record->expiry))
• Medicine expiry: {{\Carbon\Carbon::parse($record->expiry)->format('d/m/Y')}}
@endif @if(isset($record->signatures) && !empty($record->signatures))
• Signed by: {{implode(', ', collect($record->signatures)->pluck('signer')->toArray())}}
@endif
@if(isset($record->comment) && !empty($record->comment))

{{$record->comment}}

@endif @endif
@if(isset($record->media))
@foreach($record->media as $media) @endforeach
@endif @if(isset($record->isPublic) && $record->isPublic == false)
This has not been shared with parents.
@endif @if(isset($record->type) && $record->type == "6") @if(isset($record->parentSignatures) && !empty($record->parentSignatures))

Parental Consent:

@foreach ($record->parentSignatures as $signature)
@if(isset($signature->image)) signature @endif
{{isset($signature->signer) ? $signature->signer : ""}}
@endforeach
@endif @endif
@endforeach
@if($previousurl!="") Previous @endif @if($nexturl!="") Next @endif
@else
@if($page == 1)

There are no records found.

@else

There are no more records found.

@endif
@endif
@endsection @section('script-bottom') @endsection