Health Risk
@switch($level->score->health_risk_level)
@case('very low')
Very Low
@break
@case('low')
Low
@break
@case('medium')
Medium
@break
@case('high')
High
@break
@case('very high')
Very High
@break
@default
@endswitch
@elseif($types == 'financial')
Financial Risk
@switch($level->score->financial_risk_level)
@case('very low')
Very Low
@break
@case('low')
Low
@break
@case('medium')
Medium
@break
@case('high')
High
@break
@case('very high')
Very High
@break
@default
@endswitch
@endif
@endforeach
@endforeach
@foreach($scores as $level)
@foreach($selectedtypes as $types)
@if($types == 'overall')
@switch($level->score->final_risk_level)
@case('very low')
@break
@case('low')
@break
@case('medium')
@break
@case('high')
@break
@case('very high')
@break
@default
@endswitch
@endif
@endforeach
@endforeach
@php $promdata = array(); @endphp
@php $prombg = array(); @endphp
@foreach($scores as $level)
@foreach($selectedtypes as $types)
@if($types == 'behavior')
@switch($level->score->behavior_consistency_risk_level)
@case('very low')
@php $promdata[] = 2000; @endphp
@php $prombg[] = '#7ed957'; @endphp
@break
@case('low')
@php $promdata[] = 4000; @endphp
@php $prombg[] = '#70c5d8'; @endphp
@break
@case('medium')
@php $promdata[] = 6000; @endphp
@php $prombg[] = '#fecd56'; @endphp
@break
@case('high')
@php $promdata[] = 8000; @endphp
@php $prombg[] = '#ff7c1f'; @endphp
@break
@case('very high')
@php $promdata[] = 10000; @endphp
@php $prombg[] = '#ff1616'; @endphp
@break
@default
@php $promdata[] = 0; @endphp
@php $prombg[] = '#7ed957'; @endphp
@endswitch
@elseif($types == 'lifestyle')
@switch($level->score->life_style_risk_level)
@case('very low')
@php $promdata[] = 2000; @endphp
@php $prombg[] = '#7ed957'; @endphp
@break
@case('low')
@php $promdata[] = 4000; @endphp
@php $prombg[] = '#70c5d8'; @endphp
@break
@case('medium')
@php $promdata[] = 6000; @endphp
@php $prombg[] = '#fecd56'; @endphp
@break
@case('high')
@php $promdata[] = 8000; @endphp
@php $prombg[] = '#ff7c1f'; @endphp
@break
@case('very high')
@php $promdata[] = 10000; @endphp
@php $prombg[] = '#ff1616'; @endphp
@break
@default
@php $promdata[] = 0; @endphp
@php $prombg[] = '#7ed957'; @endphp
@endswitch
@elseif($types == 'health')
@switch($level->score->health_risk_level)
@case('very low')
@php $promdata[] = 2000; @endphp
@php $prombg[] = '#7ed957'; @endphp
@break
@case('low')
@php $promdata[] = 4000; @endphp
@php $prombg[] = '#70c5d8'; @endphp
@break
@case('medium')
@php $promdata[] = 6000; @endphp
@php $prombg[] = '#fecd56'; @endphp
@break
@case('high')
@php $promdata[] = 8000; @endphp
@php $prombg[] = '#ff7c1f'; @endphp
@break
@case('very high')
@php $promdata[] = 10000; @endphp
@php $prombg[] = '#ff1616'; @endphp
@break
@default
@php $promdata[] = 0; @endphp
@php $prombg[] = '#7ed957'; @endphp
@endswitch
@elseif($types == 'financial')
@switch($level->score->financial_risk_level)
@case('very low')
@php $promdata[] = 2000; @endphp
@php $prombg[] = '#7ed957'; @endphp
@break
@case('low')
@php $promdata[] = 4000; @endphp
@php $prombg[] = '#70c5d8'; @endphp
@break
@case('medium')
@php $promdata[] = 6000; @endphp
@php $prombg[] = '#fecd56'; @endphp
@break
@case('high')
@php $promdata[] = 8000; @endphp
@php $prombg[] = '#ff7c1f'; @endphp
@break
@case('very high')
@php $promdata[] = 10000; @endphp
@php $prombg[] = '#ff1616'; @endphp
@break
@default
@php $promdata[] = 0; @endphp
@php $prombg[] = '#7ed957'; @endphp
@endswitch
@elseif($types == 'overall')
@switch($level->score->final_risk_level)
@case('very low')
@php $promdata[] = 2000; @endphp
@php $prombg[] = '#7ed957'; @endphp
@break
@case('low')
@php $promdata[] = 4000; @endphp
@php $prombg[] = '#70c5d8'; @endphp
@break
@case('medium')
@php $promdata[] = 6000; @endphp
@php $prombg[] = '#fecd56'; @endphp
@break
@case('high')
@php $promdata[] = 8000; @endphp
@php $prombg[] = '#ff7c1f'; @endphp
@break
@case('very high')
@php $promdata[] = 10000; @endphp
@php $prombg[] = '#ff1616'; @endphp
@break
@default
@php $promdata[] = 0; @endphp
@php $prombg[] = '#7ed957'; @endphp
@endswitch
@endif
@endforeach
@endforeach
Risk Distribution
@foreach($selectedtypes as $types)
@if($types == 'behavior')
Behavior Risk
@elseif($types == 'lifestyle')
Lifestyle Risk
@elseif($types == 'health')
Health Risk
@elseif($types == 'financial')
Finance Risk
@elseif($types == 'overall')
Overall Risk
@endif
@endforeach
@foreach($selectedtypes as $types)
@if($types == 'behavior')
@elseif($types == 'lifestyle')
@elseif($types == 'health')
@elseif($types == 'financial')
@elseif($types == 'overall')
@endif
@endforeach
User Risks
@foreach($selectedtypes as $types)
@if($types == 'behavior')
@elseif($types == 'lifestyle')
@elseif($types == 'health')
@elseif($types == 'financial')
@elseif($types == 'overall')
@endif
@endforeach
Risk Radar
@foreach($selectedtypes as $types)
@if($types == 'behavior')
@elseif($types == 'lifestyle')
@elseif($types == 'health')
@elseif($types == 'financial')
@elseif($types == 'overall')
@endif
@endforeach
@php $labels = array(); @endphp
@php $labelstwo = array(); @endphp
@php $radardata = array(); @endphp
@php $radarcolor = array(); @endphp
@php $verylow = array(); @endphp
@php $low = array(); @endphp
@php $medium = array(); @endphp
@php $high = array(); @endphp
@php $veryhigh = array(); @endphp
@php $doughnutdata = array(); @endphp
@foreach($selectedtypes as $types)
@if($types == 'behavior')
@php $labels[] = 'Behavior Risk'; @endphp
@php $labelstwo[] = 'Behavior Consistency'; @endphp
@php $radardata[] = number_format($scores[0]->score->behavior_consistency_score, 6); @endphp
@php $radarcolor[] = '#FF6384'; @endphp
@php $verylow[] = 62; @endphp
@php $low[] = 15; @endphp
@php $medium[] = 19; @endphp
@php $high[] = 1; @endphp
@php $veryhigh[] = 3; @endphp
@php $doughnutdata[] = array('data' => [62, 15, 19, 1, 3], 'backgroundColor' => ["#3faa59", "#b3df72", "#fffebe", "#fdbb6c", "#e54e35"], 'label' => 'Behavior Consistency Risk'); @endphp
@elseif($types == 'lifestyle')
@php $labels[] = 'Life Style Risk'; @endphp
@php $labelstwo[] = 'Life Style'; @endphp
@php $radardata[] = number_format($scores[0]->score->life_style_class_score, 6); @endphp
@php $radarcolor[] = '#4BC0C0'; @endphp
@php $verylow[] = 44; @endphp
@php $low[] = 43; @endphp
@php $medium[] = 9; @endphp
@php $high[] = 4; @endphp
@php $veryhigh[] = 0; @endphp
@php $doughnutdata[] = array('data' => [44, 43, 9, 4, 0], 'backgroundColor' => ["#3faa59", "#b3df72", "#fffebe", "#fdbb6c", "#e54e35"], 'label' => 'Life Style Risk'); @endphp
@elseif($types == 'health')
@php $labels[] = 'Health Risk'; @endphp
@php $labelstwo[] = 'Health'; @endphp
@php $radardata[] = number_format($scores[0]->score->health_class_score, 6); @endphp
@php $radarcolor[] = '#FFCE56'; @endphp
@php $verylow[] = 53; @endphp
@php $low[] = 19; @endphp
@php $medium[] = 25; @endphp
@php $high[] = 3; @endphp
@php $veryhigh[] = 0; @endphp
@php $doughnutdata[] = array('data' => [53, 19, 25, 3, 0], 'backgroundColor' => ["#3faa59", "#b3df72", "#fffebe", "#fdbb6c", "#e54e35"], 'label' => 'Health Risk'); @endphp
@elseif($types == 'financial')
@php $labels[] = 'Financial Risk'; @endphp
@php $labelstwo[] = 'Financial'; @endphp
@php $radardata[] = number_format($scores[0]->score->financial_class_score, 6); @endphp
@php $radarcolor[] = '#36A2EB'; @endphp
@php $verylow[] = 6; @endphp
@php $low[] = 49; @endphp
@php $medium[] = 37; @endphp
@php $high[] = 4; @endphp
@php $veryhigh[] = 4; @endphp
@php $doughnutdata[] = array('data' => [6, 49, 37, 4, 4], 'backgroundColor' => ["#3faa59", "#b3df72", "#fffebe", "#fdbb6c", "#e54e35"], 'label' => 'Financial Risk'); @endphp
@elseif($types == 'overall')
@php $labels[] = 'Overall Risk'; @endphp
@php $verylow[] = 13; @endphp
@php $low[] = 54; @endphp
@php $medium[] = 26; @endphp
@php $high[] = 5; @endphp
@php $veryhigh[] = 2; @endphp
@php $doughnutdata[] = array('data' => [13, 54, 26, 5, 2], 'backgroundColor' => ["#3faa59", "#b3df72", "#fffebe", "#fdbb6c", "#e54e35"], 'label' => 'Overall Risk'); @endphp
@endif
@endforeach
@endif