@extends('layouts.user') @section('title', 'Job Mission Notes') @section('content')

Job Mission Notes

View and export notes submitted by employees during their missions.

@if(request()->anyFilled(['employee_name', 'duty_number', 'site_name'])) Reset @endif
@php $lastDuty = null; @endphp @forelse($notes as $note) @php $currentDuty = $note->job_type . '_' . $note->job_id; $job = $note->job_details; $siteRoute = 'N/A'; $dutyNumber = 'N/A'; $link = '#'; if ($note->job_type === 'guard') { $siteRoute = $job && $job->site ? $job->site->name : 'N/A'; $dutyNumber = $job ? $job->duty_number : 'N/A'; $link = $job ? route('schedules.show', $job->id) : '#'; } else { $siteRoute = $job && $job->route ? $job->route->name : 'N/A'; $dutyNumber = $job ? $job->duty_number : 'N/A'; $link = $job ? route('patroller-schedules.show', $job->id) : '#'; } @endphp @if($lastDuty !== $currentDuty) @php $lastDuty = $currentDuty; @endphp @endif @empty @endforelse
Submitted Date Employee Mission Note
{{ $note->job_type }}
Duty Location {{ $siteRoute }}
Duty Number #{{ $dutyNumber }}
Grouped by Duty ID
{{ $note->created_at->format('M d, Y') }}
{{ $note->created_at->format('H:i A') }}
{{ str_replace('Employee ', '', strtoupper(substr($note->employee->first_name ?? 'E', 0, 1))) }}
{{ $note->employee->first_name }} {{ $note->employee->last_name }}
{{ $note->employee->employee_id }}

"{{ $note->note }}"

@if($note->image) @endif
No job mission notes found matching your criteria.
@if($notes->hasPages())
{{ $notes->links() }}
@endif
@endsection