@extends('layouts.admin-master') @section('title', 'Deal Pipeline') @section('style') @include('admin.style') @endsection @section('content')
@include('admin.header')
{{-- Page title --}}

Deal Pipeline

{{-- Toolbar: tabs + search --}}
{{-- Status tabs --}}
@foreach(['' => 'All', 'pending' => 'Pending', 'countered' => 'Countered', 'accepted' => 'Accepted', 'rejected' => 'Rejected'] as $val => $label) {{ $label }} @endforeach
{{-- Search --}}
@forelse($interests as $index => $interest) @empty @endforelse
#
Crop
Farmer
Vendor
Offered Price
Qty
Status
Flag
Date
Actions
{{ ($interests->firstItem() ?? 1) + $index }} {{ $interest->farmerCrop->crop->crop_name ?? 'N/A' }}

{{ $interest->farmer->name ?? '—' }}

{{ $interest->vendor->vendor_name ?? '—' }}

₹{{ number_format($interest->offered_price, 2) }} {{ $interest->quantity ?? '—' }} @php $badgeMap = [ 'pending' => 'badge-pending', 'countered' => 'badge-countered', 'accepted' => 'badge-accepted', 'rejected' => 'badge-rejected', ]; $bc = $badgeMap[$interest->status] ?? 'badge-pending'; @endphp {{ ucfirst($interest->status) }} @if($interest->is_flagged) @else @endif {{ $interest->created_at->format('d M Y') }}
@if($interest->status !== 'rejected') @endif @if($interest->is_flagged)
@csrf @method('PATCH')
@else @endif

No deals found for this filter

Showing {{ $interests->firstItem() ?? 0 }} – {{ $interests->lastItem() ?? 0 }} of {{ $interests->total() }} entries

{{ $interests->appends(request()->query())->links('pagination::bootstrap-4') }}
@include('admin.footer')
{{-- ═══════════════════════════════════════ Override Modal (Close / Flag) ═══════════════════════════════════════ --}} {{-- ═══════════════════════════════════════ Flag Reason Modal (read-only) ═══════════════════════════════════════ --}} @endsection @section('script') @include('admin.script') @endsection