@extends('layouts.app', ['title' => 'View animal', 'showNav' => true]) @section('content')

{{ $animal->tag_no }}

Edit Back
Details
Tag no
{{ $animal->tag_no }}
Category
{{ \App\Support\AnimalCategory::label($animal->category) }}
Gender
{{ ucfirst($animal->gender) }}
Purchase date
{{ $animal->purchase_date->format('d M Y') }}
Purchase from
{{ $animal->purchase_from }}
Purchase price
{{ number_format($animal->purchase_price, 2) }}
Born in farm
{!! $animal->born_in_farm ? 'Yes' : 'No' !!}
Born date
{{ $animal->born_date?->format('d M Y') ?? '—' }}
Mother
@if($animal->mother) {{ $animal->mother->tag_no }} @else — @endif
Active
{!! $animal->is_active ? 'Yes' : 'No' !!}
@if($animal->isDisposed())
Disposed
{{ $animal->disposed_at->format('d M Y') }} — {{ \App\Support\DisposalType::labels()[$animal->disposal_type] ?? $animal->disposal_type }} @if($animal->disposal_type === 'sold' && $animal->disposal_price) ({{ number_format($animal->disposal_price, 2) }}) @endif
@endif
@if($animal->isDisposed())
This animal has been disposed.
@else
Dispose
@csrf
@foreach($disposalTypes as $value => $label)
@endforeach
@endif
Medication history
@forelse($animal->medicationHistories->sortByDesc(fn ($h) => $h->medication->medication_date) as $history) @empty @endforelse
Date Type Description Cost
{{ $history->medication->medication_date->format('d M Y') }} {{ \App\Support\MedicationType::labels()[$history->medication->type] }} {{ $history->medication->description }} {{ number_format($history->cost, 2) }} View
No medication records.
@if($animal->gender === 'female')
Children
@forelse($animal->children as $child) @empty @endforelse
Tag no Gender Born date Active Actions
{{ $child->tag_no }} {{ ucfirst($child->gender) }} {{ $child->born_date?->format('d M Y') ?? '—' }} {!! $child->is_active ? 'Yes' : 'No' !!} View
No children recorded.
@endif @endsection @push('scripts') @endpush