@extends('layouts.app') @section('mobile-title', $report->reference_number) @section('mobile-subtitle', $report->project->name) @section('mobile-back', route('reports.index')) @if ($report->status === \App\Models\Report::STATUS_DRAFT || $report->status === \App\Models\Report::STATUS_REJECTED) @can('update', $report) @section('mobile-action-url', route('reports.edit', $report)) @section('mobile-action-icon', 'edit') @section('mobile-action-label', 'Edit report') @endcan @endif @section('content') @php $canReview = (auth()->user()->isSupervisor() || auth()->user()->isAdmin()) && $report->status === \App\Models\Report::STATUS_SUBMITTED; $resourceTotal = max(0, (int) $report->manpower_count); @endphp
Reports / {{ $report->reference_number }}

{{ $report->title }}

@include('partials.status-badge', ['status' => $report->status])

{{ $report->project->name }} · {{ $report->work_date->format('M j, Y') }} · {{ $report->technician->name }}

Print @if ($report->status === \App\Models\Report::STATUS_APPROVED) Download PDF @endif @if (auth()->user()->isAdmin() && ! $report->archived_at)
@csrf
@endif @can('delete', $report)
@csrf @method('DELETE')
@endcan @if ($report->canBeEditedBy(auth()->user())) Edit
@csrf
@endif
Author
{{ collect(explode(' ', $report->technician->name))->map(fn ($part) => substr($part, 0, 1))->take(2)->join('') }}{{ $report->technician->name }}
Project
{{ $report->project->name }}
Reporting date
{{ $report->work_date->format('M j, Y') }}
Created at
{{ $report->created_at->format('M j, Y g:i A') }}

Site Observations

{{ $report->work_completed ?: 'Not recorded' }}

@if ($report->issues)

{{ $report->issues }}

@endif @if ($report->safety_notes)

{{ $report->safety_notes }}

@endif

Construction checklist

Safety Checklist Results

@foreach ($report->checklistFlags() as $label => $checked)
{{ $label }}
{{ $checked ? 'check_circle' : 'flag' }}{{ $checked ? 'Pass' : 'Fail' }}
@endforeach
@if (count($report->customChecklistFlags()) > 0)

Custom checklist

@foreach ($report->customChecklistFlags() as $label => $checked)
{{ $label }}
{{ $checked ? 'Yes' : 'No' }}
@endforeach
@endif

Resource Tracking

Daily Labor Logs
Trade / RoleHeadcountTotal hours
Site Team{{ $resourceTotal }}{{ $resourceTotal * 8 }}
Total Daily Resource{{ $resourceTotal }}{{ $resourceTotal * 8 }}
@foreach ([ 'Incident details' => $report->incident_details, 'Delay details' => $report->delay_details, 'Materials used or delivered' => $report->materials_used, 'Quality notes' => $report->quality_notes, 'Client instructions' => $report->client_instructions, 'Snag items' => $report->snag_items, 'Next steps' => $report->next_steps, ] as $label => $value) @if ($value)

{{ $label }}

{{ $value }}

@endif @endforeach

Uploads

Photos
@forelse ($report->photos as $photo)
{{ $photo->original_name }}
{{ $photo->original_name }}
@if ($photo->caption)
{{ $photo->caption }}
@endif @if ($photo->taken_at || $photo->latitude || $photo->longitude)
@if ($photo->taken_at) Taken {{ $photo->taken_at->format('M j, Y g:i A') }} @endif @if ($photo->latitude && $photo->longitude) · {{ $photo->latitude }}, {{ $photo->longitude }} @endif
@endif @if ($report->canBeEditedBy(auth()->user()))
@csrf @method('PATCH')
@csrf @method('DELETE')
@endif
@empty
No photos uploaded.
@endforelse
Documents
@forelse ($report->files as $file)
{{ $file->original_name }} @if ($report->canBeEditedBy(auth()->user()))
@csrf @method('DELETE')
@endif
@empty
No documents uploaded.
@endforelse
@endsection