@extends('layouts.admin') @section('content')
{{-- HEADER --}}
Sistema de Gestão

DASHBOARD

Bem-vindo, {{ auth()->user()->name }}.

Sistema Operacional
{{-- KPIs OPERACIONAIS --}}
@php $kpis = [ ['label' => 'Notícias', 'value' => $totalNoticias, 'unit' => 'artigos', 'icon' => 'M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10l4 4v10a2 2 0 01-2 2z'], ['label' => 'Equipamentos', 'value' => $totalProdutos, 'unit' => 'itens', 'icon' => 'M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z'], ['label' => 'Formações', 'value' => $totalFormacoes, 'unit' => 'cursos', 'icon' => 'M12 14l9-5-9-5-9 5 9 5zm0 0v6'], ['label' => 'Pedidos', 'value' => $totalPedidos, 'unit' => 'total', 'icon' => 'M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2'], ]; @endphp @foreach($kpis as $kpi)

{{ $kpi['label'] }}

{{ $kpi['value'] }} {{ $kpi['unit'] }}
@endforeach
{{-- KPIs FINANCEIROS --}}

Valor do Estoque

{{ number_format($totalValorEstoque, 0, ',', '.') }}

Kz (venda × stock)

Total Inscritos

{{ $totalInscritos }} inscrições

Pagamentos Confirmados

{{ number_format($totalPagoConfirmado, 0, ',', '.') }}

Kz recebidos

Pagamentos Pendentes

{{ number_format($totalPagoPendente, 0, ',', '.') }}

Kz a confirmar

{{-- GRÁFICO + PEDIDOS PAGOS --}}
{{-- Gráfico de Inscrições --}}

Evolução

Inscrições — Últimos 6 Meses

@php $meses = ['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez']; $chartLabels = []; $chartValues = []; $chartValores = []; foreach($inscricoesPorMes as $row) { $chartLabels[] = $meses[$row->mes - 1] . '/' . substr($row->ano, 2); $chartValues[] = $row->total; $chartValores[] = round($row->valor / 1000, 1); } $maxVal = max(array_merge($chartValues, [1])); @endphp @if(count($chartLabels) > 0)
@foreach($chartValues as $i => $val)
{{ $val }}
{{ $chartLabels[$i] }}
@endforeach
@foreach($chartLabels as $i => $label)
{{ $label }}: {{ $chartValues[$i] }} inscrições · {{ $chartValores[$i] }}K Kz
@endforeach
@else
Sem dados de inscrições ainda
@endif
{{-- Painel de Pedidos --}}

Resumo

Pedidos & Propostas

Total de Pedidos {{ $totalPedidos }}
Pagos / Confirmados {{ $totalPedidosPagos }}
Pendentes {{ $totalPedidos - $totalPedidosPagos }}
Ver Todos os Pedidos
{{-- AÇÕES RÁPIDAS --}}

Ações Rápidas

@endsection