{{-- One registration request, in whatever state it has reached. Four messages - received, approved, rejected, returned - and one view. They differ in their title, their badge, their opening line and their buttons; they must NOT differ in the summary card, because that card is what a practitioner and a WMA officer read the reference off when they ring each other about an application. Four separate templates would drift apart the first time somebody edited one of them. Everything comes in from the Mailable as plain data - see Modules/Customers/app/Mail/RegistrationRequestMail.php. No database work happens in here. --}} @extends('customers::emails.layout') @section('preheader'){{ $preheader }}@endsection @section('title'){{ $title }}@endsection @section('badge') {{ $status_label }} @endsection @section('body')

Dear {{ $practitioner_name }},

{!! $intro !!}

{{-- ── The reference ──────────────────────────────────────────────────── Its own block above the rest of the card, at a size nothing else on the page competes with. It is the one thing in this email that both sides will quote at each other, so it is not going to sit as the first row of a list of twelve. --}}
Application Reference
{{ $request_number }}
{{-- ── Application summary ───────────────────────────────────────────── Two columns on a desktop client, one on a phone (the .col rule in the layout's media query). Each fact is a label above its value, so a narrow column never has to squeeze the two onto one line. --}}
Application Details
@foreach ($facts as $row) @endforeach
@include('customers::emails.partials.fact', ['label' => $row[0][0], 'value' => $row[0][1], 'mono' => $row[0][2] ?? false]) @if (isset($row[1])) @include('customers::emails.partials.fact', ['label' => $row[1][0], 'value' => $row[1][1], 'mono' => $row[1][2] ?? false]) @else   @endif
{{-- ── What the officer wrote ────────────────────────────────────────── Only where there is something to say. A rejection with no reason and a correction with no comments are both refused before they get here, so this block is empty only on the two messages that carry no words. --}} @if ($reason)
{{ $reason_label }}

{{ $reason }}

@endif {{-- ── What to do next ───────────────────────────────────────────────── Bulletproof buttons: a table with the colour on the cell, so Outlook paints the block even though it ignores padding on an anchor. --}} @if (count($actions) > 0) @foreach ($actions as $index => $action) @if ($index > 0) @endif @endforeach @endif

Please quote {{ $request_number }} in any correspondence about this application.

Regards,
{{ config('customers.agency.name') }}
{{ config('customers.agency.system') }}

@endsection