@extends('layouts.app') @section('title', __('crm::lang.crm')) @section('content') @include('crm::layouts.nav')

@lang('crm::lang.crm')

@lang('home.welcome_message', ['name' => Session::get('user.first_name')])

{{-- Personal stats --}}
@if(auth()->user()->can('crm.access_all_schedule') || auth()->user()->can('crm.access_own_schedule'))
{{ __('crm::lang.todays_followups') }} {{ $todays_followups }}
@endif @if(auth()->user()->can('crm.access_all_leads') || auth()->user()->can('crm.access_own_leads'))
{{ __('crm::lang.my_leads') }} {{ $my_leads }}
@endif
{{ __('crm::lang.my_leads_to_customer_conversion') }} {{ $my_conversion }}
@if(auth()->user()->can('crm.access_all_schedule') || auth()->user()->can('crm.access_own_schedule'))

@lang('crm::lang.my_followups')

@foreach($statuses as $key => $value) @endforeach @if(isset($my_follow_ups_arr['__other'])) @endif
{{$value}} {{ $my_follow_ups_arr[$key] ?? 0 }}
@lang('lang_v1.others') {{ $my_follow_ups_arr['__other'] }}
@endif @if(config('constants.enable_crm_call_log'))

@lang('crm::lang.my_call_logs')

@lang('crm::lang.calls_today') {{ $my_call_logs->calls_today ?? 0 }}
@lang('crm::lang.calls_yesterday') {{ $my_call_logs->calls_yesterday ?? 0 }}
@lang('crm::lang.calls_this_month') {{ $my_call_logs->calls_this_month ?? 0 }}
@endif
@if($is_admin)
{{ __('lang_v1.customers') }} {{ $total_customers }}
{{ __('crm::lang.leads') }} {{ $total_leads }}
{{ __('crm::lang.sources') }} {{ $total_sources }}
{{ __('crm::lang.life_stages') }} {{ $total_life_stage }}

@lang('crm::lang.sources')

@forelse($sources as $source) @empty @endforelse
{{ __('crm::lang.sources') }} {{ __('sale.total') }} {{ __('crm::lang.conversion') }}
{{ $source->name }} {{ $leads_count_by_source[$source->id]['count'] ?? 0 }} @if(!empty($customers_count_by_source[$source->id]) && !empty($contacts_count_by_source[$source->id])) @php $conversion = ($customers_count_by_source[$source->id]['count'] / $contacts_count_by_source[$source->id]['count']) * 100; @endphp {{ round($conversion) }}% @else 0% @endif
@lang('lang_v1.no_data')

@lang('crm::lang.life_stages')

@forelse($life_stages as $life_stage) @empty @endforelse
{{ __('crm::lang.life_stages') }} {{ __('sale.total') }}
{{ $life_stage->name }} {{ !empty($leads_by_life_stage[$life_stage->id]) ? count($leads_by_life_stage[$life_stage->id]) : 0 }}
@lang('lang_v1.no_data')

@lang('crm::lang.birthdays')

@lang('crm::lang.send_wishes')
@forelse($todays_birthdays as $birthday) @empty @endforelse
@lang('home.today')
# @lang('user.name')
@lang('lang_v1.no_data')
@if(!empty($upcoming_birthdays))
@endif @forelse($upcoming_birthdays as $birthday) @empty @endforelse
@lang('crm::lang.upcoming')
# @lang('user.name') @lang('crm::lang.birthday_on')
{{ $birthday['dob_display'] }}
@lang('lang_v1.no_data')

@lang('crm::lang.follow_ups_by_user')

{!! Form::label('follow_up_user_date_range', __('report.date_range') . ':') !!} {!! Form::text('follow_up_user_date_range', null, ['placeholder' => __('lang_v1.select_a_date_range'), 'class' => 'form-control', 'readonly']); !!}
{!! Form::label('followup_category_id', __('crm::lang.followup_category') .':') !!} {!! Form::select('followup_category_id', $followup_category, null, ['class' => 'form-control select2', 'style' => 'width: 100%;', 'placeholder' => __('messages.all')]); !!}
@foreach($statuses as $key => $value) @endforeach
@lang('role.user'){{ $value }}@lang('lang_v1.none') @lang('crm::lang.total_follow_ups')

@lang('crm::lang.lead_to_customer_conversion')

  @lang('crm::lang.converted_by') @lang('sale.total')
@if(config('constants.enable_crm_call_log'))

@lang('crm::lang.all_users_call_log')

@lang('role.user') @lang('crm::lang.calls_today') @lang('crm::lang.calls_this_month') @lang('lang_v1.all')
@endif
@endif
@endsection @section('javascript') @include('crm::reports.report_javascripts') @endsection