@php $display = $value; if (($column ?? '') === 'role_level' && is_int($value)) { $label = $inferencia['role_level_label'] ?? null; $display = $label ? "{$value} — {$label}" : (string) $value; if (! empty($inferencia['fonte'])) { $display .= ' (via '.$inferencia['fonte'].')'; } } elseif (($column ?? '') === 'frequency_visit' && is_int($value)) { $freqLabel = \App\Support\Import\VisitFrequencyMapper::label($value); $display = $freqLabel ? "{$value} — {$freqLabel}" : (string) $value; } elseif (($column ?? '') === 'group_curve' && $value !== null && $value !== '') { $label = \App\Support\Import\GroupCurveMapper::label((string) $value); $display = $label ? "{$value} — {$label}" : (string) $value; } elseif (($column ?? '') === 'type_visit' && is_int($value)) { $visitLabel = match ($value) { 1 => 'Pessoalmente', 2 => 'On-line', 3 => 'Pessoalmente e on-line', default => null, }; $display = $visitLabel ? "{$value} — {$visitLabel}" : (string) $value; } elseif ($value === null || $value === '') { $display = '—'; } elseif (is_bool($value)) { $display = $value ? 'Sim (1)' : 'Não (0)'; } elseif (is_array($value)) { $display = json_encode($value, JSON_UNESCAPED_UNICODE); } @endphp {{ $display }}