<?php | |||||
namespace App\Console\Commands; | |||||
use Illuminate\Console\Command; | |||||
use Log; | |||||
use App\Model\Module\Compound; | |||||
use App\Model\Module\Department; | |||||
use App\Model\Module\ReportOverallCompound; | |||||
class CalculateStatisticCompound extends Command | |||||
{ | |||||
/** | |||||
* The name and signature of the console command | |||||
* | |||||
* @var string | |||||
*/ | |||||
protected $signature = 'update:statistic__overall_compound'; | |||||
/** | |||||
* The console command description. | |||||
* | |||||
* @var string | |||||
*/ | |||||
protected $description = 'Store and calculate statistic overall compound'; | |||||
/** | |||||
* Create a new command instance. | |||||
* | |||||
* @return void | |||||
*/ | |||||
public function __construct() | |||||
{ | |||||
parent::__construct(); | |||||
} | |||||
/** | |||||
* Execute the console command. | |||||
* | |||||
* @return mixed | |||||
*/ | |||||
public function handle() | |||||
{ | |||||
//calculate all compound [status = Belum Bayar, Bayar & Batal] | |||||
$s1 = ReportOverallCompound::where('status','all')->where('department','all')->where('modul','all')->first(); | |||||
if(!empty($s1)){ | |||||
$s1->total = count(Compound::whereIn('status', ['Belum Bayar', 'Berbayar', 'Batal'])->get()); | |||||
$s1->save(); | |||||
}else { | |||||
$dataS = new ReportOverallCompound; | |||||
// $dataS->total = count(Compound::all()); | |||||
$dataS->total = count(Compound::whereIn('status', ['Belum Bayar', 'Berbayar', 'Batal'])->get()); | |||||
$dataS->status = 'all'; | |||||
$dataS->department = 'all'; | |||||
$dataS->modul = 'all'; | |||||
$dataS->save(); | |||||
} | |||||
//calculate compound [modul = 03, status = Belum Bayar] | |||||
$b1 = ReportOverallCompound::where('status','Belum Bayar')->where('department','all')->where('modul','03')->first(); | |||||
if(!empty($b1)){ | |||||
$b1->total = count(Compound::where('modul','03')->where('status','Belum Bayar')->get()); | |||||
$b1->save(); | |||||
}else { | |||||
$dataB = new ReportOverallCompound; | |||||
$dataB->total = count(Compound::where('modul','03')->where('status','Belum Bayar')->get()); | |||||
$dataB->status = 'Belum Bayar'; | |||||
$dataB->department = 'all'; | |||||
$dataB->modul = '03'; | |||||
$dataB->save(); | |||||
} | |||||
//calculate compound [modul = 04, status = Belum Bayar] | |||||
$pk1 = ReportOverallCompound::where('status','Belum Bayar')->where('department','all')->where('modul','04')->first(); | |||||
if(!empty($pk1)){ | |||||
$pk1->total = count(Compound::where('modul','04')->where('status','Belum Bayar')->get()); | |||||
$pk1->save(); | |||||
}else { | |||||
$dataPK = new ReportOverallCompound; | |||||
$dataPK->total = count(Compound::where('modul','04')->where('status','Belum Bayar')->get()); | |||||
$dataPK->status = 'Belum Bayar'; | |||||
$dataPK->department = 'all'; | |||||
$dataPK->modul = '04'; | |||||
$dataPK->save(); | |||||
} | |||||
//calculate compound [modul = 05, status = Belum Bayar] | |||||
$na1 = ReportOverallCompound::where('status','Belum Bayar')->where('department','all')->where('modul','05')->first(); | |||||
if(!empty($na1)){ | |||||
$na1->total = count(Compound::where('modul','05')->where('status','Belum Bayar')->get()); | |||||
$na1->save(); | |||||
}else { | |||||
$dataNA = new ReportOverallCompound; | |||||
$dataNA->total = count(Compound::where('modul','05')->where('status','Belum Bayar')->get()); | |||||
$dataNA->status = 'Belum Bayar'; | |||||
$dataNA->department = 'all'; | |||||
$dataNA->modul = '05'; | |||||
$dataNA->save(); | |||||
} | |||||
//calculate compound [modul = 06-07, status = Belum Bayar] | |||||
$si1 = ReportOverallCompound::where('status','Belum Bayar')->where('department','all')->where('modul','06-07')->first(); | |||||
if(!empty($si1)){ | |||||
$si1->total = count(Compound::where('modul','06')->orWhere('modul','07')->where('status','Belum Bayar')->get()); | |||||
$si1->save(); | |||||
}else { | |||||
$dataSI = new ReportOverallCompound; | |||||
$dataSI->total = count(Compound::where('modul','06')->orWhere('modul','07')->where('status','Belum Bayar')->get()); | |||||
$dataSI->status = 'Belum Bayar'; | |||||
$dataSI->department = 'all'; | |||||
$dataSI->modul = '06-07'; | |||||
$dataSI->save(); | |||||
} | |||||
//calculate compound [modul = 08, status = Belum Bayar] | |||||
$rb1 = ReportOverallCompound::where('status','Belum Bayar')->where('department','all')->where('modul','08')->first(); | |||||
if(!empty($rb1)){ | |||||
$rb1->total = count(Compound::where('modul','08')->where('status','Belum Bayar')->get()); | |||||
$rb1->save(); | |||||
}else { | |||||
$dataRB = new ReportOverallCompound; | |||||
$dataRB->total = count(Compound::where('modul','08')->where('status','Belum Bayar')->get()); | |||||
$dataRB->status = 'Belum Bayar'; | |||||
$dataRB->department = 'all'; | |||||
$dataRB->modul = '08'; | |||||
$dataRB->save(); | |||||
} | |||||
//calculate compound [status = Berbayar] | |||||
$by1 = ReportOverallCompound::where('status','Berbayar')->where('department','all')->first(); | |||||
if(!empty($by1)){ | |||||
$by1->total = count(Compound::where('status','Berbayar')->get()); | |||||
$by1->save(); | |||||
}else { | |||||
$dataBy = new ReportOverallCompound; | |||||
$dataBy->total = count(Compound::where('status','Berbayar')->get()); | |||||
$dataBy->status = 'Berbayar'; | |||||
$dataBy->department = 'all'; | |||||
$dataBy->modul = 'all'; | |||||
$dataBy->save(); | |||||
} | |||||
////////////////////////////////////////////////////////////////////////////////////////// | |||||
//calcculate compound by department | |||||
$department = Department::all(); | |||||
foreach ($department as $key => $d) { | |||||
//calcculate compound by department [status = all(Belum Bayar, Bayar, Batal), modul = all] | |||||
$s2 = ReportOverallCompound::where('status','all')->where('department', $d->_id)->where('modul','all')->first(); | |||||
if(!empty($s2)){ | |||||
$s2->total = count(Compound::where('jbkod',$d->_id)->get()); | |||||
$s2->save(); | |||||
}else { | |||||
$dataJS1 = new ReportOverallCompound; | |||||
$dataJS1->total = count(Compound::where('jbkod',$d->_id)->get()); | |||||
$dataJS1->status = 'all'; | |||||
$dataJS1->department = $d->_id; | |||||
$dataJS1->modul = 'all'; | |||||
$dataJS1->save(); | |||||
} | |||||
//calcculate compound by department [status = Belum Bayar, modul = 03] | |||||
$b2 = ReportOverallCompound::where('status','Belum Bayar')->where('department',$d->_id)->where('modul','03')->first(); | |||||
if(!empty($b2)){ | |||||
$b2->total = count(Compound::where('jbkod',$d->_id)->where('modul','03')->where('status','Belum Bayar')->get()); | |||||
$b2->save(); | |||||
}else { | |||||
$dataJB1 = new ReportOverallCompound; | |||||
$dataJB1->total = count(Compound::where('jbkod',$d->_id)->where('modul','03')->where('status','Belum Bayar')->get()); | |||||
$dataJB1->status = 'Belum Bayar'; | |||||
$dataJB1->department = $d->_id; | |||||
$dataJB1->modul = '03'; | |||||
$dataJB1->save(); | |||||
} | |||||
//calcculate compound by department [status = Belum Bayar, modul = 04] | |||||
$pk2 = ReportOverallCompound::where('status','Belum Bayar')->where('department',$d->_id)->where('modul','04')->first(); | |||||
if(!empty($pk2)){ | |||||
$pk2->total = count(Compound::where('jbkod',$d->_id)->where('modul','04')->where('status','Belum Bayar')->get()); | |||||
$pk2->save(); | |||||
}else { | |||||
$dataJPK1 = new ReportOverallCompound; | |||||
$dataJPK1->total = count(Compound::where('jbkod',$d->_id)->where('modul','04')->where('status','Belum Bayar')->get()); | |||||
$dataJPK1->status = 'Belum Bayar'; | |||||
$dataJPK1->department = $d->_id; | |||||
$dataJPK1->modul = '04'; | |||||
$dataJPK1->save(); | |||||
} | |||||
//calcculate compound by department [status = Belum Bayar, modul = 05] | |||||
$na2 = ReportOverallCompound::where('status','Belum Bayar')->where('department',$d->_id)->where('modul','05')->first(); | |||||
if(!empty($na2)){ | |||||
$na2->total = count(Compound::where('jbkod',$d->_id)->where('modul','05')->where('status','Belum Bayar')->get()); | |||||
$na2->save(); | |||||
}else { | |||||
$dataJNA1 = new ReportOverallCompound; | |||||
$dataJNA1->total = count(Compound::where('jbkod',$d->_id)->where('modul','05')->where('status','Belum Bayar')->get()); | |||||
$dataJNA1->status = 'Belum Bayar'; | |||||
$dataJNA1->department = $d->_id; | |||||
$dataJNA1->modul = '05'; | |||||
$dataJNA1->save(); | |||||
} | |||||
//calcculate compound by department [status = Belum Bayar, modul = 06-07] | |||||
$si2 = ReportOverallCompound::where('status','Belum Bayar')->where('department',$d->_id)->where('modul','06-07')->first(); | |||||
if(!empty($si2)){ | |||||
$si2->total = count(Compound::where('jbkod',$d->_id)->where('modul','06')->orWhere('modul','07')->where('status','Belum Bayar')->get()); | |||||
$si2->save(); | |||||
}else { | |||||
$dataJSI1 = new ReportOverallCompound; | |||||
$dataJSI1->total = count(Compound::where('jbkod',$d->_id)->where('modul','06')->orWhere('modul','07')->where('status','Belum Bayar')->get()); | |||||
$dataJSI1->status = 'Belum Bayar'; | |||||
$dataJSI1->department = $d->_id; | |||||
$dataJSI1->modul = '06-07'; | |||||
$dataJSI1->save(); | |||||
} | |||||
//calcculate compound by department [status = Belum Bayar, modul = 08] | |||||
$rb2 = ReportOverallCompound::where('status','Belum Bayar')->where('department',$d->_id)->where('modul','08')->first(); | |||||
if(!empty($rb2)){ | |||||
$rb2->total = count(Compound::where('jbkod',$d->_id)->where('modul','08')->where('status','Belum Bayar')->get()); | |||||
$rb2->save(); | |||||
}else { | |||||
$dataJRB1 = new ReportOverallCompound; | |||||
$dataJRB1->total = count(Compound::where('jbkod',$d->_id)->where('modul','08')->where('status','Belum Bayar')->get()); | |||||
$dataJRB1->status = 'Belum Bayar'; | |||||
$dataJRB1->department = $d->_id; | |||||
$dataJRB1->modul = '08'; | |||||
$dataJRB1->save(); | |||||
} | |||||
//calcculate compound by department [status = Berbayar] | |||||
$by2 = ReportOverallCompound::where('status','Berbayar')->where('department',$d->_id)->first(); | |||||
if(!empty($by2)){ | |||||
$by2->total = count(Compound::where('jbkod',$d->_id)->where('status','Berbayar')->get()); | |||||
$by2->save(); | |||||
}else { | |||||
$dataJBy1 = new ReportOverallCompound; | |||||
$dataJBy1->total = count(Compound::where('jbkod',$d->_id)->where('status','Berbayar')->get()); | |||||
$dataJBy1->status = 'Berbayar'; | |||||
$dataJBy1->department = $d->_id; | |||||
$dataJBy1->modul = 'all'; | |||||
$dataJBy1->save(); | |||||
} | |||||
} | |||||
Log::info('Overall Compound been saved'); | |||||
$this->info('Overall Compound been saved'); | |||||
} | |||||
} |
*/ | */ | ||||
protected function schedule(Schedule $schedule) | protected function schedule(Schedule $schedule) | ||||
{ | { | ||||
// $schedule->command('inspire') | |||||
// ->hourly(); | |||||
// $schedule->command('update:price') | |||||
// ->daily(); | |||||
$schedule->command('update:statistic__overall_compound') | |||||
->everyTenMinutes(); | |||||
// $schedule->command('update:compound_compound') | |||||
// ->everyFiveMinutes(); | |||||
// $schedule->command('push:epbt') | |||||
// ->everyTenMinutes(); | |||||
} | } | ||||
/** | /** |
<?php | |||||
namespace App\Model\Module; | |||||
use Jenssegers\Mongodb\Eloquent\Model as Eloquent; | |||||
use Jenssegers\Mongodb\Eloquent\SoftDeletes; | |||||
class ReportOverallCompound extends Eloquent | |||||
{ | |||||
use SoftDeletes; | |||||
// | |||||
protected $connection = 'mongodb'; | |||||
protected $collection = 'report_overall_compound'; | |||||
protected $guarded = ['_id']; | |||||
} |
"data-target": "#ajaxModel", | "data-target": "#ajaxModel", | ||||
onClick: _this3.onUpdateStatus.bind(_this3, item._id), | onClick: _this3.onUpdateStatus.bind(_this3, item._id), | ||||
className: "btn btn-primary btn-sm waves-effect waves-light" | className: "btn btn-primary btn-sm waves-effect waves-light" | ||||
}, "KEMASKINI STATUS"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { | |||||
href: "/main/edit/compound/" + item._id, | |||||
className: "btn btn-danger btn-sm waves-effect waves-light" | |||||
}, "KEMASKINI"))); | |||||
}, "KEMASKINI STATUS"))); | |||||
}) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", { | }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", { | ||||
colSpan: "10", | colSpan: "10", | ||||
style: { | style: { | ||||
width: "100%" | width: "100%" | ||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("thead", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "#"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Kpd"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Jenis"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Tarikh Masa"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Kesalahan"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", { | }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("thead", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "#"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Kpd"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Jenis"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Tarikh Masa"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Kesalahan"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", { | ||||
width: "110" | width: "110" | ||||
}, "Kadar Kompaun"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Nric"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Nama"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "PenguatKuasa"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Status"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Tindakan"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tbody", null, this.state.data.length > 0 ? this.state.data.map(function (item, i) { | |||||
}, "Kadar Kompaun"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Nric"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "No.Syarikat"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "PenguatKuasa"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Status"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Tindakan"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tbody", null, this.state.data.length > 0 ? this.state.data.map(function (item, i) { | |||||
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", { | return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", { | ||||
key: i | key: i | ||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, item.DT_RowIndex), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, item.index !== "" ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("small", { | }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, item.DT_RowIndex), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, item.index !== "" ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("small", { | ||||
className: "label label-success" | className: "label label-success" | ||||
}, item.index), "\xA0", item.kpd) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, item.kpd)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, item.jenis), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, item.tarikh_masa), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, "Seksyen ", item.kesalahan.sketr, " ", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br", null), " ", item.kesalahan.nama), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, item.jumlah_kemaskini_kompaun !== "" ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, item.jumlah_kemaskini_kompaun) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, item.jumlah_asal_kompaun)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, item.nric), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, item.nama), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, item.enforcer.no_badan, ", ", item.enforcer.full_name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, item.catatan_dari_admin !== null ? item.status !== "Belum Bayar" ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("b", null, item.status)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { | |||||
}, item.index), "\xA0", item.kpd) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, item.kpd)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, item.jenis), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, item.tarikh_masa), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, "Seksyen ", item.kesalahan.sketr, " ", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br", null), " ", item.kesalahan.nama), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, item.jumlah_kemaskini_kompaun !== "" ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, item.jumlah_kemaskini_kompaun) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, item.jumlah_asal_kompaun)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, item.nric), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, item.no_daftar_syarikat), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, item.enforcer.no_badan, ", ", item.enforcer.full_name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", null, item.catatan_dari_admin !== null ? item.status !== "Belum Bayar" ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("b", null, item.status)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { | |||||
style: { | style: { | ||||
"marginTop": "8px" | "marginTop": "8px" | ||||
} | } | ||||
"data-target": "#ajaxModel", | "data-target": "#ajaxModel", | ||||
onClick: _this3.onUpdateStatus.bind(_this3, item._id), | onClick: _this3.onUpdateStatus.bind(_this3, item._id), | ||||
className: "btn btn-primary btn-sm waves-effect waves-light" | className: "btn btn-primary btn-sm waves-effect waves-light" | ||||
}, "KEMASKINI STATUS"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { | |||||
href: "/main/edit/compound/" + item._id, | |||||
className: "btn btn-danger btn-sm waves-effect waves-light" | |||||
}, "KEMASKINI"))); | |||||
}, "KEMASKINI STATUS"))); | |||||
}) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", { | }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("td", { | ||||
colSpan: "11", | colSpan: "11", | ||||
style: { | style: { | ||||
} | } | ||||
}, "Tiada Data Ditemui"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tfoot", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "#"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Kpd"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Jenis"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Tarikh Masa"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Kesalahan"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", { | }, "Tiada Data Ditemui"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tfoot", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "#"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Kpd"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Jenis"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Tarikh Masa"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Kesalahan"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", { | ||||
width: "110" | width: "110" | ||||
}, "Kadar Kompaun"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Nric"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Nama"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "PenguatKuasa"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Status"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Tindakan"))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_1__["Modal"], { | |||||
}, "Kadar Kompaun"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Nric"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "No.Syarikat"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "PenguatKuasa"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Status"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("th", null, "Tindakan"))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_bootstrap__WEBPACK_IMPORTED_MODULE_1__["Modal"], { | |||||
size: "lg", | size: "lg", | ||||
show: this.state.showModal, | show: this.state.showModal, | ||||
onHide: this.closeModal | onHide: this.closeModal | ||||
status: _this.props.status, | status: _this.props.status, | ||||
type: 'Parkir', | type: 'Parkir', | ||||
kpd: '', | kpd: '', | ||||
start_date: new Date().getFullYear() + '-' + ("0" + (new Date().getMonth() + 1)).slice(-2) + '-' + ("0" + new Date().getDate()).slice(-2), | |||||
end_date: new Date().getFullYear() + '-' + ("0" + (new Date().getMonth() + 1)).slice(-2) + '-' + ("0" + new Date().getDate()).slice(-2), | |||||
start_date: new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDate(), | |||||
end_date: new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDate(), | |||||
faulty: 'All', | faulty: 'All', | ||||
enforcer: 'All', | enforcer: 'All', | ||||
plate_no: '', | plate_no: '', | ||||
/*! no static exports found */ | /*! no static exports found */ | ||||
/***/ (function(module, exports, __webpack_require__) { | /***/ (function(module, exports, __webpack_require__) { | ||||
__webpack_require__(/*! /var/www/html/sipadu.johor/mbip1/resources/js/app.js */"./resources/js/app.js"); | |||||
module.exports = __webpack_require__(/*! /var/www/html/sipadu.johor/mbip1/resources/sass/app.scss */"./resources/sass/app.scss"); | |||||
__webpack_require__(/*! /var/www/html/mdch.sipadu/resources/js/app.js */"./resources/js/app.js"); | |||||
module.exports = __webpack_require__(/*! /var/www/html/mdch.sipadu/resources/sass/app.scss */"./resources/sass/app.scss"); | |||||
/***/ }), | /***/ }), |
$(document).ready( function () { | |||||
tableP = $('#compoundParkir').DataTable({ | |||||
// "dom": 'Bfrtip', | |||||
// "buttons": [ | |||||
// 'copy', 'csv', 'excel', 'pdf', 'print' | |||||
// ], | |||||
"lengthMenu": [[50, 100, -1], [50, 100, "All"]], | |||||
"pageLength": 50, | |||||
"searching": false, | |||||
"serverSide": true, | |||||
"processing": true, | |||||
"ajax": { | |||||
url: SITEURL +'/api/list/compound'+ queryString1, | |||||
type: 'GET', | |||||
}, | |||||
"columns": [ | |||||
{ "data": "index", "name": "index", orderable: false, searchable: false }, | |||||
{ "data" : "modul", "name": "modul" }, | |||||
{ "data": "kpd", "name": "kpd" }, | |||||
{ "data": "jenis", "name": "jenis" }, | |||||
{ "data": "tarikh_masa", "name": "tarikh_masa" }, | |||||
{ "data": "kesalahan", "name": "kesalahan" }, | |||||
{ "data": "kadar_kompaun", "name": "kadar_kompaun" }, | |||||
{ "data": "no_plate", "name": "no_plate" }, | |||||
{ "data": "enforcer", "name": "enforcer" }, | |||||
{ "data": "status_kemaskini","name": "status", orderable: false, searchable: false }, | |||||
{ "data": "_id", "name": "action", orderable: false, searchable: false }, | |||||
], | |||||
"columnDefs": [ | |||||
{ | |||||
"render": function ( data, type, row, meta ) { | |||||
if (data != '') { | |||||
return '<label class="label label-success">'+data+'</label> '+(meta.row+1); | |||||
}else { | |||||
return (meta.row+1); | |||||
} | |||||
}, | |||||
"targets": 0, | |||||
}, | |||||
{ | |||||
"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></div>'; | |||||
}, | |||||
"targets": 10, | |||||
}, | |||||
], | |||||
"language": { | |||||
"paginate": { | |||||
"previous": "Sebelum", | |||||
"next": "Selepas" | |||||
}, | |||||
"sLengthMenu": "Tunjukkan _MENU_ entri", | |||||
"zeroRecords": "Tiada Data Ditemui", | |||||
"infoEmpty": "Tiada Rekod Yang Wujud", | |||||
"infoFiltered": "(Ditapis daripada _MAX_ jumlah rekod)", | |||||
"info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri", | |||||
"sSearch": "Cari:", | |||||
} | |||||
}); | |||||
}); |
$(document).ready( function () { | |||||
tablePl = $('#compoundPelbagai').DataTable({ | |||||
// "dom": 'Blfrtip', | |||||
// "buttons": [ | |||||
// 'copy', 'csv', 'excel', 'pdf', 'print' | |||||
// ], | |||||
"lengthMenu": [[50, 100, -1], [50, 100, "All"]], | |||||
"pageLength": 50, | |||||
"searching": false, | |||||
"serverSide": true, | |||||
"processing": true, | |||||
"ajax": { | |||||
url: SITEURL +'/api/list/compound'+ queryString2, | |||||
type: 'GET', | |||||
}, | |||||
"columns": [ | |||||
{ "data": "index", "name": "index", orderable: false, searchable: false }, | |||||
{ "data" : "modul", "name": "modul" }, | |||||
{ "data": "kpd", "name": "kpd" }, | |||||
{ "data": "jenis", "name": "jenis" }, | |||||
{ "data": "tarikh_masa", "name": "tarikh_masa" }, | |||||
{ "data": "kesalahan", "name": "kesalahan" }, | |||||
{ "data": "kadar_kompaun", "name": "kadar_kompaun" }, | |||||
{ "data": "nric", "name": "nric" }, | |||||
{ "data": "nama", "name": "nama" }, | |||||
{ "data": "lesen", "name": "lesen" }, | |||||
{ "data": "enforcer", "name": "enforcer" }, | |||||
{ "data": "status_kemaskini","name": "status", orderable: false, searchable: false }, | |||||
{ "data": "_id", "name": "action", orderable: false, searchable: false }, | |||||
], | |||||
"columnDefs": [ | |||||
{ | |||||
"render": function ( data, type, row, meta ) { | |||||
if (data != '') { | |||||
return '<label class="label label-success">'+data+'</label> '+(meta.row+1); | |||||
}else { | |||||
return (meta.row+1); | |||||
} | |||||
}, | |||||
"targets": 0, | |||||
}, | |||||
{ | |||||
"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></div>'; | |||||
}, | |||||
"targets": 12, | |||||
}, | |||||
], | |||||
"language": { | |||||
"paginate": { | |||||
"previous": "Sebelum", | |||||
"next": "Selepas" | |||||
}, | |||||
"sLengthMenu": "Tunjukkan _MENU_ entri", | |||||
"zeroRecords": "Tiada Data Ditemui", | |||||
"infoEmpty": "Tiada Rekod Yang Wujud", | |||||
"infoFiltered": "(Ditapis daripada _MAX_ jumlah rekod)", | |||||
"info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri", | |||||
"sSearch": "Cari:", | |||||
} | |||||
}); | |||||
}); |
$(document).ready( function () { | |||||
tableP = $('#compoundParkir').DataTable({ | |||||
// "dom": 'Bfrtip', | |||||
// "buttons": [ | |||||
// 'copy', 'csv', 'excel', 'pdf', 'print' | |||||
// ], | |||||
"lengthMenu": [[50, 100, -1], [50, 100, "All"]], | |||||
"pageLength": 50, | |||||
"searching": false, | |||||
"serverSide": true, | |||||
"processing": true, | |||||
"ajax": { | |||||
url: SITEURL +'/api/list/compound'+ queryString1, | |||||
type: 'GET', | |||||
}, | |||||
"columns": [ | |||||
{ "data": "index", "name": "index", orderable: false, searchable: false }, | |||||
{ "data" : "modul", "name": "modul" }, | |||||
{ "data": "kpd", "name": "kpd" }, | |||||
{ "data": "jenis", "name": "jenis" }, | |||||
{ "data": "tarikh_masa", "name": "tarikh_masa" }, | |||||
{ "data": "kesalahan", "name": "kesalahan" }, | |||||
{ "data": "kadar_kompaun", "name": "kadar_kompaun" }, | |||||
{ "data": "no_plate", "name": "no_plate" }, | |||||
{ "data": "enforcer", "name": "enforcer" }, | |||||
{ "data": "status_kemaskini","name": "status", orderable: false, searchable: false }, | |||||
{ "data": "_id", "name": "action", orderable: false, searchable: false }, | |||||
], | |||||
"columnDefs": [ | |||||
{ | |||||
"render": function ( data, type, row, meta ) { | |||||
if (data != '') { | |||||
return '<label class="label label-success">'+data+'</label> '+(meta.row+1); | |||||
}else { | |||||
return (meta.row+1); | |||||
} | |||||
}, | |||||
"targets": 0, | |||||
}, | |||||
{ | |||||
"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>' | |||||
+'<button onclick="getDetail(\''+data+'\')" class="btn btn-primary btn-sm waves-effect waves-light">KEMASKINI STATUS</button></div>'; | |||||
}, | |||||
"targets": 10, | |||||
}, | |||||
], | |||||
"drawCallback": function(settings) { | |||||
var api = this.api(); | |||||
// Output the data for the visible rows to the browser's console | |||||
var data = api.rows( {page:'current'} ).data().toArray(); | |||||
console.log(data); | |||||
if (data && data.length > 0) { | |||||
for(var i=0;i<data.length;i++){ | |||||
data[i].status_kemaskini = '-'; | |||||
data[i].kesalahan = '-'; | |||||
} | |||||
var final_data = JSON.stringify(data); | |||||
// console.log(final_data); | |||||
$.ajax({ | |||||
type: "POST", | |||||
url: SITEURL+'/get/datatable', | |||||
data: { _token: token, data : final_data }, | |||||
success:function(filename){ | |||||
$('#link').html('<a target="_blank" href="'+SITEURL+'/download/excel/compound/'+filename+'/Parkir" class="btn btn-primary btn-sm waves-effect waves-light">Excel</a>'); | |||||
$('#link').show(); | |||||
}, | |||||
error: function (xhr, ajaxOptions, thrownError) { | |||||
console.log(thrownError); | |||||
// swal("Error deleting!", "Rekod tidak berjaya di buang", "error"); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
"language": { | |||||
"paginate": { | |||||
"previous": "Sebelum", | |||||
"next": "Selepas" | |||||
}, | |||||
"sLengthMenu": "Tunjukkan _MENU_ entri", | |||||
"zeroRecords": "Tiada Data Ditemui", | |||||
"infoEmpty": "Tiada Rekod Yang Wujud", | |||||
"infoFiltered": "(Ditapis daripada _MAX_ jumlah rekod)", | |||||
"info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri", | |||||
"sSearch": "Cari:", | |||||
} | |||||
}); | |||||
}); |
$(document).ready( function () { | |||||
tablePl = $('#compoundPelbagai').DataTable({ | |||||
// "dom": 'Blfrtip', | |||||
// "buttons": [ | |||||
// 'copy', 'csv', 'excel', 'pdf', 'print' | |||||
// ], | |||||
"lengthMenu": [[50, 100, -1], [50, 100, "All"]], | |||||
"pageLength": 50, | |||||
"searching": false, | |||||
"serverSide": true, | |||||
"processing": true, | |||||
"ajax": { | |||||
url: SITEURL +'/api/list/compound'+ queryString2, | |||||
type: 'GET', | |||||
}, | |||||
"columns": [ | |||||
{ "data": "index", "name": "index", orderable: false, searchable: false }, | |||||
{ "data" : "modul", "name": "modul" }, | |||||
{ "data": "kpd", "name": "kpd" }, | |||||
{ "data": "jenis", "name": "jenis" }, | |||||
{ "data": "tarikh_masa", "name": "tarikh_masa" }, | |||||
{ "data": "kesalahan", "name": "kesalahan" }, | |||||
{ "data": "kadar_kompaun", "name": "kadar_kompaun" }, | |||||
{ "data": "nric", "name": "nric" }, | |||||
{ "data": "nama", "name": "nama" }, | |||||
{ "data": "lesen", "name": "lesen" }, | |||||
{ "data": "enforcer", "name": "enforcer" }, | |||||
{ "data": "status_kemaskini","name": "status", orderable: false, searchable: false }, | |||||
{ "data": "_id", "name": "action", orderable: false, searchable: false }, | |||||
], | |||||
"columnDefs": [ | |||||
{ | |||||
"render": function ( data, type, row, meta ) { | |||||
if (data != '') { | |||||
return '<label class="label label-success">'+data+'</label> '+(meta.row+1); | |||||
}else { | |||||
return (meta.row+1); | |||||
} | |||||
}, | |||||
"targets": 0, | |||||
}, | |||||
{ | |||||
"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>' | |||||
+'<button onclick="getDetail(\''+data+'\')" class="btn btn-primary btn-sm waves-effect waves-light">KEMASKINI STATUS</button></div>'; | |||||
}, | |||||
"targets": 12, | |||||
}, | |||||
], | |||||
"drawCallback": function(settings) { | |||||
var api = this.api(); | |||||
// Output the data for the visible rows to the browser's console | |||||
var data = api.rows( {page:'current'} ).data().toArray(); | |||||
console.log(data); | |||||
if (data && data.length > 0) { | |||||
for(var i=0;i<data.length;i++){ | |||||
data[i].status_kemaskini = '-'; | |||||
data[i].kesalahan = '-'; | |||||
} | |||||
var final_data = JSON.stringify(data); | |||||
// console.log(final_data); | |||||
$.ajax({ | |||||
type: "POST", | |||||
url: SITEURL+'/get/datatable', | |||||
data: { _token: token, data : final_data }, | |||||
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(); | |||||
}, | |||||
error: function (xhr, ajaxOptions, thrownError) { | |||||
console.log(thrownError); | |||||
// swal("Error deleting!", "Rekod tidak berjaya di buang", "error"); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
"language": { | |||||
"paginate": { | |||||
"previous": "Sebelum", | |||||
"next": "Selepas" | |||||
}, | |||||
"sLengthMenu": "Tunjukkan _MENU_ entri", | |||||
"zeroRecords": "Tiada Data Ditemui", | |||||
"infoEmpty": "Tiada Rekod Yang Wujud", | |||||
"infoFiltered": "(Ditapis daripada _MAX_ jumlah rekod)", | |||||
"info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri", | |||||
"sSearch": "Cari:", | |||||
} | |||||
}); | |||||
}); |
if($('#check_kpd').prop("checked") == true){ | |||||
$('#kpd').attr("required", true); | |||||
}else { | |||||
$('#kpd').attr("required", false); | |||||
} | |||||
if($('#check_date').prop("checked") == true){ | |||||
$('#start_date').attr("required", true); | |||||
}else { | |||||
$('#start_date').attr("required", false); | |||||
} | |||||
if($('#checkPlateNo').prop("checked") == true){ | |||||
$('#plate_no').attr("required", true); | |||||
}else { | |||||
$('#plate_no').attr("required", false); | |||||
} | |||||
if($('#checkCompanyNo').prop("checked") == true){ | |||||
$('#company_no').attr("required", true); | |||||
}else { | |||||
$('#company_no').attr("required", false); | |||||
} | |||||
if($('#checkNric').prop("checked") == true){ | |||||
$('#nric').attr("required", true); | |||||
}else { | |||||
$('#nric').attr("required", false); | |||||
} | |||||
if($('#checkLicense').prop("checked") == true){ | |||||
$('#license').attr("required", true); | |||||
}else { | |||||
$('#license').attr("required", false); | |||||
} | |||||
if($('#checkName').prop("checked") == true){ | |||||
$('#nameP').attr("required", true); | |||||
}else { | |||||
$('#nameP').attr("required", false); | |||||
} | |||||
if($('#checkCompanyName').prop("checked") == true){ | |||||
$('#company_name').attr("required", true); | |||||
}else { | |||||
$('#company_name').attr("required", false); | |||||
} | |||||
$('#check_kpd').change(function(){ | |||||
var check_kpd = $("#check_kpd"); | |||||
check_kpd.attr("checked", !check_kpd.attr("checked")); | |||||
var kpd = $('#kpd'); | |||||
kpd.attr("required", !kpd.attr("required")); | |||||
}); | |||||
$('#check_date').change(function(){ | |||||
var check_date = $("#check_date"); | |||||
check_date.attr("checked", !check_date.attr("checked")); | |||||
var start_date = $('#start_date'); | |||||
start_date.attr("required", !start_date.attr("required")); | |||||
}); | |||||
$('#checkPlateNo').change(function(){ | |||||
var checkPlateNo = $("#checkPlateNo"); | |||||
checkPlateNo.attr("checked", !checkPlateNo.attr("checked")); | |||||
var plate_no = $('#plate_no'); | |||||
plate_no.attr("required", !plate_no.attr("required")); | |||||
}); | |||||
$('#checkCompanyNo').change(function(){ | |||||
var checkCompanyNo = $("#checkCompanyNo"); | |||||
checkCompanyNo.attr("checked", !checkCompanyNo.attr("checked")); | |||||
var company_no = $('#company_no'); | |||||
company_no.attr("required", !company_no.attr("required")); | |||||
}); | |||||
$('#checkNric').change(function(){ | |||||
var checkNric = $("#checkNric"); | |||||
checkNric.attr("checked", !checkNric.attr("checked")); | |||||
var nric = $('#nric'); | |||||
nric.attr("required", !nric.attr("required")); | |||||
}); | |||||
$('#checkLicense').change(function(){ | |||||
var checkLicense = $("#checkLicense"); | |||||
checkLicense.attr("checked", !checkLicense.attr("checked")); | |||||
var license = $('#license'); | |||||
license.attr("required", !license.attr("required")); | |||||
}); | |||||
$('#checkName').change(function(){ | |||||
var checkName = $("#checkName"); | |||||
checkName.attr("checked", !checkName.attr("checked")); | |||||
var nameP = $('#nameP'); | |||||
nameP.attr("required", !nameP.attr("required")); | |||||
}); | |||||
$('#checkCompanyName').change(function(){ | |||||
var checkCompanyName = $("#checkCompanyName"); | |||||
checkCompanyName.attr("checked", !checkCompanyName.attr("checked")); | |||||
var company_name = $('#company_name'); | |||||
company_name.attr("required", !company_name.attr("required")); | |||||
}); | |||||
<div class="data_table_main dt-responsive table-responsive"> | |||||
<table id="compoundParkir" class="table table-sm table-striped table-bordered nowrap" width="100%"> | |||||
<thead> | |||||
<tr> | |||||
<th>#</th> | |||||
<th>Modul</th> | |||||
<th>Kpd</th> | |||||
<th>Jenis</th> | |||||
<th>Tarikh Masa</th> | |||||
<th>Kesalahan</th> | |||||
<th>Kadar Kompaun</th> | |||||
<th>No Plat</th> | |||||
<th>PenguatKuasa</th> | |||||
<th width="110">Status</th> | |||||
<th>Tindakan</th> | |||||
</tr> | |||||
</thead> | |||||
<tfoot> | |||||
<tr> | |||||
<th>#</th> | |||||
<th>Modul</th> | |||||
<th>Kpd</th> | |||||
<th>Jenis</th> | |||||
<th>Tarikh Masa</th> | |||||
<th>Kesalahan</th> | |||||
<th>Kadar Kompaun</th> | |||||
<th>No Plat</th> | |||||
<th>PenguatKuasa</th> | |||||
<th width="110">Status</th> | |||||
<th>Tindakan</th> | |||||
</tr> | |||||
</tfoot> | |||||
</table> | |||||
</div> |
<div class="data_table_main dt-responsive table-responsive"> | |||||
<table id="compoundPelbagai" class="table table-sm table-striped table-bordered nowrap" width="100%"> | |||||
<thead> | |||||
<tr> | |||||
<th>#</th> | |||||
<th>Modul</th> | |||||
<th>Kpd</th> | |||||
<th>Jenis</th> | |||||
<th>Tarikh Masa</th> | |||||
<th>Kesalahan</th> | |||||
<th width="110">Kadar Kompaun</th> | |||||
<th>Nric</th> | |||||
<th>Nama</th> | |||||
<th>Akaun Lesen</th> | |||||
<th>PenguatKuasa</th> | |||||
<th>Status</th> | |||||
<th>Tindakan</th> | |||||
</tr> | |||||
</thead> | |||||
<tfoot> | |||||
<tr> | |||||
<th>#</th> | |||||
<th>Modul</th> | |||||
<th>Kpd</th> | |||||
<th>Jenis</th> | |||||
<th>Tarikh Masa</th> | |||||
<th>Kesalahan</th> | |||||
<th width="110">Kadar Kompaun</th> | |||||
<th>Nric</th> | |||||
<th>Nama</th> | |||||
<th>Akaun Lesen</th> | |||||
<th>PenguatKuasa</th> | |||||
<th>Status</th> | |||||
<th>Tindakan</th> | |||||
</tr> | |||||
</tfoot> | |||||
</table> | |||||
</div> |
<div class="col-xl-10 col-md-12"> | |||||
<div class="card"> | |||||
<div class="card-block"> | |||||
<form id="filter_form" class="main cussPayment" novalidate> | |||||
<input type="hidden" name="department" value="{{ json_encode($user->StaffDetail->department_ids) }}"> | |||||
<input type="hidden" name="modul" value="{{ $modul }}"> | |||||
<div class="row clearfix"> | |||||
<div class="col-lg-3"> | |||||
<label><input type="checkbox" id="check_kpd" checked/> <b>No</b></label> | |||||
<div class="input-group input-group-sm"> | |||||
<span class="input-group-prepend"> | |||||
<label class="input-group-text">KPD</label> | |||||
</span> | |||||
<input type="text" class="form-control form-control-sm" placeholder="SCM4744" value="" name="kpd" id="kpd" required /> | |||||
</div> | |||||
</div> | |||||
<div class="col-lg-3"> | |||||
<label><b>Jenis 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">Pelbagai</option> | |||||
</select> | |||||
</div> | |||||
</div> | |||||
<div class="row clearfix" style="margin-bottom: 1.25em"> | |||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> | |||||
<label><input type="checkbox" id="check_date" checked/> <b>Tarikh</b></label> | |||||
</div> | |||||
<div class="col-lg-3"> | |||||
<input type="date" class=" form-control form-control-sm" value="{{ $now }}" name="start_date" id="start_date" required/> | |||||
</div> | |||||
<span><b>-</b></span> | |||||
<div class="col-lg-3"> | |||||
<input type="date" class="form-control form-control-sm" value="{{ $now }}" name="end_date" id="end_date" /> | |||||
</div> | |||||
</div> | |||||
<div class="row clearfix" style="margin-bottom: 1.25em"> | |||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> | |||||
<label><b>Seksyen Kesalahan</b></label> | |||||
</div> | |||||
<div class="col-lg-9 .offset-xl-3"> | |||||
<select class="form-control form-control-sm" name="faulty" required> | |||||
<option value="All">All</option> | |||||
@foreach($deedlaw as $d) | |||||
<optgroup label="{{ $d->nama }}"> | |||||
@foreach($d->Faulty as $f) | |||||
<option value="{{ $f->_id }}">Seksyen {{ $f->sketr }}</option> | |||||
@endforeach | |||||
</optgroup> | |||||
@endforeach | |||||
</select> | |||||
</div> | |||||
</div> | |||||
<div class="row clearfix" style="margin-bottom: 1.25em"> | |||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> | |||||
<label><b>PenguatKuasa</b></label> | |||||
</div> | |||||
<div class="col-lg-6 .offset-xl-6"> | |||||
<select class="form-control form-control-sm" name="enforcer" required> | |||||
<option value="All">All</option> | |||||
@foreach($staff as $s) | |||||
<option value="{{ $s->_id }}"><b>{{ $s->no_badan }}</b>, {{ $s->full_name }}</option> | |||||
@endforeach | |||||
</select> | |||||
</div> | |||||
</div> | |||||
<div class="row clearfix" style="margin-bottom: 1.25em"> | |||||
<div class="col-lg-3"> | |||||
<label><input type="checkbox" id="checkPlateNo" /> <b>No.Plat</b></label> | |||||
<input type="text" class="form-control form-control-sm" placeholder="no plat" value="" name="plate_no" id="plate_no"/> | |||||
</div> | |||||
<div class="col-lg-3"> | |||||
<label><input type="checkbox" id="checkName" /> <b>Nama Pesalah</b></label> | |||||
<input type="text" class="form-control form-control-sm" placeholder="nama pesalah" value="" name="nameP" id="nameP"/> | |||||
</div> | |||||
<div class="col-lg-3"> | |||||
<label><input type="checkbox" id="checkNric" /> <b>NRIC</b></label> | |||||
<input type="text" class="form-control form-control-sm" placeholder="nric" value="" name="nric" id="nric"/> | |||||
</div> | |||||
<div class="col-lg-3"> | |||||
<label><input type="checkbox" id="checkLicense" /> <b>Akaun Lesen</b></label> | |||||
<input type="text" class="form-control form-control-sm" placeholder="no lesen" value="" name="license" id="license"/> | |||||
</div> | |||||
</div> | |||||
<div class="row clearfix" style="margin-bottom: 1.25em"> | |||||
<div class="col-lg-3"> | |||||
<label><input type="checkbox" id="checkCompanyNo"/> <b>No.Syarikat</b></label> | |||||
<input type="text" class="form-control form-control-sm" placeholder="no syarikat" value="" name="company_no" id="company_no"/> | |||||
</div> | |||||
<div class="col-lg-3"> | |||||
<label><input type="checkbox" id="checkCompanyName"/> <b> Nama Syarikat</b></label> | |||||
<input type="text" class="form-control form-control-sm" placeholder="nama syarikat" value="" name="company_name" id="company_name"/> | |||||
</div> | |||||
</div> | |||||
@if(Request::is('main/compound')) | |||||
<div class="row clearfix" style="margin-bottom: 1.25em"> | |||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> | |||||
<label><b>Status</b></label> | |||||
</div> | |||||
<div class="col-lg-3 .offset-xl-9"> | |||||
<select class="form-control form-control-sm" name="status" required> | |||||
<option value="All">All</option> | |||||
<option value="Batal">Batal</option> | |||||
<option value="Belum Bayar">Belum Bayar</option> | |||||
<option value="Berbayar">Berbayar</option> | |||||
</select> | |||||
</div> | |||||
</div> | |||||
@elseif(Request::is('main/compound/completed')) | |||||
<input type="hidden" name="status" value="Berbayar"> | |||||
@elseif(Request::is('main/compound/new')) | |||||
<div class="row clearfix" style="margin-bottom: 1.25em"> | |||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> | |||||
<label><b>Status</b></label> | |||||
</div> | |||||
<div class="col-lg-3 .offset-xl-9"> | |||||
<select class="form-control form-control-sm" name="status" required> | |||||
<option value="Belum Bayar">Belum Bayar</option> | |||||
<option value="Batal">Batal</option> | |||||
</select> | |||||
</div> | |||||
</div> | |||||
@else | |||||
<input type="hidden" name="status" value="Belum Bayar"> | |||||
@endif | |||||
<div class="form-group"> | |||||
<button id="tapis" class="btn btn-info btn-sm waves-effect waves-light">Carian</button> | |||||
</div> | |||||
</form> | |||||
</div> | |||||
</div> | |||||
</div> |
<style type="text/css"> | |||||
.panel-body .menu-active, .panel-body .menu:hover { | |||||
background: #D54215 !important; | |||||
} | |||||
.panel-body .menu-active a { | |||||
color: #fff !important; | |||||
font-weight: bold !important; | |||||
} | |||||
.panel-body .menu-active:hover a, .panel-body .menu:hover a{ | |||||
color: #fff !important; | |||||
font-weight: bold !important; | |||||
} | |||||
a:hover { | |||||
color: #fff !important; | |||||
} | |||||
</style> | |||||
<div class="col-xl-2 col-md-12"> | |||||
<div class="row"> | |||||
<div class="col-md-12"> | |||||
<div class="panel panel-default"> | |||||
<div class="panel-heading"> | |||||
<h4 class="panel-title"> <b>Modul Kategori</b> </h4> | |||||
</div> | |||||
<div class="panel-body"> | |||||
<div class="{{ Request::is('main/compound') ? 'menu-active' : 'menu' }}"><a href="/main/compound">Semua Kompaun</a> <label class="badge badge-success">{{ $semua }} </label></div> | |||||
<div class="{{ Request::is('main/compound/new') ? 'menu-active' : 'menu' }}"><a href="/main/compound/new">Baru (03)</a> <label class="badge badge-success">{{ $baru }}</label></div> | |||||
<div class="{{ Request::is('main/compound/investigation') ? 'menu-active' : 'menu' }}"><a href="/main/compound/investigation">Pengesahan Kompaun (04)</a> <label class="badge badge-success">{{ $invest }}</label></div> | |||||
<div class="{{ Request::is('main/compound/notice') ? 'menu-active' : 'menu' }}"><a href="/main/compound/notice">Notis Amaran (05)</a> <label class="badge badge-success">{{ $notice }}</label> </div> | |||||
<div class="{{ Request::is('main/compound/confiscated') ? 'menu-active' : 'menu' }}"><a href="/main/compound/confiscated">Sitaan (06-07)</a> <label class="badge badge-success">{{ $inven }}</label> </div> | |||||
<div class="{{ Request::is('main/compound/completed') ? 'menu-active' : 'menu' }}"><a href="/main/compound/completed">Kompaun Dijelaskan</a> <label class="badge badge-success">{{ $comp }}</label></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="row" style="margin-top: 10px"> | |||||
<div class="col-md-12"> | |||||
<div class="card"> | |||||
<div class="card-body"> | |||||
@if(Request::is('main/compound')) | |||||
<i><b>Semua</b> status kompaun termasuk <b>semua</b> modul</i> | |||||
@elseif(Request::is('main/compound/new')) | |||||
<i>Senarai kompaun yang <b>belum bayar / batal</b> dan dalam kategori modul <b>Baru (03)</b> sahaja</i> | |||||
@elseif(Request::is('main/compound/investigation')) | |||||
<i>Senarai kompaun yang <b>belum bayar</b> dan dalam kategori modul <b>Pengesahan (04)</b> sahaja</i> | |||||
@elseif(Request::is('main/compound/notice')) | |||||
<i>Senarai kompaun yang <b>belum bayar</b> dan dalam kategori modul <b>Notis Amaran (05)</b> sahaja</i> | |||||
@elseif(Request::is('main/compound/confiscated')) | |||||
<i>Senarai kompaun yang <b>belum bayar</b> dan dalam kategori modul <b>Sitaan (06-07)</b> sahaja</i> | |||||
@elseif(Request::is('main/compound/completed')) | |||||
<i>Senarai kompaun yang <b>berbayar</b> sahaja</i> | |||||
@endif | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="row"> | |||||
<div class="col-md-12"> | |||||
<div class="card"> | |||||
<div class="card-body"> | |||||
<b><i>Peringatan:</i></b> | |||||
<p>Sebagai <b>Ketua Jabatan</b>, kamu hanya boleh mengakses semua kompaun yang sama <b>jabatan</b> dengan kamu</p> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> |
.glyphicon { margin-right:10px; } | .glyphicon { margin-right:10px; } | ||||
.panel-body { padding:0px; } | .panel-body { padding:0px; } | ||||
.panel-body table tr td { padding-left: 15px } | .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 tr td a:hover , .panel-body div a:hover{ color: #fff !important; }*/ | |||||
.panel-body .table, .panel-body div {margin-bottom: 0px; } | .panel-body .table, .panel-body div {margin-bottom: 0px; } | ||||
.r-padd { padding-right: 5%; } | .r-padd { padding-right: 5%; } | ||||
.active { color: #d84315; } | |||||
.active:hover { color: #d84315; } | |||||
th { font-weight: 600; } | th { font-weight: 600; } | ||||
table.dataTable.nowrap th, table.dataTable.nowrap td { | table.dataTable.nowrap th, table.dataTable.nowrap td { | ||||
</style> | </style> | ||||
<div class="inner-page"> | <div class="inner-page"> | ||||
<div id="completedcompound" data-current_id='{{ $user->_id }}' data-enforcer='{{ $staff }}' data-faulty='{{ $faulty }}' data-modul='' data-status='Berbayar' data-baru="{{ $baru }}" | |||||
data-invest="{{ $invest }}" data-notice="{{ $notice }}" data-inven="{{ $inven }}" data-collap="{{ $collap }}" data-comp="{{ $comp }}"></div> | |||||
<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 Dijelaskan</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> | </div> | ||||
@endsection | @endsection | ||||
@section('external_js') | @section('external_js') | ||||
<script type="text/javascript" src="{{ asset('js/app.js') }}"></script> | |||||
<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(); | |||||
} | |||||
console.log(SITEURL +'/api/list/compound'+ queryString1); | |||||
console.log(SITEURL +'/api/list/compound'+ queryString2); | |||||
} | |||||
return false; | |||||
}); | |||||
</script> | |||||
@endsection | @endsection |
.glyphicon { margin-right:10px; } | .glyphicon { margin-right:10px; } | ||||
.panel-body { padding:0px; } | .panel-body { padding:0px; } | ||||
.panel-body table tr td { padding-left: 15px } | .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 tr td a:hover , .panel-body div a:hover{ color: #fff !important; } | |||||
.panel-body .table, .panel-body div {margin-bottom: 0px; } | .panel-body .table, .panel-body div {margin-bottom: 0px; } | ||||
.r-padd { padding-right: 5%; } | .r-padd { padding-right: 5%; } | ||||
table.nowrap th, table.nowrap td { | table.nowrap th, table.nowrap td { | ||||
white-space: pre-line !important; | white-space: pre-line !important; | ||||
} | } | ||||
/*.dataTables_length { | |||||
float:right !important; | |||||
}*/ | |||||
</style> | </style> | ||||
<div class="inner-page"> | <div class="inner-page"> | ||||
<div id="newcompound" data-current_id='{{ $user->_id }}' data-enforcer='{{ $staff }}' data-faulty='{{ $faulty }}' data-modul='03' data-status='Belum Bayar' data-baru="{{ $baru }}" | |||||
data-invest="{{ $invest }}" data-notice="{{ $notice }}" data-inven="{{ $inven }}" data-collap="{{ $collap }}" data-comp="{{ $comp }}"></div> | |||||
<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> | </div> | ||||
@endsection | @endsection | ||||
@section('external_js') | @section('external_js') | ||||
<script type="text/javascript" src="{{ asset('js/app.js') }}"></script> | |||||
<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(); | |||||
} | |||||
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() == 'Pelbagai'){ | |||||
$('#datePay').show(); | |||||
$('#tarikh_bayar').prop('required', true); | |||||
}else { | |||||
$('#datePay').hide(); | |||||
$('#tarikh_bayar').prop('required', false); | |||||
} | |||||
$('#kemaskiniC').modal({ | |||||
show: true | |||||
}) | |||||
}; | |||||
</script> | |||||
@endsection | @endsection |
</style> | </style> | ||||
<div class="inner-page"> | <div class="inner-page"> | ||||
<div id="confiscatedcompound" data-current_id='{{ $user->_id }}' data-enforcer='{{ $staff }}' data-faulty='{{ $faulty }}' data-modul='06-07' data-status='Belum Bayar' data-baru="{{ $baru }}" | |||||
data-invest="{{ $invest }}" data-notice="{{ $notice }}" data-inven="{{ $inven }}" data-collap="{{ $collap }}" data-comp="{{ $comp }}"></div> | |||||
<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 Disita</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> | </div> | ||||
@endsection | @endsection | ||||
@section('external_js') | @section('external_js') | ||||
<script type="text/javascript" src="{{ asset('js/app.js') }}"></script> | |||||
<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(); | |||||
} | |||||
console.log(SITEURL +'/api/list/compound'+ queryString1); | |||||
console.log(SITEURL +'/api/list/compound'+ queryString2); | |||||
} | |||||
return false; | |||||
}); | |||||
</script> | |||||
@endsection | @endsection |
</style> | </style> | ||||
<div class="inner-page"> | <div class="inner-page"> | ||||
<div id="verifiedcompound" data-current_id='{{ $user->_id }}' data-enforcer='{{ $staff }}' data-faulty='{{ $faulty }}' data-modul='04' data-status='Belum Bayar' data-baru="{{ $baru }}" | |||||
data-invest="{{ $invest }}" data-notice="{{ $notice }}" data-inven="{{ $inven }}" data-collap="{{ $collap }}" data-comp="{{ $comp }}"></div> | |||||
<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 Pengesahan</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> | </div> | ||||
@endsection | @endsection | ||||
@section('external_js') | @section('external_js') | ||||
<script type="text/javascript" src="{{ asset('js/app.js') }}"></script> | |||||
<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(); | |||||
} | |||||
console.log(SITEURL +'/api/list/compound'+ queryString1); | |||||
console.log(SITEURL +'/api/list/compound'+ queryString2); | |||||
} | |||||
return false; | |||||
}); | |||||
</script> | |||||
@endsection | @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"> | |||||
<div class="row"> | |||||
<div class="col-md-8"> | |||||
<h5>Senarai Kompaun Yang Baru Dikeluarkan</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="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> | |||||
</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> | |||||
<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(); | |||||
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(); | |||||
} | |||||
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) { | |||||
$('#id').val(id); | |||||
$('#kemaskiniC').modal({ | |||||
show: true | |||||
}) | |||||
}; | |||||
</script> | |||||
@endsection |
</style> | </style> | ||||
<div class="inner-page"> | <div class="inner-page"> | ||||
<div id="noticecompound" data-current_id='{{ $user->_id }}' data-enforcer='{{ $staff }}' data-faulty='{{ $faulty }}' data-modul='05' data-status='Belum Bayar' data-baru="{{ $baru }}" | |||||
data-invest="{{ $invest }}" data-notice="{{ $notice }}" data-inven="{{ $inven }}" data-collap="{{ $collap }}" data-comp="{{ $comp }}"></div> | |||||
<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> | </div> | ||||
@endsection | @endsection | ||||
@section('external_js') | @section('external_js') | ||||
<script type="text/javascript" src="{{ asset('js/app.js') }}"></script> | |||||
<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(); | |||||
} | |||||
console.log(SITEURL +'/api/list/compound'+ queryString1); | |||||
console.log(SITEURL +'/api/list/compound'+ queryString2); | |||||
} | |||||
return false; | |||||
}); | |||||
</script> | |||||
@endsection | @endsection |
Route::post('/compound/make/payment', 'PaymentController@makeWebPayment'); | Route::post('/compound/make/payment', 'PaymentController@makeWebPayment'); | ||||
Route::get('/responsive/compound/{ic}/list', ['uses' => 'ResponsiveController@showCompoundPage']); | Route::get('/responsive/compound/{ic}/list', ['uses' => 'ResponsiveController@showCompoundPage']); | ||||
Route::get('/responsive/compound/{kpd}/view/details', ['uses' => 'ResponsiveController@requestCompoundPaymentPdf']); | |||||
Route::get('/responsive/compound/{kpd}/{ic}/view/details', ['uses' => 'ResponsiveController@requestCompoundPaymentPdf']); | |||||
/*------------------------------------------------------------------------- | |||||
| Export Data | |||||
|-------------------------------------------------------------------------*/ | |||||
Route::post('/get/datatable', 'ExportCompound@getData'); | |||||
Route::get('/download/excel/compound/{file}/{jenis}', 'ExportCompound@export'); | |||||
/* | /* | ||||
|-------------------------------------------------------------------------- | |-------------------------------------------------------------------------- | ||||
| Compound | | Compound | ||||
|-------------------------------------------------------------------------*/ | |-------------------------------------------------------------------------*/ | ||||
Route::get('/main/compound', ['uses' => 'Main\CompoundController@index', 'as' => 'compound']); | Route::get('/main/compound', ['uses' => 'Main\CompoundController@index', 'as' => 'compound']); | ||||
Route::get('/main/compound/new', ['uses' => 'Main\CompoundController@new_index', 'as' => 'compoundN']); | |||||
Route::get('/main/compound/investigation', ['uses' => 'Main\CompoundController@investigation_index', 'as' => 'investL']); | Route::get('/main/compound/investigation', ['uses' => 'Main\CompoundController@investigation_index', 'as' => 'investL']); | ||||
Route::get('/main/compound/notice', ['uses' => 'Main\CompoundController@notice_index', 'as' => 'noticeL']); | Route::get('/main/compound/notice', ['uses' => 'Main\CompoundController@notice_index', 'as' => 'noticeL']); | ||||
Route::get('/main/compound/confiscated', ['uses' => 'Main\CompoundController@confiscated_index', 'as' => 'confiscatedL']); | Route::get('/main/compound/confiscated', ['uses' => 'Main\CompoundController@confiscated_index', 'as' => 'confiscatedL']); | ||||
Route::get('/main/compound/{kpd}/inventory/pdf', ['uses' => 'Main\InventoryController@requestViewInventoryPdf', 'as' => 'inventoryDP']); | Route::get('/main/compound/{kpd}/inventory/pdf', ['uses' => 'Main\InventoryController@requestViewInventoryPdf', 'as' => 'inventoryDP']); | ||||
Route::get('/main/compound/{kpd}/inventory/auction', ['uses' => 'Main\CompoundController@viewCompoundAuctionDetail', 'as' => 'auctionD']); | Route::get('/main/compound/{kpd}/inventory/auction', ['uses' => 'Main\CompoundController@viewCompoundAuctionDetail', 'as' => 'auctionD']); | ||||
Route::get('/main/compound/{kpd}/pdf/test', ['uses' => 'Main\TaskController@requestViewAllPdftest', 'as' => 'pdfD']); | |||||
Route::get('/main/compound/{kpd}/pdf', ['uses' => 'Main\TaskController@requestViewAllPdf', 'as' => 'pdfD']); | Route::get('/main/compound/{kpd}/pdf', ['uses' => 'Main\TaskController@requestViewAllPdf', 'as' => 'pdfD']); | ||||
Route::get('/main/compound/{kpd}/task', ['uses' => 'Main\CompoundController@viewTaskIndex', 'as' => 'taskD']); | Route::get('/main/compound/{kpd}/task', ['uses' => 'Main\CompoundController@viewTaskIndex', 'as' => 'taskD']); | ||||
Route::post('/main/compound/update/action', ['uses' => 'Main\TaskController@requestUpdateTask']); | Route::post('/main/compound/update/action', ['uses' => 'Main\TaskController@requestUpdateTask']); | ||||
/*------------------------------------------------------------------------- | /*------------------------------------------------------------------------- | ||||
| Report & Statistic | | Report & Statistic | ||||
|-------------------------------------------------------------------------*/ | |-------------------------------------------------------------------------*/ | ||||
Route::get('/main/report', ['uses' => 'Main\ReportController@reportList', 'as' => 'reportL']); | |||||
Route::get('/main/report/statistic/faulty', ['uses' => 'Main\ReportController@reportCompoundList', 'as' => 'reportC']); | |||||
// Route::get('/main/report', ['uses' => 'Main\ReportController@reportList', 'as' => 'reportL']); | |||||
Route::get('/main/payment/on-site', ['uses' => 'Main\ReportController@reportOnSitePayment']); | |||||
Route::get('/main/report/statistic/enforcer', ['uses' => 'Main\ReportController@reportStatisticEnforcer', 'as' => 'reportEC']); | |||||
Route::get('/main/report/statistic/faulty', ['uses' => 'Main\ReportController@reportStatisticFaulty', 'as' => 'reportEF']); | |||||
Route::get('/main/report/current/compound', ['uses' => 'Main\ReportController@reportCurrentCompound', 'as' => 'reportECS']); | |||||
Route::get('/main/report/backlog', ['uses'=> 'Main\ReportController@reportBacklog', 'as' => 'reportT']); | |||||
Route::get('/main/export/report/enforcer/{year}/{jenis}/{_id}', ['uses' => 'Main\ExportReport@export_compound_enforcer']); | |||||
Route::get('/main/export/report/faulty/{start}/{end}/{jbkod}/All', ['uses' => 'Main\ExportReport@export_compound_faulty']); | |||||
Route::get('/main/export/report/current/compound/{start_year}/{end_year}/{budget1}/{budget2}/{jbkod}', ['uses' => 'Main\ExportReport@export_compound_current']); | |||||
Route::get('/main/export/report/backlog/{year}/{_id}', ['uses' => 'Main\ExportReport@export_compound_backlog']); | |||||
Route::get('/main/export/report/on_site/payment/{type}/{enforcer}/{start}/{end}', ['uses' => 'Main\ExportReport@export_compound_on_site']); | |||||
/*------------------------------------------------------------------------- | /*------------------------------------------------------------------------- | ||||
| Api Integration | | Api Integration | ||||
|-------------------------------------------------------------------------*/ | |-------------------------------------------------------------------------*/ | ||||
Route::get('/main/api-integration', ['uses' => 'Main\SettingController@viewApiIntegration', 'as' => 'apiIntegration']); | Route::get('/main/api-integration', ['uses' => 'Main\SettingController@viewApiIntegration', 'as' => 'apiIntegration']); | ||||
Route::post('/main/add-api-key', ['uses' => 'Main\SettingController@addApiKey']); | Route::post('/main/add-api-key', ['uses' => 'Main\SettingController@addApiKey']); | ||||
Route::post('/main/add-api-integration', ['uses' => 'Main\SettingController@addIntegrasi']); | Route::post('/main/add-api-integration', ['uses' => 'Main\SettingController@addIntegrasi']); | ||||
}); | }); | ||||
/* | /* |