@extends('layouts.cleaning') @section('content')
Worker Profile & Traceability

{{ $worker->first_name }} {{ $worker->last_name }}

← Back to Directory @can('cleaning.workers.manage') Edit Profile @endcan
@if(session('success'))

{{ session('success') }}

@endif

Personnel Credentials

Worker ID
{{ $worker->worker_id }}
Status
@if($worker->is_active) Active @else Inactive @endif
National / ID #
{{ $worker->id_number ?? '-' }}
Phone Number
{{ $worker->phone_number ?? '-' }}
Current Station
{{ $worker->currentBranch?->name ?? 'Unassigned' }}
Current Supervisor
{{ $worker->currentSupervisor?->name ?? 'None' }}

Assignment & Station History Traceable Operational Log

@forelse($worker->assignments as $assignment)
{{ $assignment->branch?->name }} @if(is_null($assignment->end_date)) Current Station @endif
Supervisor: {{ $assignment->supervisor?->name ?? 'Unassigned' }} • Assigned by: {{ $assignment->assignedBy?->name ?? 'System' }}
@if($assignment->notes)
"{{ $assignment->notes }}"
@endif
{{ $assignment->start_date->format('M d, Y') }} → {{ $assignment->end_date ? $assignment->end_date->format('M d, Y') : 'Present' }}
@empty
No assignment history recorded for this worker.
@endforelse
@can('cleaning.workers.manage')
Operational Control

Reassign Worker

Move worker to another railway station and assign them under the station supervisor. Past history is permanently preserved.

@csrf
@else
Worker station assignments are managed exclusively by the Cleaning Manager.
@endcan
@endsection