@extends('layouts.owner') @section('title', __('Dashboard — Lined')) @section('page-title', __('Dashboard')) @section('page-subtitle'){{ __('Bem-vindo de volta') }}, {{ session('user_name', __('Cliente')) }}@endsection @section('content') @php $statusLabels = [ 0 => __('Pendente'), 1 => __('Finalizado'), 2 => __('Cancelado'), ]; $statusClasses = [ 0 => 'bg-amber-400/10 border-amber-400/25 text-amber-400', 1 => 'bg-brand-green/10 border-brand-green/25 text-brand-green', 2 => 'bg-red-500/10 border-red-500/25 text-red-400', ]; $svcLabels = []; $svcData = []; foreach ($appointments_by_service as $row) { $r = (object)(array) $row; $svcLabels[] = $r->service_name ?? __('Sem serviço'); $svcData[] = (int) $r->total; } @endphp
R$ {{ number_format((float) $revenue_total, 2, ',', '.') }}
{{ __('Ganho total') }}
{{ $services_count }}
{{ __('Serviços') }}
{{ $professionals_count }}
{{ __('Profissionais') }}

{{ __('Ganhos por mês') }}

{{ $year }}

{{ __('Agendamentos por serviço') }}

@if (count($svcLabels) > 0)
@else

{{ __('Sem dados de agendamentos.') }}

@endif

{{ __('Próximos agendamentos') }}

{{ __('Ver todos →') }}
@if (count($upcoming) > 0)
@foreach ($upcoming as $a) @php $apt = (object)(array) $a; $st = (int) ($apt->status ?? 0); $dateFmt = !empty($apt->appointment_date) ? \Carbon\Carbon::parse($apt->appointment_date)->format('d/m/Y') : '—'; @endphp
{{-- Linha 1: ícone + quem/o quê --}}

{{ $apt->names ?? '—' }}

{{ $apt->service_name ?? '—' }} · {{ $apt->professional_name ?? '—' }}

{{-- Linha 2 no celular: data/hora e status, alinhados sob o texto acima (pl-14 = largura do ícone). --}}

{{ $dateFmt }}

{{ $apt->appointment_interval ?? '' }}

{{ $statusLabels[$st] ?? $st }}
@endforeach
@else

{{ __('Nenhum agendamento próximo.') }}

@endif
@endsection @push('scripts') @endpush