@extends('layout.administrator.index') @section('title', 'notificaciones') @section('content')

Información General

@if ($sample->sample_id) Ver muestra @endif
ID Sample {{ $sample->sample_id }}
Equipo {{ optional($sample->getEquipment)->unit_id }}
Componente {{ optional($sample->getComponent)->name }}
Cliente {{ optional($sample->customer)->company }}
Severidad máxima {{ $sample->severity_label }}
Elementos alertados {{ $sample->alerted_elements_count }}

Elementos con tendencia / desviación

@forelse ($alertDetails as $detail) @php $detailSeverity = $detail['severity'] ?? 'informative'; $severityClass = [ 'critical' => 'danger', 'alert' => 'warning', 'caution' => 'info', 'informative' => 'secondary', ][$detailSeverity] ?? 'secondary'; @endphp @empty @endforelse
Elemento Valor actual Promedio (4 muestras) Variación (%) Tendencia Límite crítico Cercanía límite Severidad Motivo
{{ $detail['element_name'] ?? '—' }} {{ $detail['current_value'] ?? '—' }} {{ $detail['historical_avg_last_4'] ?? '—' }} {{ isset($detail['variation_percent']) ? $detail['variation_percent'] . '%' : '—' }} {{ $detail['trend_direction'] ?? '—' }} {{ $detail['critical_limit'] ?? '—' }} @if (isset($detail['critical_ratio'])) {{ round($detail['critical_ratio'] * 100, 1) }}% @else — @endif {{ ucfirst($detailSeverity) }} {{ $detail['reason'] ?? '' }}
Sin detalle agrupado. Mostrando registro individual.
{{ $sample->element_name }} {{ $sample->current_value ?? '' }} {{ $sample->historical_avg_last_4 ?? '' }} {{ $sample->variation_percent ?? '' }}% — — — {{ $sample->severity_label }} —

Comentario Automático

@if ($comments)
Código del comentario {{ $comments->code ?? '—' }}
Texto {{ $comments->comment_text ?? '—' }}
Fecha de generación {{ $comments->created_at ?? '—' }}
Usuario de sistema system_auto
@else

Sin comentario automático asociado.

@endif
@endsection @section('js') @endsection