@extends('website.layouts.default') @push('css') @endpush @section('content')

Next Vaccination

Next Vaccination List

@forelse ($calves as $calf) @php $calf_birth_date = \Carbon\Carbon::createFromFormat('Y-m-d', $calf->date_of_birth); $calf_age_in_month = $today->diffInMonths($calf_birth_date); @endphp @foreach ($vaccines as $vaccine) @if (firstDoseDone($calf->id, $vaccine->id)) {{-- NEXT DOSE HERE --}} @if (getNextDose($calf->id, $vaccine->id)) @endif @else {{-- FIRST DOSE HERE --}} @if ($calf_age_in_month >= $vaccine->age_of_first_dose) @endif @endif @endforeach @empty

No vaccines found

@endforelse @include('website.includes.delete_modal')
Calf Calf age in month Vaccine Vaccine at first age Dose Count Dose Type Date
{{ $calf->name }} {{ $calf->id }} {{ $calf_age_in_month }} {{ $vaccine->vaccine_name }} {{ $vaccine->age_of_first_dose }} {{ getNextDose($calf->id, $vaccine->id)->vaccine_count }} {{ str_ordinal(getNextDose($calf->id, $vaccine->id)->vaccine_count + 1) }} {{ Carbon\Carbon::parse(getNextDose($calf->id, $vaccine->id)->next_date)->format('d M y') }} {{ $calf->name }} {{ $calf->id }} {{ $calf_age_in_month }} {{ $vaccine->vaccine_name }} {{ $vaccine->age_of_first_dose }} First Dose First Dose
{{-- {{ $vaccines->onEachSide(5)->links() }} --}}
@endsection @push('scripts') @endpush