@extends('layouts.app') @section('title', __('app.deals') . ' - SEU CRM') @section('content')

{{ __('app.deals_pipeline') }}

{{ __('app.add_deal') }}
@if(session('success')) @endif
{{ $deals->where('stage', 'lead')->count() }}

{{ __('app.leads') }}

{{ $deals->where('stage', 'qualified')->count() }}

{{ __('app.qualified') }}

{{ $deals->where('stage', 'proposal')->count() }}

{{ __('app.proposal') }}

{{ $deals->where('stage', 'negotiation')->count() }}

{{ __('app.negotiation') }}

{{ $deals->where('stage', 'closed_won')->count() }}

{{ __('app.won') }}

{{ $deals->where('stage', 'closed_lost')->count() }}

{{ __('app.lost') }}

{{ __('app.deal_management') }}
@if(request('search') || request('stage')) {{ __('app.clear') }} @endif
@forelse($deals as $deal) @empty @endforelse
{{ __('app.deal') }} {{ __('app.customer') }} {{ __('app.value') }} {{ __('app.stage') }} {{ __('app.priority') }} {{ __('app.close_date') }} {{ __('app.actions') }}
{{ $deal->title }}
{{ Str::limit($deal->description, 50) }}
{{ substr($deal->customer->name, 0, 1) }} {{ $deal->customer->name }}
${{ number_format($deal->value, 2) }} {{ ucfirst(str_replace('_', ' ', $deal->stage)) }} {{ ucfirst($deal->priority) }} {{ $deal->expected_close_date ? $deal->expected_close_date->format('M d, Y') : __('app.not_available') }}
@csrf @method('DELETE')

{{ __('app.no_deals_found') }}

{{ __('app.showing') }} {{ $deals->firstItem() ?? 0 }} {{ __('app.to') }} {{ $deals->lastItem() ?? 0 }} {{ __('app.of') }} {{ $deals->total() }} {{ __('app.results') }}
{{ $deals->links() }}
@endsection @push('scripts') @endpush