| $end = $dateS->copy()->endOfDay(); | $end = $dateS->copy()->endOfDay(); | ||||
| } | } | ||||
| if(!empty($day3)) | if(!empty($day3)) | ||||
| { | { | ||||
| $compound = Compound::where('jenis', $jenis)->whereBetween('created_at', array($start->subDays(3), $end->subDays(3))); | |||||
| $compound = Compound::where('jenis_n', $jenis)->whereBetween('created_at', array($start->subDays(3), $end->subDays(3))); | |||||
| } | } | ||||
| else if(!empty($day7)) | else if(!empty($day7)) | ||||
| { | { | ||||
| $compound = Compound::where('jenis', $jenis)->whereBetween('created_at', array($start->subDays(7), $end->subDays(7))); | |||||
| $compound = Compound::where('jenis_n', $jenis)->whereBetween('created_at', array($start->subDays(7), $end->subDays(7))); | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $compound = Compound::where('jenis', $jenis)->whereBetween('created_at', array($start, $end)); | |||||
| $compound = Compound::where(function($query) use ($jenis){$query->where('jenis', $jenis)->orWhere('jenis_n', $jenis); }) | |||||
| ->whereBetween('created_at', array($start, $end)); | |||||
| } | } | ||||
| if($modul == 'All'){ | if($modul == 'All'){ | ||||
| $compound = $compound; | $compound = $compound; | ||||
| }else if($modul == '06-07'){ | }else if($modul == '06-07'){ | ||||
| $compound = $compound->where(function($q){ | $compound = $compound->where(function($q){ | ||||
| // $q->where(function($query){ | |||||
| $q->where('modul', '06')->orWhere('modul','07'); | |||||
| // }); | |||||
| $q->where('modul', '06')->orWhere('modul','07'); | |||||
| }); | }); | ||||
| }else { | }else { | ||||
| $compound = $compound->where('modul', $modul); | $compound = $compound->where('modul', $modul); | ||||
| if(!empty($day3)) | if(!empty($day3)) | ||||
| { | { | ||||
| $compound = Compound::where('jenis', $jenis)->where('created_at', Carbon::now()->subDays(3)); | |||||
| $compound = Compound::where('jenis_n', $jenis)->where('created_at', Carbon::now()->subDays(3)); | |||||
| } | } | ||||
| else if(!empty($day7)) | else if(!empty($day7)) | ||||
| { | { | ||||
| $compound = Compound::where('jenis', $jenis)->where('created_at', Carbon::now()->subDays(7)); | |||||
| $compound = Compound::where('jenis_n', $jenis)->where('created_at', Carbon::now()->subDays(7)); | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $compound = Compound::where('jenis', $jenis); | |||||
| $compound = Compound::where('jenis', $jenis)->orWhere('jenis_n', $jenis); | |||||
| } | } | ||||
| if($modul == 'All'){ | if($modul == 'All'){ | ||||
| if(!empty($start_date)){ | if(!empty($start_date)){ | ||||
| $compound = $this->searchCompoundAll($jenis,$modul,$status,$start_date,$end_date,$day3, $day7); | $compound = $this->searchCompoundAll($jenis,$modul,$status,$start_date,$end_date,$day3, $day7); | ||||
| }else{ | }else{ | ||||
| $compound = $this->searchCompoundAllWithoutDate($jenis,$modul,$status,$day3, $day7); | $compound = $this->searchCompoundAllWithoutDate($jenis,$modul,$status,$day3, $day7); | ||||
| } | } | ||||
| if($enforcer == 'All'){ | if($enforcer == 'All'){ | ||||
| return $compound; | return $compound; | ||||
| }else { | }else { | ||||
| $compound = $compound->where('dikeluarkan', $enforcer); | |||||
| $compound = $compound->where('dikeluarkan', $enforcer)->orWhere('dikeluarkan_n', $enforcer); | |||||
| return $compound; | return $compound; | ||||
| } | } | ||||
| } | } | ||||
| $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'){ | ||||
| return $compound->whereIn('jbkod',$department); | |||||
| $compound = $compound->whereIn('jbkod', $department, 'or')->whereIn('jbkod_n', $department); | |||||
| return $compound; | |||||
| }else { | }else { | ||||
| $compound = $compound->where('seksyen_kesalahan', $faulty); | |||||
| $compound = $compound->where('seksyen_kesalahan', $faulty)->orWhere('seksyen_kesalahan_n', $faulty); | |||||
| return $compound; | return $compound; | ||||
| } | } | ||||
| } | } | ||||
| private function searchPlateNo($enforcer,$faulty,$jenis,$modul,$status,$start_date,$end_date,$department,$plate_no,$day3, $day7){ | private function searchPlateNo($enforcer,$faulty,$jenis,$modul,$status,$start_date,$end_date,$department,$plate_no,$day3, $day7){ | ||||
| $compound = $this->filterCompoundByFaulty($enforcer,$faulty,$jenis,$modul,$status,$start_date,$end_date,$department,$day3, $day7); | $compound = $this->filterCompoundByFaulty($enforcer,$faulty,$jenis,$modul,$status,$start_date,$end_date,$department,$day3, $day7); | ||||
| if(!empty($plate_no)){ | if(!empty($plate_no)){ | ||||
| $compound = $compound->where('no_plate',$plate_no); | $compound = $compound->where('no_plate',$plate_no); | ||||
| return $compound; | return $compound; | ||||
| // $per_page = ''; | // $per_page = ''; | ||||
| // $kpd = ''; | // $kpd = ''; | ||||
| // $modul = '02'; | // $modul = '02'; | ||||
| // $status = 'All'; | // $status = 'All'; | ||||
| // $jenis = 'Pelbagai_JPB'; | |||||
| // $jenis = 'Notis_NHN'; | |||||
| // if(!empty($request->department)){ | // if(!empty($request->department)){ | ||||
| // $department = array ( | // $department = array ( | ||||
| // 0 => '5df355f891d6e66b9c5e626d', | // 0 => '5df355f891d6e66b9c5e626d', | ||||
| // }else { | // }else { | ||||
| // $department = []; | // $department = []; | ||||
| // } | // } | ||||
| // // $start_date = ''; | |||||
| // // $end_date = ''; | |||||
| // $start_date = '2020-09-29'; | |||||
| // $end_date = '2020-10-01'; | |||||
| // $start_date = ''; | |||||
| // $end_date = ''; | |||||
| // // $start_date = '2020-09-29'; | |||||
| // // $end_date = '2020-10-09'; | |||||
| // $enforcer = 'All'; | // $enforcer = 'All'; | ||||
| // $faulty = 'All'; | // $faulty = 'All'; | ||||
| // $license = ''; | // $license = ''; | ||||
| // $namaP = ''; | // $namaP = ''; | ||||
| // $company_name = ''; | // $company_name = ''; | ||||
| // $day3 = 3; | |||||
| // $day3 = ''; | |||||
| // $day7 = ''; | // $day7 = ''; | ||||
| ///////////////////////////////////////////////////////////////////////////////// | ///////////////////////////////////////////////////////////////////////////////// | ||||
| $day7=''; | $day7=''; | ||||
| if ($request->has('day3')) { | if ($request->has('day3')) { | ||||
| $day3 = $request->day3; //has() checks if param exist and filled | |||||
| } | |||||
| if ($request->has('day7')) { | |||||
| $day3 = $request->day7; //has() checks if param exist and filled | |||||
| } | |||||
| // if (!empty($start_date)) { | |||||
| // } | |||||
| $day3 = $request->day3; //has() checks if param exist and filled | |||||
| } | |||||
| if ($request->has('day7')) { | |||||
| $day3 = $request->day7; //has() checks if param exist and filled | |||||
| } | |||||
| $nested_data = array(); | $nested_data = array(); | ||||
| $compound = $this->searchCompanyName($enforcer,$faulty,$jenis,$modul,$status,$start_date,$end_date,$department,$plate_no,$kpd,$company_no,$nric,$license,$namaP,$company_name, $day3, $day7)->orderBy('created_at','ASC')->get(); | $compound = $this->searchCompanyName($enforcer,$faulty,$jenis,$modul,$status,$start_date,$end_date,$department,$plate_no,$kpd,$company_no,$nric,$license,$namaP,$company_name, $day3, $day7)->orderBy('created_at','ASC')->get(); | ||||
| // info($compound); | |||||
| info($compound); | |||||
| return \DataTables::of(CompoundResource::collection($compound))->addIndexColumn() | return \DataTables::of(CompoundResource::collection($compound))->addIndexColumn() | ||||
| ->addColumn('index', function($row) { | ->addColumn('index', function($row) { | ||||
| $data = array(); | $data = array(); | ||||
| $faulty = $request->seksyen; | $faulty = $request->seksyen; | ||||
| $faulty = Faulty::where('_id',$request->get('seksyen'))->orWhere('nama', 'like', $faulty)->first(); | $faulty = Faulty::where('_id',$request->get('seksyen'))->orWhere('nama', 'like', $faulty)->first(); | ||||
| if($request->jenis == 'Parkir') | if($request->jenis == 'Parkir') | ||||
| $saved = $file->compound()->create($compoundData); | $saved = $file->compound()->create($compoundData); | ||||
| } | } | ||||
| }elseif(($request->jenis == 'Pelbagai_KT') || ($request->jenis == 'Pelbagai_JPB') || ($request->jenis == 'Pelbagai_PA') || ($request->jenis == 'Pelbagai_LESEN')){ | |||||
| }elseif(($request->jenis == 'Pelbagai_KT') || ($request->jenis == 'Pelbagai_JPB')){ | |||||
| $compound = Compound::where('jenis_n', $request->jenis)->orWhere('non', $request->non)->first(); | |||||
| $compound = Compound::where('jenis', $request->jenis)->where('kpd', $kpd)->first(); | |||||
| info($compound); | info($compound); | ||||
| if(!empty($compound)) { | if(!empty($compound)) { | ||||
| if($compound->modul != '03') | if($compound->modul != '03') | ||||
| { | { | ||||
| if($request->jenis == 'Pelbagai_KT'){ | if($request->jenis == 'Pelbagai_KT'){ | ||||
| $compound->kpd = $this->generateNumber($request->jenis, 'KT', '03'); | |||||
| $kpd = $this->generateNumber($request->jenis, 'KT', '03'); | |||||
| $compound->kpd = $kpd; | |||||
| $compound->jenis = $request->jenis; | $compound->jenis = $request->jenis; | ||||
| $compound->nama = $request->namaP; | $compound->nama = $request->namaP; | ||||
| $compound->identity = $request->noIc; | $compound->identity = $request->noIc; | ||||
| }elseif($request->jenis == 'Pelbagai_JPB'){ | }elseif($request->jenis == 'Pelbagai_JPB'){ | ||||
| $compound->kpd = $this->generateNumber($request->jenis, 'JPB', '03'); | |||||
| $kpd = $this->generateNumber($request->jenis, 'JPB', '03'); | |||||
| $compound->kpd = $kpd; | |||||
| $compound->jenis = $request->jenis; | $compound->jenis = $request->jenis; | ||||
| $compound->nama = $request->namaP; | $compound->nama = $request->namaP; | ||||
| $compound->identity = $request->noIc; | $compound->identity = $request->noIc; | ||||
| $compound->created_c = Carbon::now()->toDateTimeString(); | $compound->created_c = Carbon::now()->toDateTimeString(); | ||||
| } | } | ||||
| // }elseif($request->jenis == 'Pelbagai_PA'){ | |||||
| // $compound->jenis = $request->jenis; | |||||
| // $compound->nama = $request->namaP; | |||||
| // $compound->identity = $request->noIc; | |||||
| // $compound->nama_syarikat = $request->namaS; | |||||
| // $compound->no_daftar_syarikat = strtolower($request->daftarNo); | |||||
| // $compound->alamat = $request->alamat; | |||||
| // // $compound->no_plate = $request->no_plate; | |||||
| // // $compound->no_cukai_jalan = $request->no_cukai_jalan; | |||||
| // // $compound->nama_kawasan = $request->namaKawasan; | |||||
| // // $compound->nama_taman = $request->namaTaman; | |||||
| // // $compound->nama_jalan = $request->namaJalan; | |||||
| // $compound->catatan = $request->catatan; | |||||
| // $compound->latlong = $request->Latlong; | |||||
| // $compound->akta = $faulty->deed_law_id; | |||||
| // $compound->seksyen_kesalahan = $faulty->_id; | |||||
| // $compound->jumlah_asal_kompaun = $faulty->amount; | |||||
| // $compound->dikeluarkan = $staff->_id; | |||||
| // $compound->status = 'Belum Bayar'; | |||||
| // $compound->modul = '03'; | |||||
| // $compound->no_telefon = $request->tel; | |||||
| // $compound->no_akaun_lesen = $request->lesen; | |||||
| // $compound->bil_haiwan = $request->lesen; | |||||
| // $compound->created_c = Carbon::now()->toDateTimeString(); | |||||
| // }elseif($request->jenis == 'Pelbagai_LESEN'){ | |||||
| // $compound->jenis = $request->jenis; | |||||
| // $compound->nama = $request->namaP; | |||||
| // $compound->identity = $request->noIc; | |||||
| // $compound->nama_syarikat = $request->namaS; | |||||
| // $compound->no_daftar_syarikat = strtolower($request->daftarNo); | |||||
| // $compound->alamat = $request->alamat; | |||||
| // $compound->no_plate = $request->no_plate; | |||||
| // $compound->no_cukai_jalan = $request->no_cukai_jalan; | |||||
| // // $compound->nama_kawasan = $request->namaKawasan; | |||||
| // // $compound->nama_taman = $request->namaTaman; | |||||
| // // $compound->nama_jalan = $request->namaJalan; | |||||
| // $compound->catatan = $request->catatan; | |||||
| // $compound->latlong = $request->Latlong; | |||||
| // $compound->akta = $faulty->deed_law_id; | |||||
| // $compound->seksyen_kesalahan = $faulty->_id; | |||||
| // $compound->jumlah_asal_kompaun = $faulty->amount; | |||||
| // $compound->dikeluarkan = $staff->_id; | |||||
| // $compound->status = 'Belum Bayar'; | |||||
| // $compound->modul = '03'; | |||||
| // $compound->no_telefon = $request->tel; | |||||
| // $compound->no_akaun_lesen = $request->lesen; | |||||
| // $compound->created_c = Carbon::now()->toDateTimeString(); | |||||
| // } | |||||
| $saved = $compound->save(); | $saved = $compound->save(); | ||||
| return $this->sendResponse('', 'Kompaun ini telah dikeluarkan!'); | return $this->sendResponse('', 'Kompaun ini telah dikeluarkan!'); | ||||
| } | } | ||||
| if($saved){ | if($saved){ | ||||
| // $compound = Compound::with('ConfidentialFile')->where('kpd',$kpd)->first(); | // $compound = Compound::with('ConfidentialFile')->where('kpd',$kpd)->first(); | ||||
| // if(!empty($compound)){ | // if(!empty($compound)){ | ||||
| }else { | }else { | ||||
| $data = array(); | $data = array(); | ||||
| // dd($this->compound->where('jenis', 'Parkir')->withTrashed()->count()); | |||||
| $faulty = Faulty::where('_id',$request->get('seksyen'))->first(); | $faulty = Faulty::where('_id',$request->get('seksyen'))->first(); | ||||
| if(!empty($faulty)){ | if(!empty($faulty)){ |
| <?php | <?php | ||||
| namespace App\Http\Controllers; | namespace App\Http\Controllers; | ||||
| use Illuminate\Http\Request; | use Illuminate\Http\Request; | ||||
| use App\Exports\CompoundExport; | use App\Exports\CompoundExport; | ||||
| use Maatwebsite\Excel\Facades\Excel; | use Maatwebsite\Excel\Facades\Excel; | ||||
| class ExportCompound extends Controller | class ExportCompound extends Controller | ||||
| { | { | ||||
| /** | /** | ||||
| { | { | ||||
| return view('import'); | return view('import'); | ||||
| } | } | ||||
| /** | /** | ||||
| * @return \Illuminate\Support\Collection | * @return \Illuminate\Support\Collection | ||||
| */ | */ | ||||
| public function export($file, $jenis) | |||||
| public function export($file, $jenis) | |||||
| { | { | ||||
| $location = 'public/uploads/cache/'.$file.'.json'; | $location = 'public/uploads/cache/'.$file.'.json'; | ||||
| $data = json_decode(file_get_contents(base_path($location), true), true); | $data = json_decode(file_get_contents(base_path($location), true), true); | ||||
| $final_data = array(); | $final_data = array(); | ||||
| if($jenis == 'Pelbagai'){ | |||||
| if($jenis != 'Parkir'){ | |||||
| foreach ($data as $key => $d) { | foreach ($data as $key => $d) { | ||||
| $kemaskini_oleh = ''; | $kemaskini_oleh = ''; | ||||
| }else{ | }else{ | ||||
| $tarikh_bayar = $d['updated_at']; | $tarikh_bayar = $d['updated_at']; | ||||
| } | } | ||||
| array_push($final_data, array( | array_push($final_data, array( | ||||
| '#' => $key+1, | '#' => $key+1, | ||||
| 'Kpd' => $d['kpd'], | 'Kpd' => $d['kpd'], | ||||
| $filename = 'Report_Saman_'.$jenis; | $filename = 'Report_Saman_'.$jenis; | ||||
| return Excel::download(new CompoundExport($final_data,$jenis), $filename.'.xlsx'); | return Excel::download(new CompoundExport($final_data,$jenis), $filename.'.xlsx'); | ||||
| } | } | ||||
| /** | /** | ||||
| * @return \Illuminate\Support\Collection | * @return \Illuminate\Support\Collection | ||||
| */ | */ | ||||
| public function import() | |||||
| public function import() | |||||
| { | { | ||||
| Excel::import(new UsersImport,request()->file('file')); | Excel::import(new UsersImport,request()->file('file')); | ||||
| return back(); | return back(); | ||||
| } | } | ||||
| public function getData(Request $request) | |||||
| public function getData(Request $request) | |||||
| { | { | ||||
| $data = $request->data; | $data = $request->data; | ||||
| $filename = time(); | $filename = time(); | ||||
| public function export_compound_enforcer(){ | public function export_compound_enforcer(){ | ||||
| } | } | ||||
| } | |||||
| } |
| */ | */ | ||||
| public function requestUpdateTask(Request $request){ | public function requestUpdateTask(Request $request){ | ||||
| $id = Auth::guard('sadmin')->id(); | $id = Auth::guard('sadmin')->id(); | ||||
| $user = Staff::with('StaffDetail')->find($id); | |||||
| $user = Staff::with('StaffDetail')->find($id); | |||||
| if($request->modul == '02') | |||||
| { | |||||
| $compound = Compound::with('ConfidentialFile')->where('non',$request->non)->first(); | |||||
| } | |||||
| else{ | |||||
| $compound = Compound::with('ConfidentialFile')->where('kpd',$request->kpd)->first(); | |||||
| } | |||||
| $compound = Compound::with('ConfidentialFile')->where('kpd',$request->kpd)->first(); | |||||
| $file = ConfidentialFile::where('no_siri',$compound->ConfidentialFile->no_siri)->first(); | $file = ConfidentialFile::where('no_siri',$compound->ConfidentialFile->no_siri)->first(); | ||||
| $jbkod = $compound->jbkod; | $jbkod = $compound->jbkod; | ||||
| $gDate = $now->format('F Y'); | $gDate = $now->format('F Y'); | ||||
| if($request->dashboard == "true"){ | if($request->dashboard == "true"){ | ||||
| $roles = Roles::where('kod', $request->kategori_modul)->first(); | |||||
| $roles = Roles::where('kod', $request->kategori_modul)->first(); | |||||
| if($compound->modul == $request->kategori_modul){ | if($compound->modul == $request->kategori_modul){ | ||||
| return redirect()->back()->withInput()->with('error_msg','<strong>Tidak Berjaya!</strong> Kompaun ini sudah berada di dalam kategori modul '.$roles->name); | return redirect()->back()->withInput()->with('error_msg','<strong>Tidak Berjaya!</strong> Kompaun ini sudah berada di dalam kategori modul '.$roles->name); | ||||
| }else{ | }else{ | ||||
| if($request->categori_modul == '03' && $compound->modul == '02') | 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)); | $this->dispatch(new StoreCompoundEPBT($request->all(), $compound->kpd, $user->StaffDetail->full_name, $user->StaffDetail->no_badan, $compound->seksyen_kesalahan)); | ||||
| } | } | ||||
| $now = Carbon::now()->format('d/m/Y h:i:s A'); | $now = Carbon::now()->format('d/m/Y h:i:s A'); | ||||
| $site = SiteSetting::first(); | $site = SiteSetting::first(); | ||||
| $compound = Compound::with('ConfidentialFile','Attachment','CompoundInvestigation')->where('kpd', $kpd)->first(); | |||||
| $compound = Compound::with('ConfidentialFile','Attachment','CompoundInvestigation')->where('kpd', $kpd)->orWhere('non', $kpd)->first(); | |||||
| if(empty($compound)) | if(empty($compound)) | ||||
| { | { | ||||
| $kpd = (int)$kpd; | $kpd = (int)$kpd; | ||||
| $compound = Compound::with('ConfidentialFile','Attachment','CompoundInvestigation')->where('kpd', $kpd)->first(); | |||||
| $compound = Compound::with('ConfidentialFile','Attachment','CompoundInvestigation')->where('kpd', $kpd)->orWhere('non', $kpd)->first(); | |||||
| } | } | ||||
| $file = ConfidentialFile::with(['Memo' => function($q){ | $file = ConfidentialFile::with(['Memo' => function($q){ | ||||
| $q->orderBy('updated_at','ASC'); | $q->orderBy('updated_at','ASC'); | ||||
| } | } | ||||
| $staff = Staff::with('StaffDetail')->where('_id', $compound->dikeluarkan)->first(); | $staff = Staff::with('StaffDetail')->where('_id', $compound->dikeluarkan)->first(); | ||||
| $faulty = Faulty::with('DeedLaw')->where('_id',$compound->seksyen_kesalahan)->first(); | |||||
| $department = Department::where('_id', $compound->jbkod)->first(); | |||||
| $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(); | |||||
| $upload [] = [ 'name' => 'compound', 'contents' => $compound ]; | $upload [] = [ 'name' => 'compound', 'contents' => $compound ]; | ||||
| $upload [] = [ 'name' => 'faulty', 'contents' => $faulty ]; | |||||
| $upload [] = [ 'name' => 'faulty', 'contents' => $faulty ]; | |||||
| $upload [] = [ 'name' => 'faultyN', 'contents' => $faultyN ]; | |||||
| $upload [] = [ 'name' => 'staff', 'contents' => $staff ]; | $upload [] = [ 'name' => 'staff', 'contents' => $staff ]; | ||||
| $upload [] = [ 'name' => 'department', 'contents' => $department ]; | |||||
| $upload [] = [ 'name' => 'department', 'contents' => $department ]; | |||||
| $upload [] = [ 'name' => 'departmentN', 'contents' => $departmentN ]; | |||||
| $upload [] = [ 'name' => 'tawaran', 'contents' => $tawaran ]; | $upload [] = [ 'name' => 'tawaran', 'contents' => $tawaran ]; | ||||
| $upload [] = [ 'name' => 'site', 'contents' => $site ]; | $upload [] = [ 'name' => 'site', 'contents' => $site ]; | ||||
| $upload [] = [ 'name' => 'type', 'contents' => 'mbip' ]; | $upload [] = [ 'name' => 'type', 'contents' => 'mbip' ]; |
| */ | */ | ||||
| public function toArray($request) | public function toArray($request) | ||||
| { | { | ||||
| if($this->faulty != null && $this->staffdetail != null){ | |||||
| if($this->modul == '02' && (!empty($this->non))) | |||||
| if($this->modul == '02' && (!empty($this->non))) | |||||
| { | |||||
| if($this->faultyNotis != null && $this->staffdetailNotis != null) | |||||
| { | { | ||||
| $kpd = $this->non; | |||||
| return [ | |||||
| '_id' => $this->_id, | |||||
| 'modul' => $this->modul, | |||||
| 'jenis' => $this->jenis_n, | |||||
| 'kpd' => $this->non, | |||||
| 'no_plate' => '', | |||||
| 'nric' => $this->identity, | |||||
| 'no_daftar_syarikat' => $this->no_daftar_syarikat, | |||||
| 'nama_syarikat' => $this->nama_syarikat, | |||||
| 'nama' => $this->nama, | |||||
| 'lesen' => $this->no_akaun_lesen, | |||||
| 'tarikh_masa' => date('d/m/Y H:i:s A', strtotime($this->created_n)), | |||||
| 'faulty_skter' => $this->faultyNotis->sketr, | |||||
| 'faulty_name' => $this->faultyNotis->nama, | |||||
| 'enforcer' => $this->staffdetailNotis->no_badan.', '.$this->staffdetailNotis->full_name, | |||||
| 'status' => $this->status, | |||||
| 'kadar_kompaun' => '', | |||||
| 'catatan_dari_admin' => $this->catatan_dari_admin, | |||||
| 'updated_by' => $this->updateby, | |||||
| 'updates_by' => $this->update_by, | |||||
| 'tarikh_bayar' => '', | |||||
| 'amount_payment' => '', | |||||
| 'created_at' => $this->created_at->format('Y-m-d H:i:s'), | |||||
| 'updated_at' => $this->updated_at->format('Y-m-d H:i'), | |||||
| ]; | |||||
| } | } | ||||
| else{ | |||||
| $kpd = $this->kpd; | |||||
| } | |||||
| else{ | |||||
| if($this->faulty != null && $this->staffdetail != null) | |||||
| { | |||||
| return [ | |||||
| '_id' => $this->_id, | |||||
| 'modul' => $this->modul, | |||||
| 'jenis' => $this->jenis, | |||||
| 'kpd' => $this->kpd, | |||||
| 'no_plate' => $this->no_plate, | |||||
| 'nric' => $this->identity, | |||||
| 'no_daftar_syarikat' => $this->no_daftar_syarikat, | |||||
| 'nama_syarikat' => $this->nama_syarikat, | |||||
| 'nama' => $this->nama, | |||||
| 'lesen' => $this->no_akaun_lesen, | |||||
| 'tarikh_masa' => $this->created_at->format('d/m/Y H:i:s A'), | |||||
| 'faulty_skter' => $this->faulty->sketr, | |||||
| 'faulty_name' => $this->faulty->nama, | |||||
| 'enforcer' => $this->staffdetail->no_badan.', '.$this->staffdetail->full_name, | |||||
| 'status' => $this->status, | |||||
| 'kadar_kompaun' => $this->jumlah_asal_kompaun, | |||||
| 'catatan_dari_admin' => $this->catatan_dari_admin, | |||||
| 'updated_by' => $this->updateby, | |||||
| 'updates_by' => $this->update_by, | |||||
| 'tarikh_bayar' => $this->tarikh_bayar, | |||||
| 'amount_payment' => $this->amount_payment, | |||||
| 'created_at' => $this->created_at->format('Y-m-d H:i:s'), | |||||
| 'updated_at' => $this->updated_at->format('Y-m-d H:i'), | |||||
| ]; | |||||
| } | } | ||||
| return [ | |||||
| '_id' => $this->_id, | |||||
| 'modul' => $this->modul, | |||||
| 'jenis' => $this->jenis, | |||||
| 'kpd' => $kpd, | |||||
| 'no_plate' => $this->no_plate, | |||||
| 'nric' => $this->identity, | |||||
| 'no_daftar_syarikat' => $this->no_daftar_syarikat, | |||||
| 'nama_syarikat' => $this->nama_syarikat, | |||||
| 'nama' => $this->nama, | |||||
| 'lesen' => $this->no_akaun_lesen, | |||||
| 'tarikh_masa' => $this->created_at->format('d/m/Y H:i:s A'), | |||||
| 'faulty_skter' => $this->faulty->sketr, | |||||
| 'faulty_name' => $this->faulty->nama, | |||||
| 'enforcer' => $this->staffdetail->no_badan.', '.$this->staffdetail->full_name, | |||||
| 'status' => $this->status, | |||||
| 'kadar_kompaun' => $this->jumlah_kemaskini_kompaun !== '' ? $this->jumlah_kemaskini_kompaun : $this->jumlah_asal_kompaun, | |||||
| 'catatan_dari_admin' => $this->catatan_dari_admin, | |||||
| 'updated_by' => $this->updateby, | |||||
| 'updates_by' => $this->update_by, | |||||
| 'tarikh_bayar' => $this->tarikh_bayar, | |||||
| 'amount_payment' => $this->amount_payment, | |||||
| 'created_at' => $this->created_at->format('Y-m-d H:i:s'), | |||||
| 'updated_at' => $this->updated_at->format('Y-m-d H:i'), | |||||
| ]; | |||||
| } | } | ||||
| } | } | ||||
| } | } |
| */ | */ | ||||
| public function handle(ConfidentialFile $file) | public function handle(ConfidentialFile $file) | ||||
| { | { | ||||
| // $success_save_data = false; | |||||
| // $success_save_data = false; | |||||
| // $faulty = Faulty::where('_id', $this->request['seksyen'])->first(); | // $faulty = Faulty::where('_id', $this->request['seksyen'])->first(); | ||||
| // if($success_save_data == false){ | // if($success_save_data == false){ | ||||
| // $count = $file->count(); | // $count = $file->count(); |
| { "data": "nama", "name": "nama" }, | { "data": "nama", "name": "nama" }, | ||||
| { "data": "enforcer", "name": "enforcer" }, | { "data": "enforcer", "name": "enforcer" }, | ||||
| { "data": "_id", "name": "action", orderable: false, searchable: false }, | { "data": "_id", "name": "action", orderable: false, searchable: false }, | ||||
| ], | |||||
| ], | |||||
| "columnDefs": [ | "columnDefs": [ | ||||
| { | |||||
| { | |||||
| "render": function ( data, type, row, meta ) { | "render": function ( data, type, row, meta ) { | ||||
| if (data != '') { | if (data != '') { | ||||
| return '<label class="label label-success">'+data+'</label> '+(meta.row+1); | return '<label class="label label-success">'+data+'</label> '+(meta.row+1); | ||||
| { | { | ||||
| "render": function ( data, type, row ) { | "render": function ( data, type, row ) { | ||||
| return '<div style="text-align:center"><a target="_blank" href="'+SITEURL+'/main/compound/'+row.kpd+'/index" class="btn btn-info btn-sm waves-effect waves-light">TERUSKAN</a>' | return '<div style="text-align:center"><a target="_blank" href="'+SITEURL+'/main/compound/'+row.kpd+'/index" class="btn btn-info btn-sm waves-effect waves-light">TERUSKAN</a>' | ||||
| +'<button onclick="getDetail(\''+data+'\')" class="btn btn-primary btn-sm waves-effect waves-light">KEMASKINI STATUS</button></div>'; | |||||
| +'<button onclick="getDetail(\''+data+'\')" class="btn btn-primary btn-sm waves-effect waves-light">KEMASKINI STATUS</button></div>'; | |||||
| }, | }, | ||||
| "targets": 9, | "targets": 9, | ||||
| }, | }, | ||||
| var api = this.api(); | var api = this.api(); | ||||
| // Output the data for the visible rows to the browser's console | // Output the data for the visible rows to the browser's console | ||||
| var data = api.rows( {page:'current'} ).data().toArray(); | var data = api.rows( {page:'current'} ).data().toArray(); | ||||
| console.log(data); | |||||
| console.log(`drawcallback ${data}`); | |||||
| if (data && data.length > 0) { | if (data && data.length > 0) { | ||||
| for(var i=0;i<data.length;i++){ | for(var i=0;i<data.length;i++){ | ||||
| data[i].status_kemaskini = '-'; | data[i].status_kemaskini = '-'; | ||||
| url: SITEURL+'/get/datatable', | url: SITEURL+'/get/datatable', | ||||
| data: { _token: token, data : final_data }, | data: { _token: token, data : final_data }, | ||||
| success:function(filename){ | success:function(filename){ | ||||
| $('#link1').html('<a target="_blank" href="'+SITEURL+'/download/excel/compound/'+filename+'/Pelbagai" class="btn btn-primary btn-sm waves-effect waves-light">Excel</a>'); | |||||
| $('#link1').show(); | |||||
| $('#link2').html('<a target="_blank" href="'+SITEURL+'/download/excel/compound/'+filename+'/Pelbagai" class="btn btn-primary btn-sm waves-effect waves-light">Excel</a>'); | |||||
| $('#link2').show(); | |||||
| }, | }, | ||||
| error: function (xhr, ajaxOptions, thrownError) { | error: function (xhr, ajaxOptions, thrownError) { | ||||
| console.log(thrownError); | console.log(thrownError); | ||||
| } | } | ||||
| }); | }); | ||||
| } | } | ||||
| }, | |||||
| }, | |||||
| "language": { | "language": { | ||||
| "paginate": { | "paginate": { | ||||
| "previous": "Sebelum", | "previous": "Sebelum", | ||||
| "info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri", | "info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri", | ||||
| "sSearch": "Cari:", | "sSearch": "Cari:", | ||||
| } | } | ||||
| }); | |||||
| }); | |||||
| tableP3 = $('#report3').DataTable({ | tableP3 = $('#report3').DataTable({ | ||||
| { "data": "nama", "name": "nama" }, | { "data": "nama", "name": "nama" }, | ||||
| { "data": "enforcer", "name": "enforcer" }, | { "data": "enforcer", "name": "enforcer" }, | ||||
| { "data": "_id", "name": "action", orderable: false, searchable: false }, | { "data": "_id", "name": "action", orderable: false, searchable: false }, | ||||
| ], | |||||
| ], | |||||
| "columnDefs": [ | "columnDefs": [ | ||||
| { | |||||
| { | |||||
| "render": function ( data, type, row, meta ) { | "render": function ( data, type, row, meta ) { | ||||
| if (data != '') { | if (data != '') { | ||||
| return '<label class="label label-success">'+data+'</label> '+(meta.row+1); | return '<label class="label label-success">'+data+'</label> '+(meta.row+1); | ||||
| { | { | ||||
| "render": function ( data, type, row ) { | "render": function ( data, type, row ) { | ||||
| return '<div style="text-align:center"><a target="_blank" href="'+SITEURL+'/main/compound/'+row.kpd+'/index" class="btn btn-info btn-sm waves-effect waves-light">TERUSKAN</a>' | return '<div style="text-align:center"><a target="_blank" href="'+SITEURL+'/main/compound/'+row.kpd+'/index" class="btn btn-info btn-sm waves-effect waves-light">TERUSKAN</a>' | ||||
| +'<button onclick="getDetail(\''+data+'\')" class="btn btn-primary btn-sm waves-effect waves-light">KEMASKINI STATUS</button></div>'; | |||||
| +'<button onclick="getDetail(\''+data+'\')" class="btn btn-primary btn-sm waves-effect waves-light">KEMASKINI STATUS</button></div>'; | |||||
| }, | }, | ||||
| "targets": 9, | "targets": 9, | ||||
| }, | }, | ||||
| url: SITEURL+'/get/datatable', | url: SITEURL+'/get/datatable', | ||||
| data: { _token: token, data : final_data }, | data: { _token: token, data : final_data }, | ||||
| success:function(filename){ | success:function(filename){ | ||||
| $('#link1').html('<a target="_blank" href="'+SITEURL+'/download/excel/compound/'+filename+'/Pelbagai" class="btn btn-primary btn-sm waves-effect waves-light">Excel</a>'); | |||||
| $('#link1').show(); | |||||
| $('#link2').html('<a target="_blank" href="'+SITEURL+'/download/excel/compound/'+filename+'/Pelbagai" class="btn btn-primary btn-sm waves-effect waves-light">Excel</a>'); | |||||
| $('#link2').show(); | |||||
| }, | }, | ||||
| error: function (xhr, ajaxOptions, thrownError) { | error: function (xhr, ajaxOptions, thrownError) { | ||||
| console.log(thrownError); | console.log(thrownError); | ||||
| } | } | ||||
| }); | }); | ||||
| } | } | ||||
| }, | |||||
| }, | |||||
| "language": { | "language": { | ||||
| "paginate": { | "paginate": { | ||||
| "previous": "Sebelum", | "previous": "Sebelum", | ||||
| "info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri", | "info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri", | ||||
| "sSearch": "Cari:", | "sSearch": "Cari:", | ||||
| } | } | ||||
| }); | |||||
| }); | |||||
| tableP7 = $('#report7').DataTable({ | tableP7 = $('#report7').DataTable({ | ||||
| // "dom": 'Blfrtip', | // "dom": 'Blfrtip', | ||||
| { "data": "nama", "name": "nama" }, | { "data": "nama", "name": "nama" }, | ||||
| { "data": "enforcer", "name": "enforcer" }, | { "data": "enforcer", "name": "enforcer" }, | ||||
| { "data": "_id", "name": "action", orderable: false, searchable: false }, | { "data": "_id", "name": "action", orderable: false, searchable: false }, | ||||
| ], | |||||
| ], | |||||
| "columnDefs": [ | "columnDefs": [ | ||||
| { | |||||
| { | |||||
| "render": function ( data, type, row, meta ) { | "render": function ( data, type, row, meta ) { | ||||
| if (data != '') { | if (data != '') { | ||||
| return '<label class="label label-success">'+data+'</label> '+(meta.row+1); | return '<label class="label label-success">'+data+'</label> '+(meta.row+1); | ||||
| { | { | ||||
| "render": function ( data, type, row ) { | "render": function ( data, type, row ) { | ||||
| return '<div style="text-align:center"><a target="_blank" href="'+SITEURL+'/main/compound/'+row.kpd+'/index" class="btn btn-info btn-sm waves-effect waves-light">TERUSKAN</a>' | return '<div style="text-align:center"><a target="_blank" href="'+SITEURL+'/main/compound/'+row.kpd+'/index" class="btn btn-info btn-sm waves-effect waves-light">TERUSKAN</a>' | ||||
| +'<button onclick="getDetail(\''+data+'\')" class="btn btn-primary btn-sm waves-effect waves-light">KEMASKINI STATUS</button></div>'; | |||||
| +'<button onclick="getDetail(\''+data+'\')" class="btn btn-primary btn-sm waves-effect waves-light">KEMASKINI STATUS</button></div>'; | |||||
| }, | }, | ||||
| "targets": 9, | "targets": 9, | ||||
| }, | }, | ||||
| url: SITEURL+'/get/datatable', | url: SITEURL+'/get/datatable', | ||||
| data: { _token: token, data : final_data }, | data: { _token: token, data : final_data }, | ||||
| success:function(filename){ | success:function(filename){ | ||||
| $('#link1').html('<a target="_blank" href="'+SITEURL+'/download/excel/compound/'+filename+'/Pelbagai" class="btn btn-primary btn-sm waves-effect waves-light">Excel</a>'); | |||||
| $('#link1').show(); | |||||
| $('#link2').html('<a target="_blank" href="'+SITEURL+'/download/excel/compound/'+filename+'/Pelbagai" class="btn btn-primary btn-sm waves-effect waves-light">Excel</a>'); | |||||
| $('#link2').show(); | |||||
| }, | }, | ||||
| error: function (xhr, ajaxOptions, thrownError) { | error: function (xhr, ajaxOptions, thrownError) { | ||||
| console.log(thrownError); | console.log(thrownError); | ||||
| } | } | ||||
| }); | }); | ||||
| } | } | ||||
| }, | |||||
| }, | |||||
| "language": { | "language": { | ||||
| "paginate": { | "paginate": { | ||||
| "previous": "Sebelum", | "previous": "Sebelum", | ||||
| "info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri", | "info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri", | ||||
| "sSearch": "Cari:", | "sSearch": "Cari:", | ||||
| } | } | ||||
| }); | |||||
| }); | |||||
| }); | |||||
| }); |
| { "data": "enforcer", "name": "enforcer" }, | { "data": "enforcer", "name": "enforcer" }, | ||||
| { "data": "status_kemaskini","name": "status", orderable: false, searchable: false }, | { "data": "status_kemaskini","name": "status", orderable: false, searchable: false }, | ||||
| { "data": "_id", "name": "action", orderable: false, searchable: false }, | { "data": "_id", "name": "action", orderable: false, searchable: false }, | ||||
| ], | |||||
| ], | |||||
| "columnDefs": [ | "columnDefs": [ | ||||
| { | |||||
| { | |||||
| "render": function ( data, type, row, meta ) { | "render": function ( data, type, row, meta ) { | ||||
| if (data != '') { | if (data != '') { | ||||
| return '<label class="label label-success">'+data+'</label> '+(meta.row+1); | return '<label class="label label-success">'+data+'</label> '+(meta.row+1); | ||||
| { | { | ||||
| "render": function ( data, type, row ) { | "render": function ( data, type, row ) { | ||||
| return '<div style="text-align:center"><a target="_blank" href="'+SITEURL+'/main/compound/'+row.kpd+'/index" class="btn btn-info btn-sm waves-effect waves-light">TERUSKAN</a>' | return '<div style="text-align:center"><a target="_blank" href="'+SITEURL+'/main/compound/'+row.kpd+'/index" class="btn btn-info btn-sm waves-effect waves-light">TERUSKAN</a>' | ||||
| +'<button onclick="getDetail(\''+data+'\')" class="btn btn-primary btn-sm waves-effect waves-light">KEMASKINI STATUS</button></div>'; | |||||
| +'<button onclick="getDetail(\''+data+'\')" class="btn btn-primary btn-sm waves-effect waves-light">KEMASKINI STATUS</button></div>'; | |||||
| }, | }, | ||||
| "targets": 10, | "targets": 10, | ||||
| }, | }, | ||||
| ], | |||||
| ], | |||||
| "drawCallback": function(settings) { | "drawCallback": function(settings) { | ||||
| var api = this.api(); | var api = this.api(); | ||||
| // Output the data for the visible rows to the browser's console | // Output the data for the visible rows to the browser's console | ||||
| } | } | ||||
| }); | }); | ||||
| } | } | ||||
| }, | |||||
| }, | |||||
| "language": { | "language": { | ||||
| "paginate": { | "paginate": { | ||||
| "previous": "Sebelum", | "previous": "Sebelum", | ||||
| "info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri", | "info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri", | ||||
| "sSearch": "Cari:", | "sSearch": "Cari:", | ||||
| } | } | ||||
| }); | |||||
| }); | |||||
| }); | |||||
| }); |
| $(document).ready( function () { | $(document).ready( function () { | ||||
| tablePl = $('#compoundPelbagai').DataTable({ | |||||
| tableP2 = $('#compoundPelbagai').DataTable({ | |||||
| // "dom": 'Blfrtip', | // "dom": 'Blfrtip', | ||||
| // "buttons": [ | // "buttons": [ | ||||
| // 'copy', 'csv', 'excel', 'pdf', 'print' | // 'copy', 'csv', 'excel', 'pdf', 'print' |
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="col-lg-3"> | |||||
| <label><b>Jenis Notis/Kompaun <code>*</code></b></label> | |||||
| <select class="form-control form-control-sm" name="type" id="type_C" required> | |||||
| <option value="Parkir">Parkir</option> | |||||
| <option value="Pelbagai_LESEN">Pelbagai LESEN</option> | |||||
| <option value="Pelbagai_JPB">Pelbagai JPB</option> | |||||
| <option value="Pelbagai_KT">Pelbagai KT</option> | |||||
| <option value="Pelbagai_PA">Pelbagai PA</option> | |||||
| </select> | |||||
| </div> | |||||
| @if($modul == 'All') | |||||
| <div class="col-lg-3"> | |||||
| <label><b>Jenis Notis/Kompaun <code>*</code></b></label> | |||||
| <select class="form-control form-control-sm" name="type" id="type_C" required> | |||||
| <option value="Parkir">Parkir</option> | |||||
| <option value="Pelbagai_JPB">Pelbagai JPB</option> | |||||
| <option value="Pelbagai_KT">Pelbagai KT</option> | |||||
| <option value="Notis_NMH">Notis NMH</option> | |||||
| <option value="Notis_NHN">Notis NHN</option> | |||||
| <option value="Notis_NKG">Notis NKG</option> | |||||
| <option value="Notis_PA">Notis PA</option> | |||||
| <option value="Notis_NPPM">Notis NPPM</option> | |||||
| </select> | |||||
| </div> | |||||
| @else | |||||
| <div class="col-lg-3"> | |||||
| <label><b>Jenis Notis/Kompaun <code>*</code></b></label> | |||||
| <select class="form-control form-control-sm" name="type" id="type_C" required> | |||||
| <option value="Parkir">Parkir</option> | |||||
| <option value="Pelbagai_JPB">Pelbagai JPB</option> | |||||
| <option value="Pelbagai_KT">Pelbagai KT</option> | |||||
| </select> | |||||
| </div> | |||||
| @endif | |||||
| </div> | </div> | ||||
| <div class="row clearfix" style="margin-bottom: 1.25em"> | <div class="row clearfix" style="margin-bottom: 1.25em"> | ||||
| <div class="col-lg-3"> | <div class="col-lg-3"> | ||||
| <input type="date" class=" form-control form-control-sm" value="{{ $now }}" name="start_date" id="start_date" required/> | <input type="date" class=" form-control form-control-sm" value="{{ $now }}" name="start_date" id="start_date" required/> | ||||
| </div> | </div> | ||||
| @if($modul != '02') | |||||
| <span><b>-</b></span> | <span><b>-</b></span> | ||||
| <div class="col-lg-3"> | <div class="col-lg-3"> | ||||
| <input type="date" class="form-control form-control-sm" value="{{ $now }}" name="end_date" id="end_date" /> | <input type="date" class="form-control form-control-sm" value="{{ $now }}" name="end_date" id="end_date" /> | ||||
| </div> | </div> | ||||
| @endif | |||||
| </div> | </div> | ||||
| <div class="row clearfix" style="margin-bottom: 1.25em"> | <div class="row clearfix" style="margin-bottom: 1.25em"> |
| </div> | </div> | ||||
| <div class="col-lg-3"> | <div class="col-lg-3"> | ||||
| <label><b>Jenis Kompaun <code>*</code></b></label> | |||||
| <label><b>Jenis Notis/Kompaun <code>*</code></b></label> | |||||
| <select class="form-control form-control-sm" name="type" id="type_C" required> | <select class="form-control form-control-sm" name="type" id="type_C" required> | ||||
| <option value="Parkir">Parkir</option> | |||||
| <option value="Pelbagai_LESEN">Pelbagai LESEN</option> | |||||
| <option value="Pelbagai_JPB">Pelbagai JPB</option> | |||||
| <option value="Pelbagai_KT">Pelbagai KT</option> | |||||
| <option value="Pelbagai_PA">Pelbagai PA</option> | |||||
| <option value="Notis_NMH">Notis NMH</option> | |||||
| <option value="Notis_NHN">Notis NHN</option> | |||||
| <option value="Notis_NKG">Notis NKG</option> | |||||
| <option value="Notis_PA">Notis PA</option> | |||||
| <option value="Notis_NPPM">Notis NPPM</option> | |||||
| </select> | </select> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="col-lg-3"> | <div class="col-lg-3"> | ||||
| <input type="date" class=" form-control form-control-sm" value="{{ $now }}" name="start_date" id="start_date" required/> | <input type="date" class=" form-control form-control-sm" value="{{ $now }}" name="start_date" id="start_date" required/> | ||||
| </div> | </div> | ||||
| @if($modul != '02') | |||||
| <span><b>-</b></span> | <span><b>-</b></span> | ||||
| <div class="col-lg-3"> | <div class="col-lg-3"> | ||||
| <input type="date" class="form-control form-control-sm" value="{{ $now }}" name="end_date" id="end_date" /> | <input type="date" class="form-control form-control-sm" value="{{ $now }}" name="end_date" id="end_date" /> | ||||
| </div> | </div> | ||||
| @endif | |||||
| </div> | </div> | ||||
| <div class="row clearfix" style="margin-bottom: 1.25em"> | <div class="row clearfix" style="margin-bottom: 1.25em"> |
| @extends('layout.master', ['uid' => $user->_id, 'token' => $user->token_firebase]) | |||||
| @section('page_title', 'Kompaun') | |||||
| @section('sub_page_title', '') | |||||
| @section('name', $user->StaffDetail->full_name) | |||||
| @section('img_profile', $user->StaffDetail->profile_img) | |||||
| @section('content') | |||||
| <style type="text/css"> | |||||
| select.form-control, select.form-control:focus, select.form-control:hover { | |||||
| border: 1px solid #ccc !important; | |||||
| height: auto !important; | |||||
| } | |||||
| .panel-group .panel { | |||||
| margin-bottom: 0; | |||||
| overflow: hidden; | |||||
| border-radius: 4px; | |||||
| } | |||||
| .panel-default { | |||||
| border-color: #ddd; | |||||
| } | |||||
| .panel-default>.panel-heading { | |||||
| color: #333; | |||||
| background-color: #f5f5f5; | |||||
| border-color: #ddd; | |||||
| } | |||||
| .panel-title { | |||||
| margin-top: 0; | |||||
| margin-bottom: 0; | |||||
| font-size: 16px; | |||||
| color: inherit; | |||||
| } | |||||
| .panel-body .table>thead>tr>th, .panel-body .table>tbody>tr>th, .panel-body .table>tfoot>tr>th, .panel-body .table>thead>tr>td, .panel-body .table>tbody>tr>td, .panel-body .table>tfoot>tr>td , .panel-body div{ | |||||
| padding: 8px 15px; | |||||
| line-height: 1.428571429; | |||||
| vertical-align: top; | |||||
| border-top: 1px solid #ddd; | |||||
| } | |||||
| .glyphicon { margin-right:10px; } | |||||
| .panel-body { padding:0px; } | |||||
| .panel-body table tr td { padding-left: 15px } | |||||
| .panel-body table tr td a:hover , .panel-body div a:hover{ color: #fff !important; } | |||||
| .panel-body .table, .panel-body div {margin-bottom: 0px; } | |||||
| .r-padd { padding-right: 5%; } | |||||
| .active { color: #d84315; } | |||||
| .active:hover { color: #d84315; } | |||||
| th { font-weight: 600; } | |||||
| table.dataTable.nowrap th, table.dataTable.nowrap td { | |||||
| white-space: pre-line !important; | |||||
| } | |||||
| table.nowrap th, table.nowrap td { | |||||
| white-space: pre-line !important; | |||||
| } | |||||
| /*.dataTables_length { | |||||
| float:right !important; | |||||
| }*/ | |||||
| </style> | |||||
| <div class="inner-page"> | |||||
| <div class="row"> | |||||
| @include('main-dashboard.compound._part.menu_category') | |||||
| @include('main-dashboard.compound._part.filter_form') | |||||
| </div> | |||||
| <div class="row"> | |||||
| <div class="col-md-12"> | |||||
| <div class="card"> | |||||
| <div class="card-header"> | |||||
| <div class="row"> | |||||
| <div class="col-md-8"> | |||||
| <h5>Senarai Semua Kompaun</h5> | |||||
| </div> | |||||
| <div class="col-md-4"> | |||||
| <div id="link" style="float:right"></div> | |||||
| <div id="link1" style="float:right"></div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| <div class="card-body"> | |||||
| <div id="viewParkir"> | |||||
| @include('main-dashboard.compound._part.compound_parkir') | |||||
| </div> | |||||
| <div id="viewPelbagai"> | |||||
| @include('main-dashboard.compound._part.compound_pelbagai') | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| <div class="modal fade" id="kemaskiniC" tabindex="-1" role="dialog"> | |||||
| <div class="modal-dialog" role="document"> | |||||
| <div class="modal-content"> | |||||
| <form class="form-horizontal" id="updateSt"> | |||||
| <div class="modal-header"> | |||||
| <h5 class="modal-title">Kemaskini Status Kompaun</h5> | |||||
| <button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |||||
| <span aria-hidden="true">×</span> | |||||
| </button> | |||||
| </div> | |||||
| <div class="modal-body"> | |||||
| <input type="hidden" name="id" id="id" value="" required/> | |||||
| <input type="hidden" name="typeK" id="typeK" value="" required/> | |||||
| <input type="hidden" name="current_id" id="current_id" value="{{ $user->_id }}" required/> | |||||
| <div class="form-group"> | |||||
| <label class="col-sm-6 control-label"><b>Status</b></label> | |||||
| <div class="col-sm-12"> | |||||
| <select class="form-control" name="status" required> | |||||
| <option value="Belum Bayar">Belum Bayar</option> | |||||
| <option value="Berbayar">Berbayar</option> | |||||
| <option value="Batal">Batal</option> | |||||
| <option value="Buang">Batal (Sistem)</option> | |||||
| </select> | |||||
| </div> | |||||
| </div> | |||||
| <div class="form-group"> | |||||
| <label class="col-sm-6 control-label"><b>Catatan <code>*</code></b></label> | |||||
| <div class="col-sm-12"> | |||||
| <textarea class="form-control" name="remark"></textarea> | |||||
| </div> | |||||
| </div> | |||||
| <div class="form-group"> | |||||
| <label class="col-sm-6 control-label"><b>Jumlah Dibayar <code>*</code></b></label> | |||||
| <div class="col-sm-12"> | |||||
| <input type="text" class="form-control autonumber" name="amount" data-v-min="0.00" data-v-max="99999.00"placeholder="0.00" required/> | |||||
| </div> | |||||
| </div> | |||||
| <div class="form-group"> | |||||
| <label class="col-sm-6 control-label"><b>Amaun Tunggakan</b> <code>*</code></label> | |||||
| <div class="col-sm-12"> | |||||
| <input type="text" class="form-control autonumber" name="tunggakan" data-v-min="0.00" data-v-max="99999.00" placeholder="0.00" required/> | |||||
| <code>Sekiranya tiada amaun tunggakan, sila letak 0. Amaun tunggakan ini akan diguna untuk laporan</code> | |||||
| </div> | |||||
| </div> | |||||
| <div class="form-group" id="datePay"> | |||||
| <label class="col-sm-6 control-label"><b>Tarikh Bayar</b> <code>*</code></label> | |||||
| <div class="col-sm-12"> | |||||
| <input type="datetime-local" class="form-control" name="tarikh_bayar" id="tarikh_bayar"/> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| <div class="modal-footer"> | |||||
| <button type="button" class="btn btn-sm btn-secondary mobtn" data-dismiss="modal">Close</button> | |||||
| <button id="submit" class="btn btn-sm btn-primary waves-effect waves-light">KEMASKINI</button> | |||||
| </div> | |||||
| </form> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| @endsection | |||||
| @section('external_js') | |||||
| <script type="text/javascript"> | |||||
| var SITEURL = '{{URL::to('')}}'; | |||||
| var tableP, tablePl; | |||||
| var queryString1 = '', queryString2 = '', token = "{{ csrf_token() }}"; | |||||
| $('#viewParkir').hide(); $('#link').hide(); | |||||
| $('#viewPelbagai').hide(); $('#link1').hide(); | |||||
| </script> | |||||
| <script type="text/javascript" src="{{ asset('js/dataParkir.js') }}"></script> | |||||
| <script type="text/javascript" src="{{ asset('js/dataPelbagai.js') }}"></script> | |||||
| <script type="text/javascript" src="{{ asset('js/function_checkbox.js') }}"></script> | |||||
| <script type="text/javascript"> | |||||
| $('#tapis').on('click', function (e) { | |||||
| e.preventDefault(); | |||||
| $('#link').hide(); $('#link1').hide(); | |||||
| var form = $("#filter_form")[0]; | |||||
| if(form.checkValidity() === false) { | |||||
| e.stopPropagation(); | |||||
| var isValid = form.reportValidity(); | |||||
| }else { | |||||
| $('#viewPelbagai').hide(); | |||||
| $('#viewParkir').hide(); | |||||
| console.log("kpd checked = " + $('#check_kpd').prop("checked")); | |||||
| if($('#check_kpd').prop("checked") == false){ | |||||
| $('#kpd').val(''); | |||||
| } | |||||
| if($('#check_date').prop("checked") == false){ | |||||
| $('#start_date').val(''); | |||||
| $('#end_date').val(''); | |||||
| } | |||||
| if($('#checkPlateNo').prop("checked") == false){ | |||||
| $('#plate_no').val(''); | |||||
| } | |||||
| if($('#checkCompanyNo').prop("checked") == false){ | |||||
| $('#company_no').val(''); | |||||
| } | |||||
| if($('#checkNric').prop("checked") == false){ | |||||
| $('#nric').val(''); | |||||
| } | |||||
| if($('#checkLicense').prop("checked") == false){ | |||||
| $('#license').val(''); | |||||
| } | |||||
| if($('#checkName').prop("checked") == false){ | |||||
| $('#nameP').val(''); | |||||
| } | |||||
| if($('#checkCompanyName').prop("checked") == false){ | |||||
| $('#company_name').val(''); | |||||
| } | |||||
| // Sumbit Search | |||||
| var form_data = $('#filter_form').serialize(); | |||||
| if($('#type_C').val() == 'Parkir'){ | |||||
| queryString1 = '?'+form_data; | |||||
| $('#viewPelbagai').hide(); | |||||
| $('#viewParkir').show(); | |||||
| tableP.ajax.url(SITEURL +'/api/list/compound'+ queryString1).load(); | |||||
| }else if($('#type_C').val() == "Pelbagai"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| } | |||||
| else if($('#type_C').val() == "Pelbagai_JPB"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| } | |||||
| else if($('#type_C').val() == "Pelbagai_KT"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| } | |||||
| else if($('#type_C').val() == "Pelbagai_PA"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| } | |||||
| else if($('#type_C').val() == "Pelbagai_LESEN"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| } | |||||
| console.log(SITEURL +'/api/list/compound'+ queryString1); | |||||
| console.log(SITEURL +'/api/list/compound'+ queryString2); | |||||
| } | |||||
| return false; | |||||
| }); | |||||
| $('#submit').on('click', function (e) { | |||||
| e.preventDefault(); | |||||
| var form = $("#updateSt")[0]; | |||||
| if(form.checkValidity() === false) { | |||||
| e.stopPropagation(); | |||||
| var isValid = form.reportValidity(); | |||||
| }else { | |||||
| var input = prompt("Adakah anda pasti kemaskini status kompaun ini? \nTaip 'yes' untuk teruskan", ""); | |||||
| if (input == "yes") { | |||||
| var form_data = $('#updateSt').serialize(); | |||||
| // alert(form_data); | |||||
| $.ajax({ | |||||
| type: "POST", | |||||
| url: "{{ url('/api/update/compound/via-dashboard') }}", | |||||
| data: form_data, | |||||
| success:function(data){ | |||||
| if(data['success'] == true){ | |||||
| if($('#type_C').val() == 'Parkir'){ | |||||
| $('#viewPelbagai').hide(); | |||||
| $('#viewParkir').show(); | |||||
| tableP.ajax.url(SITEURL +'/api/list/compound'+ queryString1).load(); | |||||
| $('#kemaskiniC').modal('hide'); | |||||
| }else if($('#type_C').val() == "Pelbagai"){ | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| $('#kemaskiniC').modal('hide'); | |||||
| } | |||||
| }else if(data['success'] == false){ | |||||
| alert(response.data.message); | |||||
| $('#kemaskiniC').modal('hide'); | |||||
| } | |||||
| }, | |||||
| error: function (xhr, ajaxOptions, thrownError) { | |||||
| console.log(thrownError); | |||||
| // swal("Error deleting!", "Rekod tidak berjaya di buang", "error"); | |||||
| } | |||||
| }); | |||||
| }else{ | |||||
| alert('Kemaskini status dibatalkan'); | |||||
| $('#kemaskiniC').modal('hide'); | |||||
| } | |||||
| } | |||||
| }); | |||||
| function getDetail(id) { | |||||
| $('#datePay').hide(); | |||||
| $('#id').val(id); | |||||
| if($('#type_C').val() == 'Parkir'){ | |||||
| $('#datePay').hide(); | |||||
| $('#tarikh_bayar').prop('required', false); | |||||
| }else { | |||||
| $('#datePay').show(); | |||||
| $('#tarikh_bayar').prop('required', true); | |||||
| } | |||||
| $('#kemaskiniC').modal({ | |||||
| show: true | |||||
| }) | |||||
| }; | |||||
| </script> | |||||
| @endsection | |||||
| @extends('layout.master', ['uid' => $user->_id, 'token' => $user->token_firebase]) | |||||
| @section('page_title', 'Kompaun') | |||||
| @section('sub_page_title', '') | |||||
| @section('name', $user->StaffDetail->full_name) | |||||
| @section('img_profile', $user->StaffDetail->profile_img) | |||||
| @section('content') | |||||
| <style type="text/css"> | |||||
| select.form-control, select.form-control:focus, select.form-control:hover { | |||||
| border: 1px solid #ccc !important; | |||||
| height: auto !important; | |||||
| } | |||||
| .panel-group .panel { | |||||
| margin-bottom: 0; | |||||
| overflow: hidden; | |||||
| border-radius: 4px; | |||||
| } | |||||
| .panel-default { | |||||
| border-color: #ddd; | |||||
| } | |||||
| .panel-default>.panel-heading { | |||||
| color: #333; | |||||
| background-color: #f5f5f5; | |||||
| border-color: #ddd; | |||||
| } | |||||
| .panel-title { | |||||
| margin-top: 0; | |||||
| margin-bottom: 0; | |||||
| font-size: 16px; | |||||
| color: inherit; | |||||
| } | |||||
| .panel-body .table>thead>tr>th, .panel-body .table>tbody>tr>th, .panel-body .table>tfoot>tr>th, .panel-body .table>thead>tr>td, .panel-body .table>tbody>tr>td, .panel-body .table>tfoot>tr>td , .panel-body div{ | |||||
| padding: 8px 15px; | |||||
| line-height: 1.428571429; | |||||
| vertical-align: top; | |||||
| border-top: 1px solid #ddd; | |||||
| } | |||||
| .glyphicon { margin-right:10px; } | |||||
| .panel-body { padding:0px; } | |||||
| .panel-body table tr td { padding-left: 15px } | |||||
| .panel-body table tr td a:hover , .panel-body div a:hover{ color: #fff !important; } | |||||
| .panel-body .table, .panel-body div {margin-bottom: 0px; } | |||||
| .r-padd { padding-right: 5%; } | |||||
| .active { color: #333333; } | |||||
| .active:hover { color: #333333; } | |||||
| th { font-weight: 600; } | |||||
| table.dataTable.nowrap th, table.dataTable.nowrap td { | |||||
| white-space: pre-line !important; | |||||
| } | |||||
| table.nowrap th, table.nowrap td { | |||||
| white-space: pre-line !important; | |||||
| } | |||||
| /*.dataTables_length { | |||||
| float:right !important; | |||||
| }*/ | |||||
| </style> | |||||
| <div class="inner-page"> | |||||
| <div class="row"> | |||||
| @include('main-dashboard.compound._part.menu_category') | |||||
| @include('main-dashboard.compound._part.filter_form') | |||||
| </div> | |||||
| <div class="row"> | |||||
| <div class="col-md-12"> | |||||
| <div class="card"> | |||||
| <div class="card-header"> | |||||
| <div class="row"> | |||||
| <div class="col-md-8"> | |||||
| <h5>Senarai Semua Kompaun</h5> | |||||
| </div> | |||||
| <div class="col-md-4"> | |||||
| <div id="link" style="float:right"></div> | |||||
| <div id="link1" style="float:right"></div> | |||||
| <div id="link2" style="float:right"></div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| <div class="card-body"> | |||||
| <div id="viewParkir"> | |||||
| @include('main-dashboard.compound._part.compound_parkir') | |||||
| </div> | |||||
| <div id="viewPelbagai"> | |||||
| @include('main-dashboard.compound._part.compound_pelbagai') | |||||
| </div> | |||||
| <div id="viewNotis"> | |||||
| <div class="col-lg-12 col-xl-12"> | |||||
| <!-- Nav tabs --> | |||||
| <ul class="nav nav-tabs md-tabs" role="tablist"> | |||||
| <li class="nav-item"> | |||||
| <a class="nav-link active" data-toggle="tab" href="#default" role="tab">Tarikh Mula</a> | |||||
| <div class="slide"></div> | |||||
| </li> | |||||
| <li class="nav-item"> | |||||
| <a class="nav-link" data-toggle="tab" href="#hari3" role="tab">3 Hari Sebelum</a> | |||||
| <div class="slide"></div> | |||||
| </li> | |||||
| <li class="nav-item"> | |||||
| <a class="nav-link" data-toggle="tab" href="#hari7" role="tab">7 Hari Sebelum</a> | |||||
| <div class="slide"></div> | |||||
| </li> | |||||
| </ul> | |||||
| <!-- Tab panes --> | |||||
| <div class="tab-content card-block"> | |||||
| <div class="tab-pane active" id="default" role="tabpanel"> | |||||
| <div class="dt-responsive table-responsive"> | |||||
| <table id="reportD" class="table table-sm table-striped table-bordered nowrap" style="width:100%"> | |||||
| <thead> | |||||
| <tr> | |||||
| <th>#</th> | |||||
| <th>Modul</th> | |||||
| <th>No Kpn</th> | |||||
| <th>Jenis</th> | |||||
| <th>Tarikh Masa</th> | |||||
| <th>Kesalahan</th> | |||||
| <th>Nric</th> | |||||
| <th>Nama</th> | |||||
| <th>PenguatKuasa</th> | |||||
| <th>Tindakan</th> | |||||
| </tr> | |||||
| </thead> | |||||
| <tfoot> | |||||
| <tr> | |||||
| <th>#</th> | |||||
| <th>Modul</th> | |||||
| <th>No Kpn</th> | |||||
| <th>Jenis</th> | |||||
| <th>Tarikh Masa</th> | |||||
| <th>Kesalahan</th> | |||||
| <th>Nric</th> | |||||
| <th>Nama</th> | |||||
| <th>PenguatKuasa</th> | |||||
| <th>Tindakan</th> | |||||
| </tr> | |||||
| </tfoot> | |||||
| </table> | |||||
| </div> | |||||
| </div> | |||||
| <div class="tab-pane" id="hari3" role="tabpanel"> | |||||
| <div class="dt-responsive table-responsive"> | |||||
| <table id="report3" class="table table-sm table-striped table-bordered nowrap" style="width:100%"> | |||||
| <thead> | |||||
| <tr> | |||||
| <th>#</th> | |||||
| <th>Modul</th> | |||||
| <th>No Kpn</th> | |||||
| <th>Jenis</th> | |||||
| <th>Tarikh Masa</th> | |||||
| <th>Kesalahan</th> | |||||
| <th>Nric</th> | |||||
| <th>Nama</th> | |||||
| <th>PenguatKuasa</th> | |||||
| <th>Tindakan</th> | |||||
| </tr> | |||||
| </thead> | |||||
| <tfoot> | |||||
| <tr> | |||||
| <th>#</th> | |||||
| <th>Modul</th> | |||||
| <th>No Kpn</th> | |||||
| <th>Jenis</th> | |||||
| <th>Tarikh Masa</th> | |||||
| <th>Kesalahan</th> | |||||
| <th>Nric</th> | |||||
| <th>Nama</th> | |||||
| <th>PenguatKuasa</th> | |||||
| <th>Tindakan</th> | |||||
| </tr> | |||||
| </tfoot> | |||||
| </table> | |||||
| </div> | |||||
| </div> | |||||
| <div class="tab-pane" id="hari7" role="tabpanel"> | |||||
| <div class="dt-responsive table-responsive"> | |||||
| <table id="report7" class="table table-sm table-striped table-bordered nowrap" style="width:100%"> | |||||
| <thead> | |||||
| <tr> | |||||
| <th>#</th> | |||||
| <th>Modul</th> | |||||
| <th>No Kpn</th> | |||||
| <th>Jenis</th> | |||||
| <th>Tarikh Masa</th> | |||||
| <th>Kesalahan</th> | |||||
| <th>Nric</th> | |||||
| <th>Nama</th> | |||||
| <th>PenguatKuasa</th> | |||||
| <th>Tindakan</th> | |||||
| </tr> | |||||
| </thead> | |||||
| <tfoot> | |||||
| <tr> | |||||
| <th>#</th> | |||||
| <th>Modul</th> | |||||
| <th>No Kpn</th> | |||||
| <th>Jenis</th> | |||||
| <th>Tarikh Masa</th> | |||||
| <th>Kesalahan</th> | |||||
| <th>Nric</th> | |||||
| <th>Nama</th> | |||||
| <th>PenguatKuasa</th> | |||||
| <th>Tindakan</th> | |||||
| </tr> | |||||
| </tfoot> | |||||
| </table> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| <div class="modal fade" id="kemaskiniC" tabindex="-1" role="dialog"> | |||||
| <div class="modal-dialog" role="document"> | |||||
| <div class="modal-content"> | |||||
| <form class="form-horizontal" id="updateSt"> | |||||
| <div class="modal-header"> | |||||
| <h5 class="modal-title">Kemaskini Status Kompaun</h5> | |||||
| <button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |||||
| <span aria-hidden="true">×</span> | |||||
| </button> | |||||
| </div> | |||||
| <div class="modal-body"> | |||||
| <input type="hidden" name="id" id="id" value="" required/> | |||||
| <input type="hidden" name="typeK" id="typeK" value="" required/> | |||||
| <input type="hidden" name="current_id" id="current_id" value="{{ $user->_id }}" required/> | |||||
| <div class="form-group"> | |||||
| <label class="col-sm-6 control-label"><b>Status</b></label> | |||||
| <div class="col-sm-12"> | |||||
| <select class="form-control" name="status" required> | |||||
| <option value="Belum Bayar">Belum Bayar</option> | |||||
| <option value="Berbayar">Berbayar</option> | |||||
| <option value="Batal">Batal</option> | |||||
| <option value="Buang">Batal (Sistem)</option> | |||||
| </select> | |||||
| </div> | |||||
| </div> | |||||
| <div class="form-group"> | |||||
| <label class="col-sm-6 control-label"><b>Catatan <code>*</code></b></label> | |||||
| <div class="col-sm-12"> | |||||
| <textarea class="form-control" name="remark"></textarea> | |||||
| </div> | |||||
| </div> | |||||
| <div class="form-group"> | |||||
| <label class="col-sm-6 control-label"><b>Jumlah Dibayar <code>*</code></b></label> | |||||
| <div class="col-sm-12"> | |||||
| <input type="text" class="form-control autonumber" name="amount" data-v-min="0.00" data-v-max="99999.00"placeholder="0.00" required/> | |||||
| </div> | |||||
| </div> | |||||
| <div class="form-group"> | |||||
| <label class="col-sm-6 control-label"><b>Amaun Tunggakan</b> <code>*</code></label> | |||||
| <div class="col-sm-12"> | |||||
| <input type="text" class="form-control autonumber" name="tunggakan" data-v-min="0.00" data-v-max="99999.00" placeholder="0.00" required/> | |||||
| <code>Sekiranya tiada amaun tunggakan, sila letak 0. Amaun tunggakan ini akan diguna untuk laporan</code> | |||||
| </div> | |||||
| </div> | |||||
| <div class="form-group" id="datePay"> | |||||
| <label class="col-sm-6 control-label"><b>Tarikh Bayar</b> <code>*</code></label> | |||||
| <div class="col-sm-12"> | |||||
| <input type="datetime-local" class="form-control" name="tarikh_bayar" id="tarikh_bayar"/> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| <div class="modal-footer"> | |||||
| <button type="button" class="btn btn-sm btn-secondary mobtn" data-dismiss="modal">Close</button> | |||||
| <button id="submit" class="btn btn-sm btn-primary waves-effect waves-light">KEMASKINI</button> | |||||
| </div> | |||||
| </form> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| @endsection | |||||
| @section('external_js') | |||||
| <script type="text/javascript"> | |||||
| var SITEURL = '{{URL::to('')}}'; | |||||
| var tableP, tableP2, tableP1, tableP3, tableP7; | |||||
| var queryString1 = '', queryString2 = '', token = "{{ csrf_token() }}"; | |||||
| $('#viewParkir').hide(); $('#link').hide(); | |||||
| $('#viewPelbagai').hide(); $('#link1').hide(); | |||||
| $('#viewNotis').hide(); $('#link2').hide(); | |||||
| </script> | |||||
| <script type="text/javascript" src="{{ asset('js/dataParkir.js') }}"></script> | |||||
| <script type="text/javascript" src="{{ asset('js/dataPelbagai.js') }}"></script> | |||||
| <script type="text/javascript" src="{{ asset('js/dataNotis.js') }}"></script> | |||||
| <script type="text/javascript" src="{{ asset('js/function_checkbox.js') }}"></script> | |||||
| <script type="text/javascript"> | |||||
| $('#tapis').on('click', function (e) { | |||||
| e.preventDefault(); | |||||
| $('#link').hide(); $('#link1').hide(); | |||||
| var form = $("#filter_form")[0]; | |||||
| if(form.checkValidity() === false) { | |||||
| e.stopPropagation(); | |||||
| var isValid = form.reportValidity(); | |||||
| }else { | |||||
| $('#viewPelbagai').hide(); | |||||
| $('#viewParkir').hide(); | |||||
| console.log("kpd checked = " + $('#check_kpd').prop("checked")); | |||||
| if($('#check_kpd').prop("checked") == false){ | |||||
| $('#kpd').val(''); | |||||
| } | |||||
| if($('#check_date').prop("checked") == false){ | |||||
| $('#start_date').val(''); | |||||
| $('#end_date').val(''); | |||||
| } | |||||
| if($('#checkPlateNo').prop("checked") == false){ | |||||
| $('#plate_no').val(''); | |||||
| } | |||||
| if($('#checkCompanyNo').prop("checked") == false){ | |||||
| $('#company_no').val(''); | |||||
| } | |||||
| if($('#checkNric').prop("checked") == false){ | |||||
| $('#nric').val(''); | |||||
| } | |||||
| if($('#checkLicense').prop("checked") == false){ | |||||
| $('#license').val(''); | |||||
| } | |||||
| if($('#checkName').prop("checked") == false){ | |||||
| $('#nameP').val(''); | |||||
| } | |||||
| if($('#checkCompanyName').prop("checked") == false){ | |||||
| $('#company_name').val(''); | |||||
| } | |||||
| // Sumbit Search | |||||
| var form_data = $('#filter_form').serialize(); | |||||
| if($('#type_C').val() == 'Parkir'){ | |||||
| queryString1 = '?'+form_data; | |||||
| $('#viewPelbagai').hide(); | |||||
| $('#viewParkir').show(); | |||||
| $('#viewNotis').hide(); | |||||
| tableP.ajax.url(SITEURL +'/api/list/compound'+ queryString1).load(); | |||||
| } | |||||
| else if($('#type_C').val() == "Pelbagai_JPB"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| $('#viewNotis').hide(); | |||||
| tableP2.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| } | |||||
| else if($('#type_C').val() == "Pelbagai_KT"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| $('#viewNotis').hide(); | |||||
| tableP2.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| } | |||||
| else if($('#type_C').val() == 'Notis_NPPM'){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').hide(); | |||||
| $('#viewParkir').hide(); | |||||
| $('#viewNotis').show(); | |||||
| tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| }else if($('#type_C').val() == "Notis_NMH"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').hide(); | |||||
| $('#viewParkir').hide(); | |||||
| $('#viewNotis').show(); | |||||
| tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| }else if($('#type_C').val() == "Notis_NHN"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| $('#viewNotis').show(); | |||||
| tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| }else if($('#type_C').val() == "Notis_NKG"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| $('#viewNotis').show(); | |||||
| tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| }else if($('#type_C').val() == "Notis_PA"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| $('#viewNotis').show(); | |||||
| tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| } | |||||
| console.log(SITEURL +'/api/list/compound'+ queryString1); | |||||
| console.log(SITEURL +'/api/list/compound'+ queryString2); | |||||
| } | |||||
| return false; | |||||
| }); | |||||
| $('#submit').on('click', function (e) { | |||||
| e.preventDefault(); | |||||
| var form = $("#updateSt")[0]; | |||||
| if(form.checkValidity() === false) { | |||||
| e.stopPropagation(); | |||||
| var isValid = form.reportValidity(); | |||||
| }else { | |||||
| var input = prompt("Adakah anda pasti kemaskini status kompaun ini? \nTaip 'yes' untuk teruskan", ""); | |||||
| if (input == "yes") { | |||||
| var form_data = $('#updateSt').serialize(); | |||||
| // alert(form_data); | |||||
| $.ajax({ | |||||
| type: "POST", | |||||
| url: "{{ url('/api/update/compound/via-dashboard') }}", | |||||
| data: form_data, | |||||
| success:function(data){ | |||||
| if(data['success'] == true){ | |||||
| if($('#type_C').val() == 'Parkir'){ | |||||
| $('#viewPelbagai').hide(); | |||||
| $('#viewParkir').show(); | |||||
| tableP.ajax.url(SITEURL +'/api/list/compound'+ queryString1).load(); | |||||
| $('#kemaskiniC').modal('hide'); | |||||
| }else if($('#type_C').val() == "Pelbagai"){ | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| $('#kemaskiniC').modal('hide'); | |||||
| } | |||||
| }else if(data['success'] == false){ | |||||
| alert(response.data.message); | |||||
| $('#kemaskiniC').modal('hide'); | |||||
| } | |||||
| }, | |||||
| error: function (xhr, ajaxOptions, thrownError) { | |||||
| console.log(thrownError); | |||||
| // swal("Error deleting!", "Rekod tidak berjaya di buang", "error"); | |||||
| } | |||||
| }); | |||||
| }else{ | |||||
| alert('Kemaskini status dibatalkan'); | |||||
| $('#kemaskiniC').modal('hide'); | |||||
| } | |||||
| } | |||||
| }); | |||||
| function getDetail(id) { | |||||
| $('#datePay').hide(); | |||||
| $('#id').val(id); | |||||
| if($('#type_C').val() == 'Parkir'){ | |||||
| $('#datePay').hide(); | |||||
| $('#tarikh_bayar').prop('required', false); | |||||
| }else { | |||||
| $('#datePay').show(); | |||||
| $('#tarikh_bayar').prop('required', true); | |||||
| } | |||||
| $('#kemaskiniC').modal({ | |||||
| show: true | |||||
| }) | |||||
| }; | |||||
| </script> | |||||
| @endsection |
| @extends('layout.master', ['uid' => $user->_id, 'token' => $user->token_firebase]) | |||||
| @section('page_title', 'Kompaun') | |||||
| @section('sub_page_title', '') | |||||
| @section('name', $user->StaffDetail->full_name) | |||||
| @section('img_profile', $user->StaffDetail->profile_img) | |||||
| @section('content') | |||||
| <style type="text/css"> | |||||
| select.form-control, select.form-control:focus, select.form-control:hover { | |||||
| border: 1px solid #ccc !important; | |||||
| height: auto !important; | |||||
| } | |||||
| .panel-group .panel { | |||||
| margin-bottom: 0; | |||||
| overflow: hidden; | |||||
| border-radius: 4px; | |||||
| } | |||||
| .panel-default { | |||||
| border-color: #ddd; | |||||
| } | |||||
| .panel-default>.panel-heading { | |||||
| color: #333; | |||||
| background-color: #f5f5f5; | |||||
| border-color: #ddd; | |||||
| } | |||||
| .panel-title { | |||||
| margin-top: 0; | |||||
| margin-bottom: 0; | |||||
| font-size: 16px; | |||||
| color: inherit; | |||||
| } | |||||
| .panel-body .table>thead>tr>th, .panel-body .table>tbody>tr>th, .panel-body .table>tfoot>tr>th, .panel-body .table>thead>tr>td, .panel-body .table>tbody>tr>td, .panel-body .table>tfoot>tr>td , .panel-body div{ | |||||
| padding: 8px 15px; | |||||
| line-height: 1.428571429; | |||||
| vertical-align: top; | |||||
| border-top: 1px solid #ddd; | |||||
| } | |||||
| .glyphicon { margin-right:10px; } | |||||
| .panel-body { padding:0px; } | |||||
| .panel-body table tr td { padding-left: 15px } | |||||
| .panel-body table tr td a:hover , .panel-body div a:hover{ color: #d84315 !important; } | |||||
| .panel-body .table, .panel-body div {margin-bottom: 0px; } | |||||
| .r-padd { padding-right: 5%; } | |||||
| .active { color: #d84315; } | |||||
| .active:hover { color: #d84315; } | |||||
| th { font-weight: 600; } | |||||
| table.dataTable.nowrap th, table.dataTable.nowrap td { | |||||
| white-space: pre-line !important; | |||||
| } | |||||
| table.nowrap th, table.nowrap td { | |||||
| white-space: pre-line !important; | |||||
| } | |||||
| </style> | |||||
| <div class="inner-page"> | |||||
| <div class="row"> | |||||
| @include('main-dashboard.compound._part.menu_category') | |||||
| @include('main-dashboard.compound._part.filter_form') | |||||
| </div> | |||||
| <div class="row"> | |||||
| <div class="col-md-12"> | |||||
| <div class="card"> | |||||
| <div class="card-header"> | |||||
| <h5>Senarai Kompaun Yang Ada Notis Amaran</h5> | |||||
| <!-- { this.state.dataCompound.length > 0 ? | |||||
| <ExportCSV csvData={this.state.dataCompound} fileName="Report_saman_1" type={this.state.form.type} /> | |||||
| : '' | |||||
| } --> | |||||
| </div> | |||||
| <div class="card-body"> | |||||
| <div id="viewParkir"> | |||||
| @include('main-dashboard.compound._part.compound_parkir') | |||||
| </div> | |||||
| <div id="viewPelbagai"> | |||||
| @include('main-dashboard.compound._part.compound_pelbagai') | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| @endsection | |||||
| @section('external_js') | |||||
| <script type="text/javascript"> | |||||
| var SITEURL = '{{URL::to('')}}'; | |||||
| var tableP, tablePl; | |||||
| var queryString1 = '', queryString2 = ''; | |||||
| $('#viewParkir').hide(); | |||||
| $('#viewPelbagai').hide(); | |||||
| </script> | |||||
| <script type="text/javascript" src="{{ asset('js/dataCompleteParkir.js') }}"></script> | |||||
| <script type="text/javascript" src="{{ asset('js/dataCompletePelbagai.js') }}"></script> | |||||
| <script type="text/javascript" src="{{ asset('js/function_checkbox.js') }}"></script> | |||||
| <script type="text/javascript"> | |||||
| $('#tapis').on('click', function (e) { | |||||
| e.preventDefault(); | |||||
| var form = $("#filter_form")[0]; | |||||
| if(form.checkValidity() === false) { | |||||
| e.stopPropagation(); | |||||
| var isValid = form.reportValidity(); | |||||
| }else { | |||||
| $('#viewPelbagai').hide(); | |||||
| $('#viewParkir').hide(); | |||||
| if($('#check_kpd').prop("checked") == false){ | |||||
| $('#kpd').val(''); | |||||
| } | |||||
| if($('#check_date').prop("checked") == false){ | |||||
| $('#start_date').val(''); | |||||
| $('#end_date').val(''); | |||||
| } | |||||
| if($('#checkPlateNo').prop("checked") == false){ | |||||
| $('#plate_no').val(''); | |||||
| } | |||||
| if($('#checkCompanyNo').prop("checked") == false){ | |||||
| $('#company_no').val(''); | |||||
| } | |||||
| if($('#checkNric').prop("checked") == false){ | |||||
| $('#nric').val(''); | |||||
| } | |||||
| if($('#checkLicense').prop("checked") == false){ | |||||
| $('#license').val(''); | |||||
| } | |||||
| if($('#checkName').prop("checked") == false){ | |||||
| $('#nameP').val(''); | |||||
| } | |||||
| if($('#checkCompanyName').prop("checked") == false){ | |||||
| $('#company_name').val(''); | |||||
| } | |||||
| // Sumbit Search | |||||
| var form_data = $('#filter_form').serialize(); | |||||
| if($('#type_C').val() == 'Parkir'){ | |||||
| queryString1 = '?'+form_data; | |||||
| $('#viewPelbagai').hide(); | |||||
| $('#viewParkir').show(); | |||||
| tableP.ajax.url(SITEURL +'/api/list/compound'+ queryString1).load(); | |||||
| }else if($('#type_C').val() == "Pelbagai"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| }else if($('#type_C').val() == "Pelbagai_JPB"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| }else if($('#type_C').val() == "Pelbagai_KT"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| }else if($('#type_C').val() == "Pelbagai_PA"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| }else if($('#type_C').val() == "Pelbagai_LESEN"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| } | |||||
| console.log(SITEURL +'/api/list/compound'+ queryString1); | |||||
| console.log(SITEURL +'/api/list/compound'+ queryString2); | |||||
| } | |||||
| return false; | |||||
| }); | |||||
| </script> | |||||
| @endsection | |||||
| @extends('layout.master', ['uid' => $user->_id, 'token' => $user->token_firebase]) | |||||
| @section('page_title', 'Kompaun') | |||||
| @section('sub_page_title', '') | |||||
| @section('name', $user->StaffDetail->full_name) | |||||
| @section('img_profile', $user->StaffDetail->profile_img) | |||||
| @section('content') | |||||
| <style type="text/css"> | |||||
| select.form-control, select.form-control:focus, select.form-control:hover { | |||||
| border: 1px solid #ccc !important; | |||||
| height: auto !important; | |||||
| } | |||||
| .panel-group .panel { | |||||
| margin-bottom: 0; | |||||
| overflow: hidden; | |||||
| border-radius: 4px; | |||||
| } | |||||
| .panel-default { | |||||
| border-color: #ddd; | |||||
| } | |||||
| .panel-default>.panel-heading { | |||||
| color: #333; | |||||
| background-color: #f5f5f5; | |||||
| border-color: #ddd; | |||||
| } | |||||
| .panel-title { | |||||
| margin-top: 0; | |||||
| margin-bottom: 0; | |||||
| font-size: 16px; | |||||
| color: inherit; | |||||
| } | |||||
| .panel-body .table>thead>tr>th, .panel-body .table>tbody>tr>th, .panel-body .table>tfoot>tr>th, .panel-body .table>thead>tr>td, .panel-body .table>tbody>tr>td, .panel-body .table>tfoot>tr>td , .panel-body div{ | |||||
| padding: 8px 15px; | |||||
| line-height: 1.428571429; | |||||
| vertical-align: top; | |||||
| border-top: 1px solid #ddd; | |||||
| } | |||||
| .glyphicon { margin-right:10px; } | |||||
| .panel-body { padding:0px; } | |||||
| .panel-body table tr td { padding-left: 15px } | |||||
| .panel-body table tr td a:hover , .panel-body div a:hover{ color: #d84315 !important; } | |||||
| .panel-body .table, .panel-body div {margin-bottom: 0px; } | |||||
| .r-padd { padding-right: 5%; } | |||||
| .active { color: #d84315; } | |||||
| .active:hover { color: #d84315; } | |||||
| th { font-weight: 600; } | |||||
| table.dataTable.nowrap th, table.dataTable.nowrap td { | |||||
| white-space: pre-line !important; | |||||
| } | |||||
| table.nowrap th, table.nowrap td { | |||||
| white-space: pre-line !important; | |||||
| } | |||||
| </style> | |||||
| <div class="inner-page"> | |||||
| <div class="row"> | |||||
| @include('main-dashboard.compound._part.menu_category') | |||||
| @include('main-dashboard.compound._part.filter_form') | |||||
| </div> | |||||
| <div class="row"> | |||||
| <div class="col-md-12"> | |||||
| <div class="card"> | |||||
| <div class="card-header"> | |||||
| <h5>Senarai Kompaun Yang Ada Notis Amaran</h5> | |||||
| <!-- { this.state.dataCompound.length > 0 ? | |||||
| <ExportCSV csvData={this.state.dataCompound} fileName="Report_saman_1" type={this.state.form.type} /> | |||||
| : '' | |||||
| } --> | |||||
| </div> | |||||
| <div class="card-body"> | |||||
| <div id="viewParkir"> | |||||
| @include('main-dashboard.compound._part.compound_parkir') | |||||
| </div> | |||||
| <div id="viewPelbagai"> | |||||
| @include('main-dashboard.compound._part.compound_pelbagai') | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| @endsection | |||||
| @section('external_js') | |||||
| <script type="text/javascript"> | |||||
| var SITEURL = '{{URL::to('')}}'; | |||||
| var tableP, tablePl; | |||||
| var queryString1 = '', queryString2 = ''; | |||||
| $('#viewParkir').hide(); | |||||
| $('#viewPelbagai').hide(); | |||||
| </script> | |||||
| <script type="text/javascript" src="{{ asset('js/dataCompleteParkir.js') }}"></script> | |||||
| <script type="text/javascript" src="{{ asset('js/dataCompletePelbagai.js') }}"></script> | |||||
| <script type="text/javascript" src="{{ asset('js/function_checkbox.js') }}"></script> | |||||
| <script type="text/javascript"> | |||||
| $('#tapis').on('click', function (e) { | |||||
| e.preventDefault(); | |||||
| var form = $("#filter_form")[0]; | |||||
| if(form.checkValidity() === false) { | |||||
| e.stopPropagation(); | |||||
| var isValid = form.reportValidity(); | |||||
| }else { | |||||
| $('#viewPelbagai').hide(); | |||||
| $('#viewParkir').hide(); | |||||
| if($('#check_kpd').prop("checked") == false){ | |||||
| $('#kpd').val(''); | |||||
| } | |||||
| if($('#check_date').prop("checked") == false){ | |||||
| $('#start_date').val(''); | |||||
| $('#end_date').val(''); | |||||
| } | |||||
| if($('#checkPlateNo').prop("checked") == false){ | |||||
| $('#plate_no').val(''); | |||||
| } | |||||
| if($('#checkCompanyNo').prop("checked") == false){ | |||||
| $('#company_no').val(''); | |||||
| } | |||||
| if($('#checkNric').prop("checked") == false){ | |||||
| $('#nric').val(''); | |||||
| } | |||||
| if($('#checkLicense').prop("checked") == false){ | |||||
| $('#license').val(''); | |||||
| } | |||||
| if($('#checkName').prop("checked") == false){ | |||||
| $('#nameP').val(''); | |||||
| } | |||||
| if($('#checkCompanyName').prop("checked") == false){ | |||||
| $('#company_name').val(''); | |||||
| } | |||||
| // Sumbit Search | |||||
| var form_data = $('#filter_form').serialize(); | |||||
| if($('#type_C').val() == 'Parkir'){ | |||||
| queryString1 = '?'+form_data; | |||||
| $('#viewPelbagai').hide(); | |||||
| $('#viewParkir').show(); | |||||
| tableP.ajax.url(SITEURL +'/api/list/compound'+ queryString1).load(); | |||||
| }else if($('#type_C').val() == "Pelbagai"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| }else if($('#type_C').val() == "Pelbagai_JPB"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| }else if($('#type_C').val() == "Pelbagai_KT"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| }else if($('#type_C').val() == "Pelbagai_PA"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| }else if($('#type_C').val() == "Pelbagai_LESEN"){ | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| } | |||||
| console.log(SITEURL +'/api/list/compound'+ queryString1); | |||||
| console.log(SITEURL +'/api/list/compound'+ queryString2); | |||||
| } | |||||
| return false; | |||||
| }); | |||||
| </script> | |||||
| @endsection |
| @section('content') | @section('content') | ||||
| <style type="text/css"> | <style type="text/css"> | ||||
| select.form-control, select.form-control:focus, select.form-control:hover { | |||||
| select.form-control, select.form-control:focus, select.form-control:hover { | |||||
| border: 1px solid #ccc !important; | border: 1px solid #ccc !important; | ||||
| height: auto !important; | height: auto !important; | ||||
| } | } | ||||
| <div class="inner-page"> | <div class="inner-page"> | ||||
| <div class="row"> | <div class="row"> | ||||
| @include('main-dashboard.compound._part.menu_category') | @include('main-dashboard.compound._part.menu_category') | ||||
| @include('main-dashboard.compound._part.filter_form') | |||||
| @include('main-dashboard.compound._part.filter_form_notice') | |||||
| </div> | </div> | ||||
| <div class="row"> | <div class="row"> | ||||
| <div class="col-md-12"> | <div class="col-md-12"> | ||||
| <div class="slide"></div> | <div class="slide"></div> | ||||
| </li> | </li> | ||||
| </ul> | </ul> | ||||
| <!-- Tab panes --> | <!-- Tab panes --> | ||||
| <div class="tab-content card-block"> | <div class="tab-content card-block"> | ||||
| <div class="tab-pane active" id="default" role="tabpanel"> | <div class="tab-pane active" id="default" role="tabpanel"> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | |||||
| </div> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| var SITEURL = '{{URL::to('')}}'; | var SITEURL = '{{URL::to('')}}'; | ||||
| var tableP1, tableP3, tableP7; | var tableP1, tableP3, tableP7; | ||||
| var queryString1 = '', queryString2 = '', token = "{{ csrf_token() }}"; | var queryString1 = '', queryString2 = '', token = "{{ csrf_token() }}"; | ||||
| $('#viewParkir').hide(); $('#link').hide(); | $('#viewParkir').hide(); $('#link').hide(); | ||||
| $('#viewPelbagai').hide(); $('#link1').hide(); | $('#viewPelbagai').hide(); $('#link1').hide(); | ||||
| </script> | </script> | ||||
| <script type="text/javascript" src="{{ asset('js/dataNotis.js') }}"></script> | <script type="text/javascript" src="{{ asset('js/dataNotis.js') }}"></script> | ||||
| <script type="text/javascript" src="{{ asset('js/function_checkbox.js') }}"></script> | <script type="text/javascript" src="{{ asset('js/function_checkbox.js') }}"></script> | ||||
| <script type="text/javascript"> | <script type="text/javascript"> | ||||
| $('#tapis').on('click', function (e) { | $('#tapis').on('click', function (e) { | ||||
| e.preventDefault(); | e.preventDefault(); | ||||
| $('#link').hide(); $('#link1').hide(); | $('#link').hide(); $('#link1').hide(); | ||||
| var form = $("#filter_form")[0]; | |||||
| var form = $("#filter_form")[0]; | |||||
| if(form.checkValidity() === false) { | if(form.checkValidity() === false) { | ||||
| e.stopPropagation(); | e.stopPropagation(); | ||||
| // Sumbit Search | // Sumbit Search | ||||
| var form_data = $('#filter_form').serialize(); | var form_data = $('#filter_form').serialize(); | ||||
| if($('#type_C').val() == 'Parkir'){ | |||||
| if($('#type_C').val() == 'Notis_NPPM'){ | |||||
| queryString1 = '?'+form_data; | |||||
| $('#viewPelbagai').hide(); | |||||
| $('#viewParkir').show(); | |||||
| tableP.ajax.url(SITEURL +'/api/list/compound'+ queryString1).load(); | |||||
| queryString2 = '?'+form_data; | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| }else if($('#type_C').val() == "Pelbagai_JPB"){ | |||||
| tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| }else if($('#type_C').val() == "Notis_NMH"){ | |||||
| queryString2 = '?'+form_data; | queryString2 = '?'+form_data; | ||||
| $('#viewPelbagai').show(); | $('#viewPelbagai').show(); | ||||
| tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | ||||
| tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | ||||
| } | } | ||||
| else if($('#type_C').val() == "Pelbagai_KT"){ | |||||
| else if($('#type_C').val() == "Notis_NHN"){ | |||||
| queryString2 = '?'+form_data; | queryString2 = '?'+form_data; | ||||
| $('#viewPelbagai').show(); | $('#viewPelbagai').show(); | ||||
| tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | ||||
| tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | ||||
| } | } | ||||
| else if($('#type_C').val() == "Pelbagai_PA"){ | |||||
| else if($('#type_C').val() == "Notis_NKG"){ | |||||
| queryString2 = '?'+form_data; | queryString2 = '?'+form_data; | ||||
| $('#viewPelbagai').show(); | $('#viewPelbagai').show(); | ||||
| tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | ||||
| tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | ||||
| } | } | ||||
| else if($('#type_C').val() == "Pelbagai_LESEN"){ | |||||
| else if($('#type_C').val() == "Notis_PA"){ | |||||
| queryString2 = '?'+form_data; | queryString2 = '?'+form_data; | ||||
| $('#viewPelbagai').show(); | $('#viewPelbagai').show(); | ||||
| console.log(SITEURL +'/api/list/compound'+ queryString1); | console.log(SITEURL +'/api/list/compound'+ queryString1); | ||||
| console.log(SITEURL +'/api/list/compound'+ queryString2); | console.log(SITEURL +'/api/list/compound'+ queryString2); | ||||
| } | |||||
| } | |||||
| return false; | return false; | ||||
| }); | }); | ||||
| $('#submit').on('click', function (e) { | $('#submit').on('click', function (e) { | ||||
| e.preventDefault(); | e.preventDefault(); | ||||
| var form = $("#updateSt")[0]; | |||||
| var form = $("#updateSt")[0]; | |||||
| if(form.checkValidity() === false) { | if(form.checkValidity() === false) { | ||||
| e.stopPropagation(); | e.stopPropagation(); | ||||
| var isValid = form.reportValidity(); | var isValid = form.reportValidity(); | ||||
| if(data['success'] == true){ | if(data['success'] == true){ | ||||
| if($('#type_C').val() == 'Parkir'){ | |||||
| $('#viewPelbagai').hide(); | |||||
| $('#viewParkir').show(); | |||||
| tableP.ajax.url(SITEURL +'/api/list/compound'+ queryString1).load(); | |||||
| if($('#type_C').val() == 'Notis_NPPM'){ | |||||
| $('#viewPelbagai').show(); | |||||
| $('#viewParkir').hide(); | |||||
| tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| $('#kemaskiniC').modal('hide'); | $('#kemaskiniC').modal('hide'); | ||||
| }else if($('#type_C').val() == "Pelbagai_KT"){ | |||||
| }else if($('#type_C').val() == "Notis_NMH"){ | |||||
| $('#viewPelbagai').show(); | $('#viewPelbagai').show(); | ||||
| $('#viewParkir').hide(); | $('#viewParkir').hide(); | ||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| $('#kemaskiniC').modal('hide'); | $('#kemaskiniC').modal('hide'); | ||||
| }else if($('#type_C').val() == "Pelbagai_PA"){ | |||||
| }else if($('#type_C').val() == "Notis_NHN"){ | |||||
| $('#viewPelbagai').show(); | $('#viewPelbagai').show(); | ||||
| $('#viewParkir').hide(); | $('#viewParkir').hide(); | ||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| $('#kemaskiniC').modal('hide'); | $('#kemaskiniC').modal('hide'); | ||||
| } | |||||
| else if($('#type_C').val() == "Pelbagai_JPB"){ | |||||
| }else if($('#type_C').val() == "Notis_NKG"){ | |||||
| $('#viewPelbagai').show(); | $('#viewPelbagai').show(); | ||||
| $('#viewParkir').hide(); | $('#viewParkir').hide(); | ||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| $('#kemaskiniC').modal('hide'); | $('#kemaskiniC').modal('hide'); | ||||
| }else if($('#type_C').val() == "Pelbagai_LESEN"){ | |||||
| }else if($('#type_C').val() == "Notis_PA"){ | |||||
| $('#viewPelbagai').show(); | $('#viewPelbagai').show(); | ||||
| $('#viewParkir').hide(); | $('#viewParkir').hide(); | ||||
| tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load(); | |||||
| $('#kemaskiniC').modal('hide'); | $('#kemaskiniC').modal('hide'); | ||||
| } | } | ||||
| alert('Kemaskini status dibatalkan'); | alert('Kemaskini status dibatalkan'); | ||||
| $('#kemaskiniC').modal('hide'); | $('#kemaskiniC').modal('hide'); | ||||
| } | } | ||||
| } | |||||
| } | |||||
| }); | }); | ||||
| function getDetail(id) { | function getDetail(id) { | ||||
| if($('#type_C').val() == 'Parkir'){ | if($('#type_C').val() == 'Parkir'){ | ||||
| $('#datePay').hide(); | $('#datePay').hide(); | ||||
| $('#tarikh_bayar').prop('required', false); | $('#tarikh_bayar').prop('required', false); | ||||
| }else { | |||||
| }else { | |||||
| $('#datePay').show(); | $('#datePay').show(); | ||||
| $('#tarikh_bayar').prop('required', true); | $('#tarikh_bayar').prop('required', true); | ||||
| } | } | ||||
| }) | }) | ||||
| }; | }; | ||||
| </script> | </script> | ||||
| @endsection | |||||
| @endsection |
| @if($compound->status == 'Belum Bayar') | @if($compound->status == 'Belum Bayar') | ||||
| @if($compound->modul == '02') | @if($compound->modul == '02') | ||||
| <div><a href="{{ url('main/compound') }}/{{ $compound->non }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div> | <div><a href="{{ url('main/compound') }}/{{ $compound->non }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div> | ||||
| <div><a href="{{ url('/main/compound') }}/{{$compound->non}}">Kompaun</a></div> | |||||
| @else | @else | ||||
| <div><a href="{{ url('main/compound') }}/{{ $compound->kpd }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div> | <div><a href="{{ url('main/compound') }}/{{ $compound->kpd }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div> | ||||
| <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}">Kompaun</a></div> | <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}">Kompaun</a></div> | ||||
| <div class="col-lg-12 col-md-12"> | <div class="col-lg-12 col-md-12"> | ||||
| <div class="card"> | <div class="card"> | ||||
| <div class="card-header"> | <div class="card-header"> | ||||
| <h5>Serahan Kompaun Kepada Pegawai</h5> | |||||
| <h5>Serahan Notis/Kompaun Kepada Pegawai</h5> | |||||
| </div> | </div> | ||||
| <div class="card-block"> | <div class="card-block"> | ||||
| <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>"> | <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>"> | ||||
| <input type="hidden" name="kpd" value="{{ $compound->kpd }}"> | |||||
| <input type="hidden" name="kpd" value="{{ $compound->kpd }}"> | |||||
| <input type="hidden" name="non" value="{{ $compound->non }}"> | |||||
| <input type="hidden" name="modul" value="{{ $compound->modul }}"> | |||||
| <input type="hidden" name="dashboard" value="true"> | <input type="hidden" name="dashboard" value="true"> | ||||
| <div class="row"> | <div class="row"> | ||||
| <div class="col-lg-12 col-md-12"> | <div class="col-lg-12 col-md-12"> | ||||
| <div class="col-lg-12 col-md-12"> | <div class="col-lg-12 col-md-12"> | ||||
| <div class="card"> | <div class="card"> | ||||
| <div class="card-header"> | <div class="card-header"> | ||||
| <h5>Serahan Kompaun kepada Penguatkuasa</h5> | |||||
| <h5>Serahan Notis/Kompaun kepada Penguatkuasa</h5> | |||||
| @if($currentS == '') | @if($currentS == '') | ||||
| <span>Kompaun ini <code>belum ditugasan</code> kepada penguatkuasa</span> | <span>Kompaun ini <code>belum ditugasan</code> kepada penguatkuasa</span> | ||||
| @else | @else | ||||
| </div> | </div> | ||||
| </form> | </form> | ||||
| @endif | @endif | ||||
| @if(!isset($compound->tarikh_mahkamah)){ | |||||
| @if(($compound->modul != '02') && (!isset($compound->tarikh_mahkamah))){ | |||||
| <form method="POST" action="{{ url('/main/compound/update/court') }}" enctype="multipart/form-data"> | <form method="POST" action="{{ url('/main/compound/update/court') }}" enctype="multipart/form-data"> | ||||
| <div class="row"> | <div class="row"> | ||||
| <div class="col-lg-12 col-md-12"> | <div class="col-lg-12 col-md-12"> |
| @if($compound->status == 'Belum Bayar') | @if($compound->status == 'Belum Bayar') | ||||
| @if($compound->modul == '02') | @if($compound->modul == '02') | ||||
| <div><a href="{{ url('main/compound') }}/{{ $compound->non }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div> | <div><a href="{{ url('main/compound') }}/{{ $compound->non }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div> | ||||
| <div><a href="{{ url('/main/compound') }}/{{$compound->non}}">Kompaun</a></div> | |||||
| @else | @else | ||||
| <div><a href="{{ url('main/compound') }}/{{ $compound->kpd }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div> | <div><a href="{{ url('main/compound') }}/{{ $compound->kpd }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div> | ||||
| <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}">Kompaun</a></div> | <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}">Kompaun</a></div> |
| @if($compound->status == 'Belum Bayar') | @if($compound->status == 'Belum Bayar') | ||||
| @if($compound->modul == '02') | @if($compound->modul == '02') | ||||
| <div><a href="{{ url('main/compound') }}/{{ $compound->non }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div> | <div><a href="{{ url('main/compound') }}/{{ $compound->non }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div> | ||||
| <div><a href="{{ url('/main/compound') }}/{{$compound->non}}">Kompaun</a></div> | |||||
| {{-- <div><a href="{{ url('/main/compound') }}/{{$compound->non}}">Kompaun</a></div> --}} | |||||
| @else | @else | ||||
| <div><a href="{{ url('main/compound') }}/{{ $compound->kpd }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div> | <div><a href="{{ url('main/compound') }}/{{ $compound->kpd }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div> | ||||
| <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}">Kompaun</a></div> | <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}">Kompaun</a></div> |