{{-- PHASE 1: INITIATION & CONTAINMENT --}}
{{-- Basic Info --}}

1 Basic Information

Number{{ $deviation->deviation_number }}
Kind {{ $deviation->record_kind->label() }}
Type{{ $deviation->deviation_type }}
Category{{ $deviation->deviation_category }}
Department{{ $deviation->department?->department_name }}
Location{{ $deviation->location }}
Process Step{{ $deviation->process_step ?? '—' }}
Description:
{!! nl2br(e($deviation->description)) !!}
{{-- Affected Items --}}
Affected Items / Batches
@if($deviation->affectedItems->isEmpty())
No affected items recorded yet. Add at least one to pass Gate 1.
@else
@foreach($deviation->affectedItems as $item) @endforeach
Batch # Product Code Quantity Disposition Disposition Date Actions
{{ $item->batch_number ?? '—' }} {{ $item->product_code ?? '—' }} @if($item->quantity_affected) {{ number_format($item->quantity_affected, 3) }} {{ $item->unit_of_measure }} @else — @endif {{ $item->disposition }} {{ $item->disposition_date?->format('M j, Y') ?? '—' }}
@csrf @method('DELETE')
@endif
{{-- Containment --}}
Containment Actions
@if($deviation->containments->isEmpty())
No containment actions recorded. Add at least one to pass Gate 1.
@else
@foreach($deviation->containments as $c) @endforeach
Type Description Taken By Date Effectiveness Actions
{{ str_replace('_', ' ', $c->action_type) }} {{ Str::limit($c->action_description, 80) }} {{ $c->takenByUser?->name ?? '—' }} {{ $c->action_date?->format('M j, Y') }} {{ str_replace('_', ' ', $c->effectiveness) }}
@csrf @method('DELETE')
@endif
{{-- Add Affected Item Modal --}} {{-- Add Containment Modal --}}