update
parent
e103de99df
commit
250450d623
|
@ -288,7 +288,7 @@ if (!function_exists('checkPenilaian')) {
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function checkPenilaian($page_number,$sekolah_id = null)
|
function checkPenilaian($page_number,$sekolah_id = null,$type = null)
|
||||||
{
|
{
|
||||||
if(@$sekolah_id){
|
if(@$sekolah_id){
|
||||||
$idSekolah = @$sekolah_id;
|
$idSekolah = @$sekolah_id;
|
||||||
|
@ -296,16 +296,24 @@ if (!function_exists('checkPenilaian')) {
|
||||||
$idSekolah = session('sekolah_id');
|
$idSekolah = session('sekolah_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(session('group_alias') == 'sekolah'){
|
if(@$type == 'kota'){
|
||||||
$penilaian = Penilaian::where('page_number',$page_number)->where('ms_sekolah_id',$idSekolah)->where('status',0)->first();
|
|
||||||
}elseif(session('group_alias') == 'penilai_kota'){
|
|
||||||
$penilaian = Penilaian::where('page_number',$page_number)->where('ms_sekolah_id',$idSekolah)->where('status',1)->first();
|
$penilaian = Penilaian::where('page_number',$page_number)->where('ms_sekolah_id',$idSekolah)->where('status',1)->first();
|
||||||
}elseif(session('group_alias') == 'penilai_provinsi'){
|
}elseif(@$type == 'provinsi'){
|
||||||
$penilaian = Penilaian::where('page_number',$page_number)->where('ms_sekolah_id',$idSekolah)->where('status',2)->first();
|
$penilaian = Penilaian::where('page_number',$page_number)->where('ms_sekolah_id',$idSekolah)->where('status',2)->first();
|
||||||
}else{
|
}else{
|
||||||
$penilaian = Penilaian::where('page_number',$page_number)->where('ms_sekolah_id',$idSekolah)->first();
|
$penilaian = Penilaian::where('page_number',$page_number)->where('ms_sekolah_id',$idSekolah)->where('status',0)->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if(session('group_alias') == 'sekolah'){
|
||||||
|
|
||||||
|
// }elseif(session('group_alias') == 'penilai_kota'){
|
||||||
|
|
||||||
|
// }elseif(session('group_alias') == 'penilai_provinsi'){
|
||||||
|
|
||||||
|
// }else{
|
||||||
|
// $penilaian = Penilaian::where('page_number',$page_number)->where('ms_sekolah_id',$idSekolah)->first();
|
||||||
|
// }
|
||||||
|
|
||||||
// $penilaian = Penilaian::where('page_number',$page_number)->where('ms_sekolah_id',$idSekolah)->first();
|
// $penilaian = Penilaian::where('page_number',$page_number)->where('ms_sekolah_id',$idSekolah)->first();
|
||||||
return @$penilaian ? true : false;
|
return @$penilaian ? true : false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -218,7 +218,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="pageNumber row gap-1 justify-content-center">
|
<div class="pageNumber row gap-1 justify-content-center">
|
||||||
@foreach($page as $hal)
|
@foreach($page as $hal)
|
||||||
<div class="col-3 text-center page {{ (checkPenilaian($hal,$sekolah->MsSekolahId) == true ? 'bg-success-light text-success border-success rounded' : 'border-secondary rounded' )}}" data-number={{$hal}}>
|
<div class="col-3 text-center page {{ (checkPenilaian($hal,$sekolah->MsSekolahId,'kota') == true ? 'bg-success-light text-success border-success rounded' : 'border-secondary rounded' )}}" data-number={{$hal}}>
|
||||||
<span>{{$hal}}</span>
|
<span>{{$hal}}</span>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
|
@ -283,7 +283,7 @@
|
||||||
<div class="col-md-12" style="background: rgba(23, 162, 184, 0.2) !important;">
|
<div class="col-md-12" style="background: rgba(23, 162, 184, 0.2) !important;">
|
||||||
<ul class="pageNumber">
|
<ul class="pageNumber">
|
||||||
@foreach($page as $hal)
|
@foreach($page as $hal)
|
||||||
<li class="page {{ (checkPenilaian($hal,$sekolah->MsSekolahId) == true ? 'bg-success text-white' : '' )}}" data-number={{$hal}}>{{$hal}}</li>
|
<li class="page {{ (checkPenilaian($hal,$sekolah->MsSekolahId,'mandiri') == true ? 'bg-success text-white' : '' )}}" data-number={{$hal}}>{{$hal}}</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
<!-- <li class="resume">Resume</li> -->
|
<!-- <li class="resume">Resume</li> -->
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -283,7 +283,7 @@
|
||||||
<div class="col-md-12" style="background: rgba(23, 162, 184, 0.2) !important;">
|
<div class="col-md-12" style="background: rgba(23, 162, 184, 0.2) !important;">
|
||||||
<ul class="pageNumber">
|
<ul class="pageNumber">
|
||||||
@foreach($page as $hal)
|
@foreach($page as $hal)
|
||||||
<li class="page {{ (checkPenilaian($hal,$sekolah->MsSekolahId) == true ? 'bg-success text-white' : '' )}}" data-number={{$hal}}>{{$hal}}</li>
|
<li class="page {{ (checkPenilaian($hal,$sekolah->MsSekolahId,'nasional') == true ? 'bg-success text-white' : '' )}}" data-number={{$hal}}>{{$hal}}</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
<!-- <li class="resume">Resume</li> -->
|
<!-- <li class="resume">Resume</li> -->
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -222,7 +222,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="pageNumber row gap-1 justify-content-center">
|
<div class="pageNumber row gap-1 justify-content-center">
|
||||||
@foreach($page as $hal)
|
@foreach($page as $hal)
|
||||||
<div class="col-3 text-center page {{ (checkPenilaian($hal,$sekolah->MsSekolahId) == true ? 'bg-success-light text-success border-success rounded' : 'border-secondary rounded' )}}" data-number={{$hal}}>
|
<div class="col-3 text-center page {{ (checkPenilaian($hal,$sekolah->MsSekolahId,'provinsi') == true ? 'bg-success-light text-success border-success rounded' : 'border-secondary rounded' )}}" data-number={{$hal}}>
|
||||||
<span>{{$hal}}</span>
|
<span>{{$hal}}</span>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
Loading…
Reference in New Issue