@extends('layout.app') @section('content') @if(isset($result))
{{-- CSRF Token --}} @csrf

Review Extracted Data

{{-- Helper: Generate editable row --}} @php function editableRow($label, $fieldName, $value) { $escapedValue = e($value); return "

$escapedValue

"; } @endphp {{-- Reminder --}} @if(isset($result['reminder']) && sizeof($result['reminder']) > 0)

Reminder

@foreach($result['reminder'] as $i => $reminder) {!! editableRow("Title", "reminder.$i.title", $reminder['title']) !!} {!! editableRow("Date", "reminder.$i.date", $reminder['date']) !!} {!! editableRow("Time Before (seconds)", "reminder.$i.time_before", $reminder['time_before']) !!} {!! editableRow("Task", "reminder.$i.task", is_array($reminder['task']) ? implode(', ', $reminder['task']) : $reminder['task']) !!} {!! editableRow("Recommendation", "reminder.$i.recommendation", $reminder['recommendation']) !!} @endforeach @endif {{-- Note --}} @if(isset($result['note']) && sizeof($result['note']) > 0)

Note

{!! editableRow("Title", "note.title", $result['note']['title']) !!} {!! editableRow("Content", "note.content", $result['note']['content']) !!} @endif {{-- Call --}} @if(isset($result['call']) && sizeof($result['call']) > 0)

Call

{!! editableRow("To", "call.to", $result['call']['to']) !!} {!! editableRow("Content", "call.content", $result['call']['content']) !!} @endif {{-- Question --}} @if(isset($result['question']) && sizeof($result['question']) > 0)

Question

{!! editableRow("Question", "question.question", $result['question']['question']) !!} {!! editableRow("Answer", "question.answer", $result['question']['answer']) !!} @endif {{-- Completion --}} @if(isset($result['completion']) && sizeof($result['completion']) > 0)

Completion

{!! editableRow("Task", "completion.task", $result['completion']['task']) !!} {!! editableRow("Date", "completion.date", $result['completion']['date']) !!} @endif {{-- Cancellation --}} @if(isset($result['cancellation']))

Cancellation

{!! editableRow("Title", "cancellation.title", $result['cancellation']['title']) !!} {!! editableRow("Date", "cancellation.date", $result['cancellation']['date']) !!} {!! editableRow("Reason", "cancellation.reason", $result['cancellation']['reason']) !!} @endif {{-- Delay --}} @if(isset($result['delay']) && sizeof($result['delay']) > 0)

Delay

{!! editableRow("Title", "delay.title", $result['delay']['title']) !!} {!! editableRow("Date", "delay.date", $result['delay']['date']) !!} {!! editableRow("Reason", "delay.reason", $result['delay']['reason']) !!} @endif {{-- Summary --}} @if(isset($result['summary']) && sizeof($result['summary']) > 0)

Summary

{!! editableRow("Text", "summary.text", $result['summary']['text']) !!} @endif {{-- Created At --}} {!! editableRow("Created At", "created_at", $result['created_at']) !!}
@endif @endsection