@extends('layouts.app') @section('title', 'Workflow Step Details') @section('page-header')
@endsection @section('content') @php // Helper function to safely format dates $formatDate = function($date) { if (!$date) return 'N/A'; if ($date instanceof \DateTime) return $date->format('M d, Y H:i'); if (is_string($date)) return date('M d, Y H:i', strtotime($date)); return 'N/A'; }; $formatDateOnly = function($date) { if (!$date) return 'N/A'; if ($date instanceof \DateTime) return $date->format('M d, Y'); if (is_string($date)) return date('M d, Y', strtotime($date)); return 'N/A'; }; @endphp{{ $step->step_name }}
Step {{ $step->step_order }}
{{ $step->approver_type }}
{{ $step->approval_mode }}
@if($step->required_role) {{ $step->required_role }} @else N/A @endif
@if($step->approver_user_id) {{ $step->approver->name ?? 'User #' . $step->approver_user_id }} @else N/A @endif
{{ $step->due_days }} days
{{ $step->min_approvers }}
{{ number_format($step->approval_threshold, 2) }}
@if($step->escalation_enabled) Enabled After {{ $step->escalation_hours }} hours @else Disabled @endif
{{ $step->description }}
Required
@elseOptional
@endifDelegation Allowed
@elseNo Delegation
@endifRejection Allowed
@elseNo Rejection
@endifComments Allowed
@elseNo Comments
@endifAttachments Allowed
@elseNo Attachments
@endifE-Signature Required
@elseNo E-Signature
@endif{{ $workflow->workflow_code }}
Escalation after {{ $step->escalation_hours }} hours
@if($step->escalation_action)Action: {{ $step->escalation_action }}
@endif @if($step->escalation_role)Escalate to: {{ $step->escalation_role }}
@endifEscalation disabled