IPR Ditawarkan
@php
$ipr_ditawarkan = App\Profile::where('ic', Auth::user()->username)->count();
$ipr_ditawarkan = 0;
$ceria = 'tidak';
$profile_count = App\Profile::where('ic', Auth::user()->username)->count();
foreach ($iprs as $ipr) {
switch ($ipr->name) {
case 'ceria':
//if($profile_count > 0 && Auth::user()->profile->pendapatan <= 4000) {}
$ipr_ditawarkan = $ipr_ditawarkan + 1;
$ceria = 'ya';
break;
}
}
@endphp
{{ number_format($ipr_ditawarkan) }}
-
IPR Ditawarkan
@if($ceria == 'ya')
-
@php
$ipr = App\IPR::where('name', 'ceria')->first();
@endphp
{{ $ipr->display_name }}
@endif
IPR Dimohon
@php
$ipr_dimohon_count = 0;
$ceria = false;
foreach ($iprs as $ipr) {
if($ipr->name == 'ceria') {
$get_id = App\PermohonanCeria::where('id_permohonan', Auth::user()->id)->where('status', 1)->count();
if($get_id > 0) {
$ipr_dimohon_count = $ipr_dimohon_count + 1;
$ceria = true;
} else {
$ceria = false;
}
}
}
@endphp
{{ number_format($ipr_dimohon_count) }}
-
IPR Dimohon
@if($ceria == true)
-
@php
$ipr = App\IPR::where('name', 'ceria')->first();
@endphp
{{ $ipr->display_name }}
@endif
IPR Lulus
@php
$ipr_lulus_count = 0;
$ceria = 'gagal';
foreach($iprs as $ipr) {
if($ipr->name == 'ceria') {
$get_id = App\PermohonanCeria::where('id_permohonan', Auth::user()->id)->where('status', 2)->count();
if($get_id > 0) {
$ipr_lulus_count = $ipr_lulus_count + 1;
$ceria = 'berjaya';
} else {
$ceria = 'gagal';
}
}
}
@endphp
{{ number_format($ipr_lulus_count) }}
-
IPR Lulus
@if($ceria == 'berjaya')
-
@php
$ipr = App\IPR::where('name', 'ceria')->first();
@endphp
{{ $ipr->display_name }}
@endif
IPR Ditolak
@php
$ipr_ditolak_count = 0;
$ceria = 'layak';
foreach($iprs as $ipr) {
if($ipr->name == 'ceria') {
$get_id = App\PermohonanCeria::where('id_permohonan', Auth::user()->id)->where('status', 3)->count();
if($get_id > 0) {
$ipr_ditolak_count = $ipr_ditolak_count + 1;
$ceria = 'gagal';
} else {
$ceria = 'layak';
}
}
}
@endphp
{{ number_format($ipr_ditolak_count) }}
-
IPR Ditolak
@if($ceria == 'gagal')
-
@php
$ipr = App\IPR::where('name', 'ceria')->first();
@endphp
{{ $ipr->display_name }}
@endif