@extends('layouts.master') @section('title', 'Leads Center | Alboosh - Timeless authenticity, born of the desert') @section('title-topbar', __('basic.leads center')) @section('css') @endsection @section('fixedcontent') @if (Session::has('success'))

Sent Successfully

{{ Session::get('success') }}

@endif @endsection @section('content')
{{ __('basic.dashboard') }} | {{ __('basic.leads center') }}
{{ __('basic.leads') }} {{ __('basic.search filter') }}
{{ __('basic.leads center') }}
{{ __('basic.from') }} {{ $date_from }} {{ __('basic.to') }} {{ $date_to }}

{{ __('basic.total month leads') }}

@if($month_leads > $last_month_leads) @elseif($month_leads < $last_month_leads) @endif {{ $month_leads }}
{{ __('basic.leads') }}
{{ $last_month_leads }} {{ __('basic.last month') }}

{{ __('basic.total conversion to clients') }}

@if($month_leads_converted > $last_month_leads_converted) @elseif($month_leads_converted < $last_month_leads_converted) @endif {{ $month_leads_converted }}
{{ __('basic.converted to client') }}
{{ $last_month_leads_converted }} {{ __('basic.last month') }}

{{ __('basic.conversion rate to clients') }}

@php $conversion_to_client_precentage_month = round($month_leads_converted != 0 ? $month_leads_converted / $month_leads * 100 : 0, 2); $conversion_to_client_precentage_last_month = round($last_month_leads_converted != 0 ? $last_month_leads_converted / $last_month_leads * 100 : 0, 2); @endphp
@if($conversion_to_client_precentage_month > $conversion_to_client_precentage_last_month) @elseif($conversion_to_client_precentage_month < $conversion_to_client_precentage_last_month) @endif {{ $conversion_to_client_precentage_month }} %
{{ __('basic.converted to client') }}
{{ $conversion_to_client_precentage_last_month }} {{ __('basic.last month') }}

{{ __('basic.month action with leads') }}

@if($month_action > $last_month_action) @elseif($month_action < $last_month_action) @endif {{ $month_action }}
{{ __('basic.leads') }}
{{ $last_month_action }} {{ __('basic.last month') }}

{{ __('basic.month no action with leads') }}

@if($month_no_action > $last_month_no_action) @elseif($month_no_action < $last_month_no_action) @endif {{ $month_no_action }}
{{ __('basic.leads') }}
{{ $last_month_no_action }} {{ __('basic.last month') }}

{{ __('basic.not interested') }}

@if($month_junk_lost > $last_month_junk_lost) @elseif($month_junk_lost < $last_month_junk_lost) @endif {{ $month_junk_lost }}
{{ __('basic.leads') }}
{{ $last_month_junk_lost }} {{ __('basic.last month') }}

{{ __('basic.contacted') }}

@if($month_attempted_to_contact > $last_month_attempted_to_contact) @elseif($month_attempted_to_contact < $last_month_attempted_to_contact) @endif {{ $month_attempted_to_contact }}
{{ __('basic.leads') }}
{{ $last_month_attempted_to_contact }} {{ __('basic.last month') }}

{{ __('basic.interested') }}

@if($month_following > $last_month_following) @elseif($month_following < $last_month_following) @endif {{ $month_following }}
{{ __('basic.leads') }}
{{ $last_month_following }} {{ __('basic.last month') }}
{{ __('basic.leads') }}
{{ __('basic.resources') }}
{{ __('basic.campaigns') }}
{{ __('basic.projects') }}
{{ __('basic.actions') }}
{{ __('basic.branches') }}
{{ __('basic.workers') }}
{{ __('basic.sell to debtor') }}
{{ __('basic.recent leads') }}
@php $total_sell = 0; @endphp @foreach ($leads as $item) @if ($item->type == 1) @php $text_color = 'main-color-btn'; $msg = __('basic.real client'); $icon = "fas fa-check"; @endphp @elseif ($item->type == 2) @php $text_color = 'not_accepted-color-btn'; $msg = __('basic.cold'); $icon = "fas fa-snowflake"; @endphp @elseif ($item->type == 3) @php $text_color = 'prog-color-btn'; $msg = __('basic.warm'); $icon = "fas fa-mug-hot"; @endphp @elseif ($item->type == 4) @php $text_color = 'active-color-btn'; $msg = __('basic.hot'); $icon = "fas fa-fire"; @endphp @elseif ($item->type == 5) @php $text_color = 'cancel-color-btn'; $msg = __('basic.not interested'); $icon = "fas fa-times"; @endphp @else @php $text_color = 'not_accepted-color-btn'; $msg = __('basic.not interested'); $icon = "fas fa-times"; @endphp @endif {{-- --}} @endforeach
{{ __('basic.client') }} {{ __('basic.phone') }} {{ __('basic.project') }} {{ __('basic.campaign') }} {{ __('basic.assigned to') }} {{ __('basic.branch') }} {{ __('basic.last action') }} {{ __('basic.last comment') }} {{ __('basic.handle') }}
{{ $item->full_name }} {{ $item->phone_number }} {{ $msg }} @if($item->project) {{ $item->project->name }} @endif @if($item->campaign) {{ $item->campaign->name }} @endif @if($item->responsible) {{ $item->responsible->full_name}} @endif @if($item->branch) {{ $item->branch->name }} @else {{ __('basic.not selected') }} @endif @if($item->last_leads_action) {{ $item->last_leads_action->name }} @else
{{ __('basic.no action') }}
@endif
{{ $item->last_crm_comment }}
TrueCaller @if (count($item->actions) > 0) @endif
@endsection @section('js') {{-- data table --}} @php $chart_color = ['#323ac8', '#38dfa8','#1a78f1', '#d13c62', '#12c7d9', '#03c2c3', '#5035df', '#17a673', '#2e59d9', '#9aeded', '#f3d56a', '#7c859d', '#a4adc5', '#80142f', '#33d293', '#bed233', '#3958e9', '#10c86f', '#654fb6', '#a44fb6', '#89728e', '#c85110', '#6d769d', '#1b6954', '#204494', '#94206b', '#948320', '#209493', '#292094', '#203a65', '#4e6fa5', '#e29031', '#e23168', '#31e0e2', '#e29131', '#319fe2', '#8131e2', '#31a8e2', '#31e2c0', '#31c3e2', '#e2a931', '#3157e2']; @endphp {{-- leads table --}} @endsection