@extends('layouts.app') @section('content')
Search Leads
@if(auth()->user()->role_id == 1 || auth()->user()->role_id == 2)
has('excludeAgents') && request('excludeAgents') == 1) checked @endif id="excludeAgents" name="excludeAgents">
@endif
has('excludeStatuses') && request('excludeStatuses') == 1) checked @endif id="excludeStatuses" name="excludeStatuses">
@if(auth()->user()->role_id == 1 || auth()->user()->role_id == 2 || Auth::user()->role_id == 3)
has('excludeCountries') && request('excludeCountries') == 1) checked @endif id="excludeCountries" name="excludeCountries">
@endif
has('excludeAffils') && request('excludeAffils') == 1) checked @endif id="excludeAffils" name="excludeAffils">
@if(auth()->user()->role_id == 3 || auth()->user()->role_id == 4)
@endif get('fist_name')) value="{{request()->get('fist_name')}}" @endif placeholder="First Name">
@if(auth()->user()->role_id == 3 || auth()->user()->role_id == 4)
@endif get('last_name')) value="{{request()->get('last_name')}}" @endif placeholder="Last name">
get('phone')) value="{{request()->get('phone')}}" @endif placeholder="Phone">
get('email')) value="{{request()->get('email')}}" @endif placeholder="Email">
@if(Auth::user()->role_id == 1 || Auth::user()->role_id == 2 || Auth::user()->role_id == 3)
get('dateFrom')) value="{{request()->get('dateFrom')}}" @endif placeholder="Date From" autocomplete="off">
get('dateTo')) value="{{request()->get('dateTo')}}" @endif placeholder="Date To" autocomplete="off">
@if(auth()->user()->role_id == 1 || auth()->user()->role_id == 3)
@endif
get('qty')) value="{{request()->get('qty')}}" @endif placeholder="Quantity" autocomplete="off">
@endif
Shuffle
@if(Auth::user() && Auth::user()->role_id == 1 || Auth::user()->role_id == 2)
@csrf
@endif
Total Leads: {{$leadsCount}}
@csrf
@if(Auth::user() && Auth::user()->role_id == 1 || Auth::user()->role_id == 2)
@csrf
@if(Auth::user()->role_id == 1)
@endif
@endif
@if(Auth::user()->role_id == 1 || Auth::user()->role_id == 2 || Auth::user()->role_id == 3) @endif @if(auth()->user()->role_id == 1) @endif @if(auth()->user()->role_id == 4 && Auth::user()->canSeeComments == true) Comments @endif @foreach($allLeads as $index => $lead) @if(Auth::user()->role_id == 1 || Auth::user()->role_id == 2 || Auth::user()->role_id == 3 ) @if(auth()->user()->role_id == 1) @endif @endforeach @if(Auth::user()->role_id == 1 || Auth::user()->role_id == 2 || Auth::user()->role_id == 3) @endif @if(auth()->user()->role_id == 1) @endif
CIDActionFirst Name Last Name Phone Country Email Status Agent Affiliates Comment SourceTransfered AtCreated At
{{$lead->id}} @if(auth()->user() && auth()->user()->role_id == 1 || auth()->user()->role_id == 2)
@if(auth()->user()->role_id == 1)
@csrf @method('DELETE')
@endif @endif @if(Auth::user() && Auth::user()->role_id == 1 || Auth::user()->role_id == 2)
Copy @endif @endif
{{$lead->first_name}} {{$lead->last_name}} @php // $pref = App\Models\Prefix::where('country', 'like', '%'.$lead->country.'%')->first(); // if($pref != null){ // $prefix = $pref->prefix; // } else { // $prefix = '*22'; // } // $agentId = 2000; // if($lead->user == null){ // $agentId = 2000; // } else { // $agentId = $lead->user->agent_id; // } @endphp +{{str_replace(['+', ' ', '-',], '', $lead->phone)}} {{-- phone)}}/{{$prefix}}">+{{$lead->phone}}--}} {{$lead->country}} {{$lead->email}} @if(auth()->user() && auth()->user()->role_id == 1 || auth()->user()->role_id == 2 || auth()->user()->role_id == 3) @if(isset($lead->status_id)) @else @endif @else @if($lead->status != null){{ $lead->status->name }}@else Status not selected @endif @endif @if(auth()->user() && auth()->user()->role_id == 1 || auth()->user()->role_id == 2) @if(isset($lead->user->id)) @else @endif @else @if(isset($lead->user->id)) {{$lead->user->name}} @endif @endif {{$lead->affiliates}} {{$lead->comment}} {{$lead->source}} {{$lead->updated_at}} @if(auth()->user()->role_id == 1) @else {{$lead->created_at}} @endif
CIDActionFirst Name Last Name phone country email Status Agent affiliates sourceTransfered AtCreated
@if($allLeads instanceof Illuminate\Pagination\LengthAwarePaginator) {{$allLeads->links('dashboard.pagination')}} @endif
@if(auth()->user()->role_id == 1) @include('dashboard.index.create') @endif @endsection @push('scripts') @endpush