@php $typeValue = $row->type?->value ?? $value; $isEmail = $typeValue === 'email'; $isSms = $typeValue === 'sms'; $isAutomation = $row->is_automation; $categoryEnum = \App\Enums\NotificationTemplateCategory::tryFrom($row->category); $categoryColors = [ 'demandes' => 'info', 'accord_finalisation' => 'success', 'relances' => 'warning', 'refus_sans_suite' => 'danger', 'nrp_lapin' => 'secondary', 'report' => 'purple', ]; $catColor = $categoryColors[$row->category] ?? 'light'; $triggerType = $row->trigger_type; $triggerLabels = $row->trigger_status_labels; $bankName = $row->bank?->name; @endphp
@if($isEmail) Email @elseif($isSms) SMS @endif @if($isAutomation) Auto @endif
@if($categoryEnum) {{ $categoryEnum->label() }} @endif @if($triggerType)
{{ $triggerType === 'project_status' ? __('Project status') : __('Lead status') }} @if($bankName) {{ __('Bank') }}: {{ $bankName }} @endif @if(count($triggerLabels))
@foreach($triggerLabels as $label) {{ $label }} @endforeach
@endif
@endif