Siti Rahayu 4 роки тому
джерело
коміт
983449b13c

+ 1
- 1
app/Http/Controllers/Api/CompoundResourceController.php Переглянути файл

$compound = $this->filterCompoundByEnforcer($enforcer,$jenis,$modul,$status,$start_date,$end_date,$day3, $day7); $compound = $this->filterCompoundByEnforcer($enforcer,$jenis,$modul,$status,$start_date,$end_date,$day3, $day7);


if($faulty == 'All'){ if($faulty == 'All'){
$compound = $compound->whereIn('jbkod', $department, 'or')->whereIn('jbkod_n', $department);
$compound = $compound->whereIn('jbkod', $department);


return $compound; return $compound;
}else { }else {

+ 13
- 12
app/Http/Controllers/Main/TaskController.php Переглянути файл



if($request->dashboard == "true"){ if($request->dashboard == "true"){


if($request->modul == '02')
{
$compound = Compound::with('ConfidentialFile')->where('confidential_file_id',$request->confidential_id)->first();
$faulty = Faulty::with('DeedLaw', 'Department') ->where('_id', $compound->seksyen_kesalahan_n)->first();
$jbkod = $compound->jbkod_n;
}
else{
// if($request->modul == '02')
// {
// $compound = Compound::with('ConfidentialFile')->where('confidential_file_id',$request->confidential_id)->first();
// $faulty = Faulty::with('DeedLaw', 'Department') ->where('_id', $compound->seksyen_kesalahan_n)->first();
// $jbkod = $compound->jbkod_n;
// }
// else{
$compound = Compound::with('ConfidentialFile')->where('kpd',$request->kpd)->first(); $compound = Compound::with('ConfidentialFile')->where('kpd',$request->kpd)->first();
$faulty = Faulty::with('DeedLaw', 'Department') ->where('_id', $compound->seksyen_kesalahan)->first();
$faulty = Faulty::with('DeedLaw', 'Department') ->where('_id', $compound->seksyen_kesalahan)
->orWhere('_id', $compound->seksyen_kesalahan_n)->first();
$jbkod = $compound->jbkod; $jbkod = $compound->jbkod;
}
// }


$roles = Roles::where('kod', $request->kategori_modul)->first(); $roles = Roles::where('kod', $request->kategori_modul)->first();


{ {
$compound = Compound::with('ConfidentialFile')->where('non',$request->non)->first(); $compound = Compound::with('ConfidentialFile')->where('non',$request->non)->first();
$faulty = Faulty::where('_id', $compound->seksyen_kesalahan_n)->first(); $faulty = Faulty::where('_id', $compound->seksyen_kesalahan_n)->first();
$department = Department::where('_id', $compound->jbkod_n)->first();
$department = Department::where('_id', $compound->jbkod)->first();
$deedlaw = DeedLaw::where('_id', $compound->akta_n)->first(); $deedlaw = DeedLaw::where('_id', $compound->akta_n)->first();
$jbkod = $compound->jbkod_n;
$jbkod = $compound->jbkod;
$kpd = $compound->non; $kpd = $compound->non;


// dd($faulty); // dd($faulty);
$faulty = Faulty::with('DeedLaw')->where('_id',$compound->seksyen_kesalahan)->first(); $faulty = Faulty::with('DeedLaw')->where('_id',$compound->seksyen_kesalahan)->first();
$faultyN = Faulty::with('DeedLaw')->where('_id', $compound->seksyen_kesalahan_n)->first(); $faultyN = Faulty::with('DeedLaw')->where('_id', $compound->seksyen_kesalahan_n)->first();
$department = Department::where('_id', $compound->jbkod)->first(); $department = Department::where('_id', $compound->jbkod)->first();
$departmentN = Department::where('_id', $compound->jbkod_n)->first();
$departmentN = Department::where('_id', $compound->jbkod)->first();


info($faultyN); info($faultyN);



+ 0
- 4
app/Model/Module/Compound.php Переглянути файл

return $this->belongsTo('App\Model\Module\Department', 'jbkod', '_id'); return $this->belongsTo('App\Model\Module\Department', 'jbkod', '_id');
} }


public function departmentNotis(){
return $this->belongsTo('App\Model\Module\Department', 'jbkod_n', '_id');
}

public function deedlaw(){ public function deedlaw(){
return $this->belongsTo('App\Model\Module\DeedLaw', 'akta', '_id'); return $this->belongsTo('App\Model\Module\DeedLaw', 'akta', '_id');
} }

Завантаження…
Відмінити
Зберегти