update
							parent
							
								
									e103de99df
								
							
						
					
					
						commit
						250450d623
					
				|  | @ -288,7 +288,7 @@ if (!function_exists('checkPenilaian')) { | |||
|      * | ||||
|      * @return string | ||||
|      */ | ||||
|     function checkPenilaian($page_number,$sekolah_id = null) | ||||
|     function checkPenilaian($page_number,$sekolah_id = null,$type = null) | ||||
|     { | ||||
|         if(@$sekolah_id){ | ||||
|             $idSekolah = @$sekolah_id; | ||||
|  | @ -296,16 +296,24 @@ if (!function_exists('checkPenilaian')) { | |||
|             $idSekolah = session('sekolah_id'); | ||||
|         } | ||||
| 
 | ||||
|         if(session('group_alias') == 'sekolah'){ | ||||
|             $penilaian = Penilaian::where('page_number',$page_number)->where('ms_sekolah_id',$idSekolah)->where('status',0)->first(); | ||||
|         }elseif(session('group_alias') == 'penilai_kota'){ | ||||
|         if(@$type == 'kota'){ | ||||
|             $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(); | ||||
|         }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();   
 | ||||
|         return @$penilaian ? true : false; | ||||
|     } | ||||
|  |  | |||
|  | @ -218,7 +218,7 @@ | |||
|                                                     </div> | ||||
|                                                     <div class="pageNumber row gap-1 justify-content-center"> | ||||
|                                                         @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> | ||||
|                                                         </div> | ||||
|                                                         @endforeach | ||||
|  |  | |||
|  | @ -283,7 +283,7 @@ | |||
|                                         <div class="col-md-12" style="background: rgba(23, 162, 184, 0.2) !important;"> | ||||
|                                             <ul class="pageNumber"> | ||||
|                                                 @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 | ||||
|                                                 <!-- <li class="resume">Resume</li> --> | ||||
|                                             </ul> | ||||
|  |  | |||
|  | @ -283,7 +283,7 @@ | |||
|                                         <div class="col-md-12" style="background: rgba(23, 162, 184, 0.2) !important;"> | ||||
|                                             <ul class="pageNumber"> | ||||
|                                                 @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 | ||||
|                                                 <!-- <li class="resume">Resume</li> --> | ||||
|                                             </ul> | ||||
|  |  | |||
|  | @ -222,7 +222,7 @@ | |||
|                                                     </div> | ||||
|                                                     <div class="pageNumber row gap-1 justify-content-center"> | ||||
|                                                         @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> | ||||
|                                                         </div> | ||||
|                                                         @endforeach | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue