@extends('layouts.app') @section('title', 'Dashboard CRM') @section('content')

Dashboard CRM

Gestión de oportunidades y pipeline de ventas

Total Oportunidades
{{ number_format($stats['total_opportunities'] ?? 0) }}
Valor Total
${{ number_format($stats['total_value'] ?? 0, 2) }}
Ganadas
{{ number_format($stats['won_opportunities'] ?? 0) }}
${{ number_format($stats['won_value'] ?? 0, 2) }}
Perdidas
{{ number_format($stats['lost_opportunities'] ?? 0) }}
${{ number_format($stats['lost_value'] ?? 0, 2) }}
Pipeline por Etapas
@forelse($pipeline as $stage) @empty @endforelse
Etapa Cantidad Valor Total Valor Esperado
{{ $stage->name }} @if($stage->description) {{ $stage->description }} @endif {{ $stage->opportunities_count ?? 0 }} ${{ number_format($stage->total_value ?? 0, 2) }} ${{ number_format($stage->expected_value ?? 0, 2) }}

No hay etapas configuradas

Oportunidades Recientes
@forelse($recentOpportunities as $opportunity) @empty @endforelse
Oportunidad Cliente Vendedor Etapa Valor Estimado Probabilidad Fecha Cierre Acciones
{{ $opportunity->name }} @if($opportunity->description)
{{ Str::limit($opportunity->description, 50) }} @endif
{{ $opportunity->client->business_name ?? 'N/A' }} {{ $opportunity->salesman->first_name ?? 'N/A' }} {{ $opportunity->salesman->last_name ?? '' }} {{ $opportunity->stage->name ?? 'N/A' }} ${{ number_format($opportunity->estimated_value, 2) }} {{ number_format($opportunity->probability, 1) }}% @if($opportunity->expected_close_date) {{ $opportunity->expected_close_date->format('d/m/Y') }} @if($opportunity->is_overdue)
Vencida @endif @else N/A @endif

No hay oportunidades recientes

Crear Primera Oportunidad
@push('styles') @endpush @endsection