penilai kedua

This commit is contained in:
afiq
2022-01-11 06:49:04 +08:00
parent e144bcdadc
commit 45867c2f6f
5 changed files with 74 additions and 33 deletions
@@ -66,12 +66,14 @@ class KakitanganController extends Controller
public function kakitanganHarian(Request $request){
$auth_user = Auth::user();
$user_cawangan = User::where('cawangan','=',$auth_user['cawangan'])->get();
$user_cawangan = User::whereIn('roles',['pc','ppc','teller'])->where('cawangan','=',$auth_user['cawangan'])->get();
foreach($user_cawangan as $index=>$user){
if($user['roles'] == 'teller'){
if($user['id'] == $request->penilai){
$role_harian = 'penilai';
}elseif($user['id'] == $request->penilai2){
$role_harian = 'penilai2';
}else{
$role_harian = 'teller';
}