{{-- Shared faithful port of the Success-Story document body used by TWO legacy emails: - MailHandler::sendEmailCreateSuccessStory (L4360-4479) → SuccessStoryCreatedMail ($showComments = false) - MailHandler::sendEmailSuccessStoryToUser (L3591-3751) → SuccessStoryCommentedMail ($showComments = true) The create variant renders Title + Details + Discussion only; the comment variant adds the Latest Comment + History sections. Discussion / Remark hold internally-authored CKEditor HTML — the web Detail page renders them via dangerouslySetInnerHTML (trusted), so the email renders them raw ({!! !!}) with legacy's nl2br, matching both the app and the legacy email. The plain lookup fields use {{ }} auto-escaping. --}} @use('App\Support\GeneralFunction') @php $showComments = $showComments ?? false; $latestComment = $latestComment ?? null; $history = $history ?? collect(); @endphp Success Story - Colorindo Chemtra

{{-- Details --}}
Success Story No.   : {{ str_pad((string) $story->ID, 6, '0', STR_PAD_LEFT) }}
Tanggal   : {{ $story->Tanggal }}
Creator  : {{ $story->userIDInput?->Nama }}
Sales  : {{ $story->userIDSales?->Nama }}
Group Division  : {{ $story->groupDivision?->GroupDivisionName }}
Division  : {{ $story->division?->DivisionName }}
Application  : {{ $story->application?->ApplicationName }}
Principal  : {{ $story->principal?->PrincipalName }}
Product  : {{ $story->barang?->NamaBarang }}
{{-- Discussion --}}

Discussion

{!! nl2br(GeneralFunction::scrubHtmlForEmail($story->Discussion ?? '')) !!}
@if ($showComments) {{-- Latest comment --}}

Latest Comment by : {{ $latestComment?->user?->Nama }}

{!! nl2br(GeneralFunction::scrubHtmlForEmail($latestComment?->Remark ?? '')) !!}
{{-- History --}}

History

@foreach ($history as $a) @endforeach
ID Tanggal User Comment
{{ $a->ID }} {{ $a->Tanggal }} {{ $a->user?->Nama }} {!! GeneralFunction::scrubHtmlForEmail($a->Remark) !!}
@endif