@php /** @var \App\Support\Witness\WitnessQuestionnaire $questionnaire */ /** @var array $answers keyed "section.question" => [value, origin, review_status, provenance] */ $fmt = function ($value) { if (is_bool($value)) { return $value ? 'Yes' : 'No'; } if (is_array($value)) { // repeater rows or multiselect if ($value !== [] && is_array(reset($value))) { return null; // handled as table } return implode(', ', array_filter($value, fn ($v) => $v !== null && $v !== '')); } return (string) $value; }; // Map "section.question" => ["EXHIBIT 1", …] from the exhibit citations, so the // reference is woven in beside the answer it supports — deterministically, from // the agent's citations, never invented. $citationMap = []; foreach ($exhibits ?? [] as $ex) { foreach ($ex['cited_by'] ?? [] as $answerKey) { $citationMap[$answerKey][] = $ex['exhibit_ref']; } } $citationsFor = function ($key) use ($citationMap) { $refs = $citationMap[$key] ?? []; return $refs ? ' (see '.implode(', ', $refs).')' : ''; }; @endphp
@if($coverLetter){{ now()->format('d F Y') }}
{{ $client->fullName }}
@if($answers['client_details.current_address']['value'] ?? null){!! nl2br(e($answers['client_details.current_address']['value'])) !!}@endif
Dear {{ $client->name_first ?? 'Sir/Madam' }},
Please find enclosed your witness statement prepared in support of your application to the Scottish Redress Scheme. Please read it carefully, check that it is accurate and reflects your account in your own words, and let us know of any amendments. Once you are satisfied it is correct, please sign and date the statement of truth at the end.
Yours sincerely,
{{ $solicitor->name ?? 'MMA Legal' }}
| Applicant | {{ $client->fullName }} |
| Date of birth | {{ optional($client->date_of_birth)->format('d F Y') }} |
| Application reference | {{ $claim->case_number }} |
| {{ $sub->label }} | @endforeach
|---|
| {{ $row[$sub->key] ?? '' }} | @endforeach
I believe that the facts stated in this Witness Statement are true to the best of my knowledge and recollection.
| Signed | ___________________________ |
| Name | {{ $answers['declaration.signed_name']['value'] ?? $client->fullName }} |
| Date | {{ $answers['declaration.signed_date']['value'] ?? '_______________' }} |