@extends('layouts.app') @section('title', $toolboxTalk->title) @section('content')
Back to Talks

{{ $toolboxTalk->title }}

@if($toolboxTalk->status === 'scheduled')
@csrf
@endif @if($toolboxTalk->status === 'overdue') @endif @if($toolboxTalk->status === 'in_progress') @endif @if($toolboxTalk->status !== 'completed') @can('toolbox_talks.edit') Edit @endcan @endif
@switch($toolboxTalk->status) @case('scheduled')

Scheduled Talk

This talk is scheduled for {{ $toolboxTalk->scheduled_date->format('F j, Y') }} at {{ $toolboxTalk->start_time?->format('g:i A') }}

@break @case('in_progress')

Talk In Progress

This talk is currently in progress. Attendance can be recorded.

@break @case('completed')

Completed Talk

This talk was completed on {{ $toolboxTalk->end_time?->format('F j, Y \a\t g:i A') }}

@break @case('overdue')

Overdue Talk

This talk was scheduled for {{ $toolboxTalk->scheduled_date->format('F j, Y \a\t g:i A') }} but was not started or has no attendance. Please reschedule.

@break @endswitch

Talk Details

Reference Number

{{ $toolboxTalk->reference_number }}

Talk Type

@switch($toolboxTalk->talk_type) @case('safety') Safety @break @case('health') Health @break @case('environment') Environment @break @default {{ ucfirst($toolboxTalk->talk_type) }} @endswitch

Date & Time

{{ $toolboxTalk->scheduled_date->format('F j, Y') }}

{{ $toolboxTalk->start_time?->format('g:i A') }} - {{ $toolboxTalk->duration_minutes }} minutes

Location

{{ $toolboxTalk->location }}

Department

{{ $toolboxTalk->department?->name ?? 'All Departments' }}

Supervisor

{{ $toolboxTalk->supervisor?->name ?? 'Not assigned' }}
@if($toolboxTalk->description)

Description

{{ $toolboxTalk->description }}

@endif @if($toolboxTalk->topic)

Topic

{{ $toolboxTalk->topic->title }}

{{ $toolboxTalk->topic->category }} - {{ $toolboxTalk->topic->difficulty_level }}

@endif

Attendance

@if($toolboxTalk->biometric_required && ($toolboxTalk->status === 'in_progress' || $toolboxTalk->status === 'completed'))
@csrf
@endif @if($toolboxTalk->status === 'in_progress') @endif
@if($toolboxTalk->status === 'completed')

{{ $attendanceStats['present'] }}

Present

{{ $attendanceStats['late'] }}

Late

{{ $attendanceStats['absent'] }}

Absent

{{ round($toolboxTalk->attendance_rate) }}%

Rate

@endif
@forelse($toolboxTalk->attendances as $attendance) @empty @endforelse
Employee Status Method Time Signature

{{ $attendance->employee_name }}

{{ $attendance->department }}

{!! $attendance->getAttendanceStatusBadge() !!} {!! $attendance->getCheckInMethodBadge() !!} {{ $attendance->check_in_time?->format('g:i A') }} @if($attendance->hasSignature()) @else @endif
No attendance recorded yet

Feedback

@if($toolboxTalk->status === 'completed') View All Submit @endif
@if($toolboxTalk->status === 'completed')
{{ $feedbackStats['total'] }} responses • {{ number_format($feedbackStats['average_rating'], 1) }} avg rating
@endif @if($toolboxTalk->status === 'completed')

{{ $feedbackStats['positive'] }}

Positive

{{ $feedbackStats['neutral'] }}

Neutral

{{ $feedbackStats['negative'] }}

Negative

@endif
@forelse($toolboxTalk->feedback as $feedback)

{{ $feedback->employee_name }}

{{ $feedback->created_at->format('M d, Y g:i A') }}

{!! $feedback->getSentimentBadge() !!} @if($feedback->overall_rating) {{ $feedback->getOverallRatingStars() }} @endif
@if($feedback->specific_comments)

{{ $feedback->specific_comments }}

@endif @if($feedback->improvement_suggestion)
Suggestion: {{ $feedback->improvement_suggestion }}
@endif
@empty
No feedback received yet
@endforelse

Quick Actions

@if($toolboxTalk->status === 'in_progress') @endif @if($toolboxTalk->status === 'completed') @endif

Settings

Biometric Required @if($toolboxTalk->biometric_required) @else @endif
Recurring @if($toolboxTalk->is_recurring)
{{ ucfirst($toolboxTalk->recurrence_pattern) }} @if($toolboxTalk->next_occurrence) (Next: {{ $toolboxTalk->next_occurrence->format('M d, Y') }}) @endif @if($toolboxTalk->status === 'completed' && $toolboxTalk->next_occurrence && $toolboxTalk->next_occurrence->isFuture())
@csrf
@endif
@else No @endif
Duration {{ $toolboxTalk->duration_minutes }} min
@if($toolboxTalk->materials)

Materials

@foreach($toolboxTalk->materials as $material)
{{ $material['name'] ?? 'Material' }}
@endforeach
@endif @if($toolboxTalk->photos)

Photos

@foreach($toolboxTalk->photos as $photo) Talk Photo @endforeach
@endif
@endsection @push('scripts') @endpush