@extends('layouts.app') @section('title', 'Dashboard - QA Global') @section('content')

Dashboard - Qualidade de Água Global

Estatísticas e análises do IQA

Voltar

Total de Coletas

{{ $estatisticas['total_coletas'] }}

IQA Médio

{{ number_format($estatisticas['iqa_medio'], 2) }}

Coletas Validadas

{{ $estatisticas['validadas'] }}

Distribuição por Classificação IQA

@if($distribuicao->count() > 0)
@foreach($distribuicao as $classificacao => $quantidade) @php $cores = [ 'Excelente' => ['bg' => 'bg-blue-100', 'text' => 'text-blue-800', 'border' => 'border-blue-500'], 'Bom' => ['bg' => 'bg-green-100', 'text' => 'text-green-800', 'border' => 'border-green-500'], 'Médio' => ['bg' => 'bg-yellow-100', 'text' => 'text-yellow-800', 'border' => 'border-yellow-500'], 'Ruim' => ['bg' => 'bg-orange-100', 'text' => 'text-orange-800', 'border' => 'border-orange-500'], 'Muito Ruim' => ['bg' => 'bg-red-100', 'text' => 'text-red-800', 'border' => 'border-red-500'], ]; $cor = $cores[$classificacao] ?? ['bg' => 'bg-gray-100', 'text' => 'text-gray-800', 'border' => 'border-gray-500']; @endphp

{{ $classificacao }}

{{ $quantidade }}

{{ $estatisticas['total_coletas'] > 0 ? number_format(($quantidade / $estatisticas['total_coletas']) * 100, 1) : 0 }}%

@endforeach
@else

Nenhum dado disponível para o período selecionado

@endif

IQA Médio por Estação

@if($iqaPorEstacao->count() > 0)
@foreach($iqaPorEstacao as $dados) @endforeach
Estação Bacia Hidrográfica IQA Médio Classificação
{{ $dados['estacao'] }} {{ $dados['bacia'] }} {{ $dados['iqa'] }} @php $cores = [ 'Excelente' => 'bg-blue-100 text-blue-800', 'Bom' => 'bg-green-100 text-green-800', 'Médio' => 'bg-yellow-100 text-yellow-800', 'Ruim' => 'bg-orange-100 text-orange-800', 'Muito Ruim' => 'bg-red-100 text-red-800', ]; $corClasse = $cores[$dados['classificacao']] ?? 'bg-gray-100 text-gray-800'; @endphp {{ $dados['classificacao'] }}
@else

Nenhuma estação com dados no período selecionado

@endif
@if($distribuicao->count() > 0 || $iqaPorEstacao->count() > 0) @endif @endsection