@extends('superadmin.layout.master') @section('users','active') @section('contant') @php use Carbon\Carbon; $dateEnd14 = Carbon::now()->subDays(14); $dateEnd28 = Carbon::now()->subDays(28); $dateEnd90 = Carbon::now()->subDays(90); $dateStart = Carbon::now(); @endphp

User Settings

{{--
--}}
@if(Session::get('errors')) {!!Session::forget('errors')!!} @endif @if(Session::get('success')) {!!Session::forget('success')!!} @endif
@csrf
{{ $errors->first('name') }}
{{ $errors->first('email') }}
{{--
--}}
{{ $errors->first('password') }}
{{ $errors->first('confirm_password') }}
role_id==2) checked @endif class="custom-control-input" id="Admin">
{{--
--}} {{-- in_training==1) checked @endif class="custom-contro l-input" id="in_training"> --}} {{--
--}}

Simple Line Chart

{{--

Handicap Score

@php if (!empty($all_problems) && $all_problems->where('status','!=','pending')->count() > 0) { $Accuracy = number_format(($all_problems->where('status', 'correct')->count() * 100) / $all_problems->where('status','!=','pending')->count(),2); } else { $Accuracy = 0; } @endphp @php $level = $all_handicap ->where('bottom_range', '<=', $Accuracy) ->where('top_range', '>', $Accuracy) ->first(); @endphp @if ($level) {{ $level->title }} @else Not Available @endif

Accuracy

@php if (!empty($all_problems) && $all_problems->where('status','!=','pending')->count() > 0) { $Accuracy = number_format(($all_problems->where('status', 'correct')->count() * 100) / $all_problems->where('status','!=','pending')->count(),2); } else { $Accuracy = 0; } @endphp {{ $Accuracy . '%' }}

Answers

{{ $all_problems->count() }}
--}}

Last 14 Calendar Days:

Handicap Score

@php if (!empty($all_problems) && $all_problems->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd14)->count() > 0) { $Accuracy = number_format(($all_problems->where('status', 'correct')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd14)->count() * 100) / $all_problems->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd14)->count(),2); } else { $Accuracy = 0; } @endphp @php $level = $all_handicap ->where('bottom_range', '<=', $Accuracy) ->where('top_range', '>', $Accuracy) ->first(); @endphp @if ($level) {{ $level->title }} @else Not Available @endif

Accuracy

{{-- @php if (!empty($all_problems) && $all_problems->where('status','!=','pending')->count() > 0) { $Accuracy = number_format(($all_problems->where('status', 'correct')->count() * 100) / $all_problems->where('status','!=','pending')->count(),2); } else { $Accuracy = 0; } @endphp --}} {{ $Accuracy . '%' }}

Answers

{{ $all_problems->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd14)->count() }}

Days Above 50%

{{ $per_arr[14] }}

Last 28 Calendar Days:

Handicap Score

@php if (!empty($all_problems) && $all_problems->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd28)->count() > 0) { $Accuracy = number_format(($all_problems->where('status', 'correct')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd28)->count() * 100) / $all_problems->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd28)->count(),2); } else { $Accuracy = 0; } @endphp @php $level = $all_handicap ->where('bottom_range', '<=', $Accuracy) ->where('top_range', '>', $Accuracy) ->first(); @endphp @if ($level) {{ $level->title }} @else Not Available @endif

Accuracy

{{-- @php if (!empty($all_problems) && $all_problems->where('status','!=','pending')->count() > 0) { $Accuracy = number_format(($all_problems->where('status', 'correct')->count() * 100) / $all_problems->where('status','!=','pending')->count(),2); } else { $Accuracy = 0; } @endphp --}} {{ $Accuracy . '%' }}

Answers

{{ $all_problems->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd28)->count() }}

Days Above 50%

{{ $per_arr[28] }}

Last 90 Calendar Days:

Handicap Score

@php if (!empty($all_problems) && $all_problems->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd90)->count() > 0) { $Accuracy = number_format(($all_problems->where('status', 'correct')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd90)->count() * 100) / $all_problems->where('status','!=','pending')->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd90)->count(),2); } else { $Accuracy = 0; } @endphp @php $level = $all_handicap ->where('bottom_range', '<=', $Accuracy) ->where('top_range', '>', $Accuracy) ->first(); @endphp @if ($level) {{ $level->title }} @else Not Available @endif

Accuracy

{{-- @php if (!empty($all_problems) && $all_problems->where('status','!=','pending')->count() > 0) { $Accuracy = number_format(($all_problems->where('status', 'correct')->count() * 100) / $all_problems->where('status','!=','pending')->count(),2); } else { $Accuracy = 0; } @endphp --}} {{ $Accuracy . '%' }}

Answers

{{ $all_problems->where('created_at','<=', $dateStart)->where('created_at','>=', $dateEnd90)->count() }}

Days Above 50%

{{ $per_arr[90] }}

All Time:

Handicap Score

@php if (!empty($all_problems) && $all_problems->where('status','!=','pending')->count() > 0) { $Accuracy = number_format(($all_problems->where('status', 'correct')->count() * 100) / $all_problems->where('status','!=','pending')->count(),2); } else { $Accuracy = 0; } @endphp @php $level = $all_handicap ->where('bottom_range', '<=', $Accuracy) ->where('top_range', '>', $Accuracy) ->first(); @endphp @if ($level) {{ $level->title }} @else Not Available @endif

Accuracy

{{-- @php if (!empty($all_problems) && $all_problems->where('status','!=','pending')->count() > 0) { $Accuracy = number_format(($all_problems->where('status', 'correct')->count() * 100) / $all_problems->where('status','!=','pending')->count(),2); } else { $Accuracy = 0; } @endphp --}} {{ $Accuracy . '%' }}

Answers

{{ $all_problems->count() }}

Days Above 50%

{{ $per_arr[$days] }}
@endsection @push('script') @endpush