IPR Ditawarkan
@php
$ipr_ditawarkan = App\Profile::where('ic', Auth::user()->username)->count();
$ipr_ditawarkan = 0;
$ptrs = 'tidak';
$pbss = 'tidak';
$profile_count = App\Profile::where('ic', Auth::user()->username)->count();
foreach ($iprs as $ipr) {
switch ($ipr->name) {
case 'ptrs':
$ipr_ditawarkan = $ipr_ditawarkan + 1;
$ptrs = 'ya';
break;
// case 'pbss':
// $ipr_ditawarkan = $ipr_ditawarkan + 1;
// $pbss = 'ya';
// break;
default:
break;
}
}
@endphp
{{ number_format($ipr_ditawarkan) }}
-
IPR Ditawarkan
@if($ptrs == 'ya')
-
@php
$ipr = App\IPR::where('name', 'ptrs')->first();
@endphp
{{ $ipr->display_name }}
@endif
IPR Dimohon
@php
$ipr_dimohon_count = 0;
$ptrs = false;
$pbss = false;
foreach ($iprs as $ipr) {
if($ipr->name == 'ptrs') {
$get_id = App\PTRS\SchoolDetailPTRS::where('user_id', Auth::user()->id)->whereNull('status_sekolah')->count();
if($get_id > 0) {
$ipr_dimohon_count = $ipr_dimohon_count + 1;
$ptrs = true;
} else {
$ptrs = false;
}
}
if($ipr->name == 'pbss') {
$get_id = App\PermohonanPbss::where('user_id', Auth::user()->id)->where('status_permohonan', 0)->orWhere('status_permohonan', 1)->count();
if($get_id > 0) {
$ipr_dimohon_count = $ipr_dimohon_count + 1;
$pbss = true;
} else {
$pbss = false;
}
}
}
@endphp
{{ number_format($ipr_dimohon_count) }}
-
IPR Dimohon
@if($ptrs == true)
-
@php
$ipr = App\IPR::where('name', 'ptrs')->first();
@endphp
{{ $ipr->display_name }}
@endif
IPR Lulus
@php
$ipr_lulus_count = 0;
$ptrs = 'gagal';
$pbss = 'gagal';
foreach($iprs as $ipr) {
if($ipr->name == 'ptrs') {
$get_id = App\PTRS\SchoolDetailPTRS::where('user_id', Auth::user()->id)->where('status_sekolah', '=', 'Lulus')->count();
if($get_id > 0) {
$ipr_lulus_count = $ipr_lulus_count + 1;
$ptrs = 'berjaya';
} else {
$ptrs = 'gagal';
}
}
if($ipr->name == 'pbss') {
$get_id = App\PermohonanPbss::where('user_id', Auth::user()->id)->where('status_permohonan', 2)->count();
if($get_id > 0) {
$ipr_lulus_count = $ipr_lulus_count + 1;
$pbss = 'berjaya';
} else {
$pbss = 'gagal';
}
}
}
@endphp
{{ number_format($ipr_lulus_count) }}
-
IPR Lulus
@if($ptrs == 'berjaya')
-
@php
$ipr = App\IPR::where('name', 'ptrs')->first();
@endphp
{{ $ipr->display_name }}
@endif
IPR Ditolak
@php
$ipr_ditolak_count = 0;
$ptrs = 'layak';
$pbss = 'layak';
foreach($iprs as $ipr) {
if($ipr->name == 'ptrs') {
$get_id = App\PTRS\SchoolDetailPTRS::where('user_id', Auth::user()->id)->where('status_sekolah','=','Gagal')->count();
if($get_id > 0) {
$ipr_ditolak_count = $ipr_ditolak_count + 1;
$ptrs = 'gagal';
} else {
$ptrs = 'layak';
}
}
if($ipr->name == 'pbss') {
$get_id = App\PermohonanPbss::where('user_id', Auth::user()->id)->where('status_permohonan', 3)->count();
if($get_id > 0) {
$ipr_ditolak_count = $ipr_ditolak_count + 1;
$pbss = 'gagal';
} else {
$pbss = 'layak';
}
}
}
@endphp
{{ number_format($ipr_ditolak_count) }}
-
IPR Ditolak
@if($ptrs == 'gagal')
-
@php
$ipr = App\IPR::where('name', 'ptrs')->first();
@endphp
{{ $ipr->display_name }}
@endif