@extends('layouts.app') @section('title', __('crm::lang.crm')) @section('content') @include('crm::layouts.nav')
@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}} @if(isset($my_follow_ups_arr[$key])) {{$my_follow_ups_arr[$key]}} @else 0 @endif
@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}}
@forelse($sources as $source) @empty @endforelse
{{ __('crm::lang.sources') }} {{ __('sale.total') }} {{ __('crm::lang.conversion') }}
{{$source->name}} @if(!empty($leads_count_by_source[$source->id])) {{$leads_count_by_source[$source->id]['count']}} @else 0 @endif @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 {{$conversion . '%'}} @else {{'0 %'}} @endif
@lang('lang_v1.no_data')
@forelse($life_stages as $life_stage) @empty @endforelse
{{ __('crm::lang.life_stages') }} {{ __('sale.total') }}
{{$life_stage->name}} @if(!empty($leads_by_life_stage[$life_stage->id])){{count($leads_by_life_stage[$life_stage->id])}} @else 0 @endif
@lang('lang_v1.no_data')

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

@lang('crm::lang.send_wishes')
@forelse($todays_birthdays as $key => $birthday) @empty @endforelse
@lang('home.today')
# @lang('user.name')
@lang('lang_v1.no_data')
@if(!empty($upcoming_birthdays))
@endif @forelse($upcoming_birthdays as $key => $birthday) @empty @endforelse
@lang('crm::lang.upcoming')
# @lang('user.name') @lang('crm::lang.birthday_on')
{{Carbon::createFromFormat('m-d', $birthday['dob'])->format('jS M')}}
@lang('lang_v1.no_data')

@component('components.widget', ['class' => 'box-solid', 'title' => __('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')
@endcomponent
@component('components.widget', ['class' => 'box-solid', 'title' => __('crm::lang.lead_to_customer_conversion')])
  @lang('crm::lang.converted_by') @lang('sale.total')
@endcomponent
@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('css') @stop @section('javascript') @include('crm::reports.report_javascripts') @endsection