@extends('layouts.app') @section('title', 'Work Permit Details') @section('content')
Back

{{ $workPermit->work_title }}

{{ $workPermit->reference_number }}

Copy @if(in_array($workPermit->status, ['draft', 'rejected'])) Edit @endif @if($workPermit->status == 'draft')
@csrf
@endif @if($workPermit->canBeApproved()) @endif @if($workPermit->status == 'approved')
@csrf
@endif @if($workPermit->canBeClosed()) @endif

Permit Information

Permit Type
{{ $workPermit->workPermitType->name ?? 'N/A' }}
Status
{{ ucfirst(str_replace('_', ' ', $workPermit->status)) }}
Requested By
{{ $workPermit->requestedBy->name ?? 'N/A' }}
Department
{{ $workPermit->department->name ?? 'N/A' }}
Work Description
{{ $workPermit->work_description }}
Work Location
{{ $workPermit->work_location }}

Work Schedule

Start Date & Time
{{ $workPermit->work_start_date->format('M d, Y H:i') }}
End Date & Time
{{ $workPermit->work_end_date->format('M d, Y H:i') }}
Validity Hours
{{ $workPermit->validity_hours }} hours
Expiry Date
{{ $workPermit->expiry_date->format('M d, Y H:i') }} @if($workPermit->isExpired()) (Expired) @endif
@if($workPermit->gas_test_required || $workPermit->fire_watch_required || $workPermit->emergency_procedures)

Safety Requirements

@if($workPermit->gas_test_required)
Gas Test
@if($workPermit->gas_test_date) Tested on {{ $workPermit->gas_test_date->format('M d, Y H:i') }} by {{ $workPermit->gasTester->name ?? 'N/A' }} @if($workPermit->gas_test_results)
{{ $workPermit->gas_test_results }} @endif @else Required but not yet performed @endif
@endif @if($workPermit->fire_watch_required)
Fire Watch
{{ $workPermit->fireWatchPerson->name ?? 'Not assigned' }}
@endif @if($workPermit->emergency_procedures)
Emergency Procedures
{{ $workPermit->emergency_procedures }}
@endif
@endif @if($workPermit->gcaLogs->count() > 0) @endif
@if($workPermit->approvals->count() > 0)

Approval Status

@foreach($workPermit->approvals->sortBy('approval_level') as $approval)

Level {{ $approval->approval_level }}

{{ $approval->approver->name }}

{{ ucfirst($approval->status) }}
@if($approval->comments)

{{ $approval->comments }}

@endif
@endforeach
@endif

Quick Actions

@push('scripts') @endpush @endsection