浏览代码

remove jbkod_n

master
Siti Rahayu 4 年前
父节点
当前提交
983449b13c

+ 1
- 1
app/Http/Controllers/Api/CompoundResourceController.php 查看文件

@@ -152,7 +152,7 @@ class CompoundResourceController extends BaseController
$compound = $this->filterCompoundByEnforcer($enforcer,$jenis,$modul,$status,$start_date,$end_date,$day3, $day7);

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

return $compound;
}else {

+ 13
- 12
app/Http/Controllers/Main/TaskController.php 查看文件

@@ -51,17 +51,18 @@ class TaskController extends Controller

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();
$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;
}
// }

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

@@ -144,9 +145,9 @@ class TaskController extends Controller
{
$compound = Compound::with('ConfidentialFile')->where('non',$request->non)->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();
$jbkod = $compound->jbkod_n;
$jbkod = $compound->jbkod;
$kpd = $compound->non;

// dd($faulty);
@@ -334,7 +335,7 @@ class TaskController extends Controller
$faulty = Faulty::with('DeedLaw')->where('_id',$compound->seksyen_kesalahan)->first();
$faultyN = Faulty::with('DeedLaw')->where('_id', $compound->seksyen_kesalahan_n)->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);


+ 0
- 4
app/Model/Module/Compound.php 查看文件

@@ -60,10 +60,6 @@ class Compound extends Eloquent
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(){
return $this->belongsTo('App\Model\Module\DeedLaw', 'akta', '_id');
}

正在加载...
取消
保存