@extends('layouts.app') @section('title', 'Approval — ' . ($instance->record_title ?: '#' . $instance->instance_id)) @php /** * Defensive date formatter. * Accepts Carbon, string, or null; returns a formatted string or '—'. */ $fmtDate = function ($value, string $format = 'M j, Y H:i') { if (empty($value)) return '—'; try { return \Illuminate\Support\Carbon::parse($value)->format($format); } catch (\Throwable $e) { return (string) $value; } }; @endphp @section('content')
{{ $instance->record_number ?: '#' . $instance->record_id }} {{ $instance->record_type }}
| {{ Str::headline($key) }} |
@if(is_array($value) || is_object($value))
{{ json_encode($value) }}
@else
{{ Str::limit((string) $value, 200) }}
@endif
|
|---|
{{ $step->required_role }}
@endif
No workflow steps defined for this workflow.
@endforelse| Workflow | {{ $instance->workflow?->workflow_name ?? '—' }} |
|---|---|
| Code | {{ $instance->workflow?->workflow_code ?? '—' }} |
| Module | {{ $instance->record_type }} |
| Initiator | {{ $instance->initiator?->name ?? '—' }} |
| Initiated | {{ $fmtDate($instance->initiated_at) }} |
| Current Step | Step {{ $instance->current_step }} |
| Completed | {{ $fmtDate($instance->completed_at) }} |
| Decision By | {{ $instance->finalDecisionBy?->name ?? '—' }} |