@extends('layouts.vertical', ["page_title"=> "Dashboard", "mode" => $mode ?? "", "demo" => $demo ?? ""]) @section('css') @endsection @section('content')
{!!$graph->agg_type == 'team' ? '' : '' !!} {{ucwords($graph->agg_type)}} Report
{{ucwords($graph->type)}} Metric
Report Validity: {{$graph->valid_from}} to {{$graph->valid_till}}
Date Range Selected: {{$graph->first_day}} to {{$graph->last_day}}
| Rank | User | Designation | Total | Active User | @if(count($graph->values) > 0 && isset($graph->values[0]->stats->prescribers) )Prescribers | @endif @foreach($graph->metrics as $val){{$val->display}} | @endforeach|||
|---|---|---|---|---|---|---|---|---|---|
| {{$val->user->name}} | {{$val->user->designation}} | @if($graph->type == 'verses'){{isset($val->actual)?$val->actual:0}} / {{isset($val->target)?$val->target:0}} | {{round($val->score, 2)}}% | @else{{round($val->score, 2)}} | {{ isset($val->stats->ucount) ? $val->stats->ucount : '0' }} | @if(isset($val->stats->prescribers) ){{ $val->stats->prescribers }} | @endif @foreach($graph->metrics as $m){{ isset($val->stats->{$m->metric}) ? $val->stats->{$m->metric} : '-' }} | @endforeach @endif||
| Periods | {{$graph->label}} |
|---|---|
| {{$val->x}} | {{$val->y}} |
| Periods | @foreach($graph->values as $met){{$met->metric}} | @endforeach
|---|---|
| {{$stat->x}} | @foreach($graph->values as $met){{isset($met->stats[$i])?$met->stats[$i]->y:0}} | @endforeach
| User | Employee Code | @if(!isset($graph->show_positions) || (isset($graph->show_positions) && $graph->show_positions))Zone | Region | Area | Territory | @endifRole | @foreach($graph->values->metrics as $metric){{$metric->metric}} | @endforeach|
|---|---|---|---|---|---|---|---|---|
| {{ $user->name }} {{$user->designation}} |
{{ isset($user->employee_code) ? $user->employee_code:''}} | @if(!isset($graph->show_positions) || (isset($graph->show_positions) && $graph->show_positions)){{ isset($user->positions->Zone) ? $user->positions->Zone : '-' }} | {{ isset($user->positions->Region) ? $user->positions->Region : '-' }} | {{ isset($user->positions->Area) ? $user->positions->Area : '-' }} | {{ isset($user->positions->Territory) ? $user->positions->Territory : '-' }} | @endif{{ isset($user->roles) ? (is_array($user->roles) ? implode(',', $user->roles) : $user->roles) : '-' }} | @foreach($graph->values->metrics as $metric){{ isset($metric->stats->{$user->id}) ? $metric->stats->{$user->id} : '-' }} @endforeach | |
| Doctor | MSL Code | @foreach($graph->contact_attributes as $attr){{ucwords($attr)}} | @endforeachUser | Employee Code | Zone | Region | Area | Territory | @foreach($graph->values->metrics as $metric){{$metric->metric}} | @endforeach
|---|---|---|---|---|---|---|---|---|---|
| {{ $contact->name }} | {{ $contact->msl_code }} | @foreach($graph->contact_attributes as $attr){{ isset($contact->{$attr}) ? $contact->{$attr} : '' }} | @endforeach @php $user = $graph->values->users->{$contact->id}; @endphp{{ $user->name }} {{$user->designation}} |
{{ isset($user->employee_code) ? $user->employee_code:''}} | {{ isset($user->positions->Zone) ? $user->positions->Zone : '-' }} | {{ isset($user->positions->Region) ? $user->positions->Region : '-' }} | {{ isset($user->positions->Area) ? $user->positions->Area : '-' }} | {{ isset($user->positions->Territory) ? $user->positions->Territory : '-' }} | @foreach($graph->values->metrics as $metric){{ isset($metric->stats->{$contact->id}) ? $metric->stats->{$contact->id} : '-' }} @endforeach |
| Periods | Actual | Target | Percent |
|---|---|---|---|
| {{$val->x}} | {{$val->actual}} | {{$val->target}} | {{$val->y}}% |
| Periods | Actual | Target |
|---|---|---|
| {{$val->x}} | {{$val->actual}} | {{$val->target}} |