@extends('admin.layouts.master') @push('styles') @endpush @section('body')
Opportunity List

@foreach ($opportunities as $index => $opportunity) @endforeach
SI.No Opportunity Lead Deal Value Stage Probability Expected Close Assigned To View Edit Delete
{{ $index + 1 }} {{ $opportunity->name }} {{ $opportunity->lead?->name }} {{ $opportunity->currency }} {{ number_format($opportunity->value, 2) }} @php $badge = match ($opportunity->stage) { 'Qualification' => 'bg-primary', 'Discovery' => 'bg-info', 'Proposal' => 'bg-warning', 'Negotiation' => 'bg-secondary', 'Closed Won' => 'bg-success', 'Closed Lost' => 'bg-danger', default => 'bg-dark', }; @endphp {{ $opportunity->stage }} {{ $opportunity->probability }}% {{ $opportunity->expected_close_date ? \Carbon\Carbon::parse($opportunity->expected_close_date)->format('d M Y') : '-' }} {{ $opportunity->assignedUser?->name ?? '-' }}
@endsection