@extends('layouts.dashboardnew') @section('content') @php $totalTickets = ($datos['abiertos'] ?? 0) + ($datos['cerrados'] ?? 0); $tasaResolucion = $totalTickets > 0 ? round((($datos['cerrados'] ?? 0) / $totalTickets) * 100, 1) : 0; @endphp
{{-- Tickets abiertos --}}
En proceso

Tickets abiertos

{{ number_format($datos['abiertos']) }}

{{-- Tickets cerrados --}}
Resueltos

Tickets cerrados

{{ number_format($datos['cerrados']) }}

{{-- Tickets de hoy --}}
Hoy

Creados hoy

{{ number_format($datos['hoy']) }}

{{-- Tasa de resolución --}}
{{ $tasaResolucion >= 70 ? 'Bueno' : ($tasaResolucion >= 40 ? 'Regular' : 'Bajo') }}

Tasa de resolución

{{ $tasaResolucion }}%

Tickets anuales

Evolución mensual de tickets en el año seleccionado

Tipos de ticket

Distribución por categoría

{{ count($datos['array_datos']) }} categorías
{{-- Lista de tipos con barras de progreso --}}
@php $totalTipos = collect($datos['array_datos'])->sum('total'); @endphp @forelse($datos['array_datos'] as $array) @php $pct = $totalTipos > 0 ? round(($array['total'] / $totalTipos) * 100, 1) : 0; @endphp
{{ $array['tipo'] }}
{{ $array['total'] }} ({{ $pct }}%)
@empty

Sin tipos registrados

@endforelse
@endsection @push('script') {{-- amcharts --}} @endpush