@extends('layouts.app') @section('title', 'Workflow Execution Details') @section('content')
Execution Details: {{ $execution->workflow->icon ?? '' }} {{ $execution->workflow->name ?? 'Unknown Workflow' }}
Execution Summary
Outlet {{ $execution->outlet->name ?? 'N/A' }}
Executed By {{ $execution->user->name ?? 'N/A' }}
Started At {{ $execution->started_at ? $execution->started_at->format('Y-m-d H:i') : '-' }}
Completed At {{ $execution->completed_at ? $execution->completed_at->format('Y-m-d H:i') : '-' }}
Status @if($execution->status === 'completed') Completed @else In Progress @endif
Step Responses
    @forelse($execution->responses as $index => $response)
  • {{ $index + 1 }} {{ $response->step->name ?? 'Unknown Step' }}
    @if($response->is_skipped) Skipped @endif
    @if($response->is_skipped)
    Skip Reason: {{ $response->skip_reason ?? 'No reason provided' }}
    @else
    Answer: @if(is_array($response->response_value)) {{ implode(', ', array_map(function($v) { return is_bool($v) ? ($v ? 'Yes' : 'No') : (string)$v; }, $response->response_value)) }} @elseif(is_bool($response->response_value)) {{ $response->response_value ? 'Yes' : 'No' }} @else {{ (string) $response->response_value }} @endif @if($response->response_text) ({{ $response->response_text }}) @endif
    @if($response->remarks)
    Remarks: {{ $response->remarks }}
    @endif @if($response->photo_urls && is_array($response->photo_urls) && count($response->photo_urls) > 0)
    @foreach($response->photo_urls as $photo) @endforeach
    @endif @endif
  • @empty
  • No responses recorded for this execution.
  • @endforelse
@endsection