@extends('layouts.app') @section('title', $inspection->title) @section('content')

{{ $inspection->title }}

{{ $inspection->site->name }}

{{ ucfirst(str_replace('_', ' ', $inspection->status)) }}
@if($inspection->description)

Description

{{ $inspection->description }}

@endif @php $adminPhotos = $inspection->photos->filter(fn($p) => $p->user->role === 'admin'); $adminNotes = $inspection->notes->filter(fn($n) => $n->user->role === 'admin'); @endphp @if($adminPhotos->count() > 0 || $adminNotes->count() > 0)

Admin Instructions

@if($adminPhotos->count() > 0)

Reference Photos:

@foreach($adminPhotos as $photo) {{ $photo->caption }} @endforeach
@endif @if($adminNotes->count() > 0)
@foreach($adminNotes as $note)

{{ $note->note }}

{{ $note->user->name }}

@endforeach
@endif
@endif

Upload Photo

@csrf
Preview

Add Note

@csrf
@php $cleanerPhotos = $inspection->photos->filter(fn($p) => $p->user->role === 'cleaner'); @endphp @if($cleanerPhotos->count() > 0)

Your Photos ({{ $cleanerPhotos->count() }})

@foreach($cleanerPhotos as $photo) {{ $photo->caption }} @endforeach
@endif @php $cleanerNotes = $inspection->notes->filter(fn($n) => $n->user->role === 'cleaner'); @endphp @if($cleanerNotes->count() > 0)

Your Notes ({{ $cleanerNotes->count() }})

@foreach($cleanerNotes as $note)

{{ $note->note }}

{{ $note->created_at->format('M d, Y H:i') }}

@endforeach
@endif @if($inspection->status !== 'done')
@csrf
@endif
@include('app.partials.bottom-nav') @endsection