main
Ilham Wara Nugroho 2026-01-15 10:25:46 +07:00
parent 591a7db995
commit c07dd6c56b
1 changed files with 8 additions and 0 deletions

View File

@ -133,6 +133,14 @@ class KuesionerController extends Controller
$keyId = @$id ? decode_id(@$id) : session('sekolah_id');
$data['profile'] = Profile::where('ms_sekolah_id',$keyId)->first();
if(!@$data['profile']->data_jumlah && !@$data['profile']->penghematan_air && !@$data['profile']->penghematan_listrik){
return redirect('profile-sekolah/')->with([
'message' => 'Silahkan lengkapi data profile sekolah',
'type' => 'error',
]);
}
$data['title'] = 'Kuesioner Leveling';
$data['route'] = $this->route;
$kuesioner = Kuesioner::where('ms_sekolah_id',$keyId)->where('tahun',date('Y'))->first();