| @@ -69,31 +69,6 @@ class TaskController extends Controller | |||
| return redirect()->back()->withInput()->with('error_msg','<strong>Tidak Berjaya!</strong> Kompaun ini sudah berada di dalam kategori modul '.$roles->name); | |||
| }else{ | |||
| if($request->categori_modul == '03' && $compound->modul == '02') | |||
| { | |||
| $this->dispatch(new StoreCompoundEPBT($request->all(), $compound->kpd, $user->StaffDetail->full_name, $user->StaffDetail->no_badan, $compound->seksyen_kesalahan)); | |||
| $data = [ | |||
| 'non' => $compound->non, | |||
| 'jenis' => $compound->jenis_n, | |||
| 'nama' => $compound->nama, | |||
| 'identity' => $compound->identity, | |||
| 'alamat' => $compound->alamat, | |||
| 'nama_kawasan' =>$compound->nama_kawasan, | |||
| 'nama_taman' => $compound->nama_taman, | |||
| 'nama_jalan' =>$compound->nama_jalan, | |||
| 'catatan' => $compound->catatan, | |||
| 'latlong' => $compound->latlong, | |||
| 'jabatan' => $faulty->Department->jnama, | |||
| 'akta' => $faulty->DeedLaw->nama, | |||
| 'tempoh' => $compound->tempoh, | |||
| 'tindakan' => $compound->tindakan ?? "", | |||
| 'created_n' => $compound->created_n, | |||
| ]; | |||
| } | |||
| $reg_id = array(); | |||
| if(!empty($roles->staff_detail_ids)){ | |||
| foreach($roles->staff_detail_ids as $s){ | |||
| @@ -116,7 +91,7 @@ class TaskController extends Controller | |||
| 'verify' => false, | |||
| 'form_params' => [ | |||
| 'title' => $roles->name.' '.$compound->kpd, | |||
| 'msg' => 'Kompaun ini telah di pindahkan ke modul '.$roles->name . '\n ' . $data, | |||
| 'msg' => 'Kompaun ini telah di pindahkan ke modul '.$roles->name, | |||
| 'register_id' => $reg_id, | |||
| ] | |||
| ]); | |||
| @@ -157,6 +132,30 @@ class TaskController extends Controller | |||
| })->first(); | |||
| $role = Roles::where('kod', $compound->modul)->first(); | |||
| if($request->categori_modul == '03' && $compound->modul == '02') | |||
| { | |||
| $this->dispatch(new StoreCompoundEPBT($request->all(), $compound->kpd, $user->StaffDetail->full_name, $user->StaffDetail->no_badan, $compound->seksyen_kesalahan)); | |||
| $data = [ | |||
| 'non' => $compound->non, | |||
| 'jenis' => $compound->jenis_n, | |||
| 'nama' => $compound->nama, | |||
| 'identity' => $compound->identity, | |||
| 'alamat' => $compound->alamat, | |||
| 'nama_kawasan' =>$compound->nama_kawasan, | |||
| 'nama_taman' => $compound->nama_taman, | |||
| 'nama_jalan' =>$compound->nama_jalan, | |||
| 'catatan' => $compound->catatan, | |||
| 'latlong' => $compound->latlong, | |||
| 'jabatan' => $faulty->Department->jnama, | |||
| 'akta' => $faulty->DeedLaw->nama, | |||
| 'tempoh' => $compound->tempoh, | |||
| 'tindakan' => $compound->tindakan ?? "", | |||
| 'created_n' => $compound->created_n, | |||
| ]; | |||
| } | |||
| if(!empty($staff)){ | |||
| if($staff->token_firebase != '') { | |||
| $client = new \GuzzleHttp\Client(); | |||
| @@ -164,7 +163,7 @@ class TaskController extends Controller | |||
| 'verify' => false, | |||
| 'form_params' => [ | |||
| 'title' => $role->name.' '.$compound->kpd, | |||
| 'msg' => 'Kompaun ini berada di ruangan '.$role->name, | |||
| 'msg' => 'Kompaun ini berada di ruangan '.$role->name . '\n' .$data, | |||
| 'register_id[]' => $staff->token_firebase, | |||
| ] | |||
| ]); | |||