Explorar el Código

num notice

master
Siti Rahayu hace 4 años
padre
commit
81dce80acd

+ 38
- 91
app/Http/Controllers/Api/CompoundResourceController.php Ver fichero

@@ -59,26 +59,27 @@ class CompoundResourceController extends BaseController
$end = $dateS->copy()->endOfDay();
}


if(!empty($day3))
{
$compound = Compound::where('jenis', $jenis)->whereBetween('created_at', array($start->subDays(3), $end->subDays(3)));
$compound = Compound::where('jenis_n', $jenis)->whereBetween('created_at', array($start->subDays(3), $end->subDays(3)));
}
else if(!empty($day7))
{
$compound = Compound::where('jenis', $jenis)->whereBetween('created_at', array($start->subDays(7), $end->subDays(7)));
$compound = Compound::where('jenis_n', $jenis)->whereBetween('created_at', array($start->subDays(7), $end->subDays(7)));
}
else
{
$compound = Compound::where('jenis', $jenis)->whereBetween('created_at', array($start, $end));
$compound = Compound::where(function($query) use ($jenis){$query->where('jenis', $jenis)->orWhere('jenis_n', $jenis); })
->whereBetween('created_at', array($start, $end));

}

if($modul == 'All'){
$compound = $compound;
}else if($modul == '06-07'){
$compound = $compound->where(function($q){
// $q->where(function($query){
$q->where('modul', '06')->orWhere('modul','07');
// });
$q->where('modul', '06')->orWhere('modul','07');
});
}else {
$compound = $compound->where('modul', $modul);
@@ -97,15 +98,16 @@ class CompoundResourceController extends BaseController

if(!empty($day3))
{
$compound = Compound::where('jenis', $jenis)->where('created_at', Carbon::now()->subDays(3));
$compound = Compound::where('jenis_n', $jenis)->where('created_at', Carbon::now()->subDays(3));

}
else if(!empty($day7))
{
$compound = Compound::where('jenis', $jenis)->where('created_at', Carbon::now()->subDays(7));
$compound = Compound::where('jenis_n', $jenis)->where('created_at', Carbon::now()->subDays(7));
}
else
{
$compound = Compound::where('jenis', $jenis);
$compound = Compound::where('jenis', $jenis)->orWhere('jenis_n', $jenis);
}

if($modul == 'All'){
@@ -135,15 +137,13 @@ class CompoundResourceController extends BaseController
if(!empty($start_date)){
$compound = $this->searchCompoundAll($jenis,$modul,$status,$start_date,$end_date,$day3, $day7);
}else{

$compound = $this->searchCompoundAllWithoutDate($jenis,$modul,$status,$day3, $day7);

}

if($enforcer == 'All'){
return $compound;
}else {
$compound = $compound->where('dikeluarkan', $enforcer);
$compound = $compound->where('dikeluarkan', $enforcer)->orWhere('dikeluarkan_n', $enforcer);
return $compound;
}
}
@@ -152,15 +152,18 @@ class CompoundResourceController extends BaseController
$compound = $this->filterCompoundByEnforcer($enforcer,$jenis,$modul,$status,$start_date,$end_date,$day3, $day7);

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

return $compound;
}else {
$compound = $compound->where('seksyen_kesalahan', $faulty);
$compound = $compound->where('seksyen_kesalahan', $faulty)->orWhere('seksyen_kesalahan_n', $faulty);
return $compound;
}
}

private function searchPlateNo($enforcer,$faulty,$jenis,$modul,$status,$start_date,$end_date,$department,$plate_no,$day3, $day7){
$compound = $this->filterCompoundByFaulty($enforcer,$faulty,$jenis,$modul,$status,$start_date,$end_date,$department,$day3, $day7);

if(!empty($plate_no)){
$compound = $compound->where('no_plate',$plate_no);
return $compound;
@@ -241,10 +244,9 @@ class CompoundResourceController extends BaseController

// $per_page = '';
// $kpd = '';

// $modul = '02';
// $status = 'All';
// $jenis = 'Pelbagai_JPB';
// $jenis = 'Notis_NHN';
// if(!empty($request->department)){
// $department = array (
// 0 => '5df355f891d6e66b9c5e626d',
@@ -256,10 +258,10 @@ class CompoundResourceController extends BaseController
// }else {
// $department = [];
// }
// // $start_date = '';
// // $end_date = '';
// $start_date = '2020-09-29';
// $end_date = '2020-10-01';
// $start_date = '';
// $end_date = '';
// // $start_date = '2020-09-29';
// // $end_date = '2020-10-09';

// $enforcer = 'All';
// $faulty = 'All';
@@ -270,7 +272,7 @@ class CompoundResourceController extends BaseController
// $license = '';
// $namaP = '';
// $company_name = '';
// $day3 = 3;
// $day3 = '';
// $day7 = '';

/////////////////////////////////////////////////////////////////////////////////
@@ -302,23 +304,17 @@ class CompoundResourceController extends BaseController
$day7='';

if ($request->has('day3')) {
$day3 = $request->day3; //has() checks if param exist and filled
}
if ($request->has('day7')) {
$day3 = $request->day7; //has() checks if param exist and filled
}

// if (!empty($start_date)) {

// }


$day3 = $request->day3; //has() checks if param exist and filled
}
if ($request->has('day7')) {
$day3 = $request->day7; //has() checks if param exist and filled
}

$nested_data = array();

$compound = $this->searchCompanyName($enforcer,$faulty,$jenis,$modul,$status,$start_date,$end_date,$department,$plate_no,$kpd,$company_no,$nric,$license,$namaP,$company_name, $day3, $day7)->orderBy('created_at','ASC')->get();

// info($compound);
info($compound);

return \DataTables::of(CompoundResource::collection($compound))->addIndexColumn()
->addColumn('index', function($row) {
@@ -501,6 +497,7 @@ class CompoundResourceController extends BaseController
$data = array();
$faulty = $request->seksyen;


$faulty = Faulty::where('_id',$request->get('seksyen'))->orWhere('nama', 'like', $faulty)->first();

if($request->jenis == 'Parkir')
@@ -558,9 +555,10 @@ class CompoundResourceController extends BaseController
$saved = $file->compound()->create($compoundData);
}

}elseif(($request->jenis == 'Pelbagai_KT') || ($request->jenis == 'Pelbagai_JPB') || ($request->jenis == 'Pelbagai_PA') || ($request->jenis == 'Pelbagai_LESEN')){
}elseif(($request->jenis == 'Pelbagai_KT') || ($request->jenis == 'Pelbagai_JPB')){

$compound = Compound::where('jenis_n', $request->jenis)->orWhere('non', $request->non)->first();

$compound = Compound::where('jenis', $request->jenis)->where('kpd', $kpd)->first();
info($compound);

if(!empty($compound)) {
@@ -570,7 +568,8 @@ class CompoundResourceController extends BaseController
if($compound->modul != '03')
{
if($request->jenis == 'Pelbagai_KT'){
$compound->kpd = $this->generateNumber($request->jenis, 'KT', '03');
$kpd = $this->generateNumber($request->jenis, 'KT', '03');
$compound->kpd = $kpd;
$compound->jenis = $request->jenis;
$compound->nama = $request->namaP;
$compound->identity = $request->noIc;
@@ -596,7 +595,8 @@ class CompoundResourceController extends BaseController


}elseif($request->jenis == 'Pelbagai_JPB'){
$compound->kpd = $this->generateNumber($request->jenis, 'JPB', '03');
$kpd = $this->generateNumber($request->jenis, 'JPB', '03');
$compound->kpd = $kpd;
$compound->jenis = $request->jenis;
$compound->nama = $request->namaP;
$compound->identity = $request->noIc;
@@ -621,59 +621,6 @@ class CompoundResourceController extends BaseController
$compound->created_c = Carbon::now()->toDateTimeString();

}
// }elseif($request->jenis == 'Pelbagai_PA'){

// $compound->jenis = $request->jenis;
// $compound->nama = $request->namaP;
// $compound->identity = $request->noIc;
// $compound->nama_syarikat = $request->namaS;
// $compound->no_daftar_syarikat = strtolower($request->daftarNo);
// $compound->alamat = $request->alamat;
// // $compound->no_plate = $request->no_plate;
// // $compound->no_cukai_jalan = $request->no_cukai_jalan;
// // $compound->nama_kawasan = $request->namaKawasan;
// // $compound->nama_taman = $request->namaTaman;
// // $compound->nama_jalan = $request->namaJalan;
// $compound->catatan = $request->catatan;
// $compound->latlong = $request->Latlong;
// $compound->akta = $faulty->deed_law_id;
// $compound->seksyen_kesalahan = $faulty->_id;
// $compound->jumlah_asal_kompaun = $faulty->amount;
// $compound->dikeluarkan = $staff->_id;
// $compound->status = 'Belum Bayar';
// $compound->modul = '03';
// $compound->no_telefon = $request->tel;
// $compound->no_akaun_lesen = $request->lesen;
// $compound->bil_haiwan = $request->lesen;
// $compound->created_c = Carbon::now()->toDateTimeString();


// }elseif($request->jenis == 'Pelbagai_LESEN'){

// $compound->jenis = $request->jenis;
// $compound->nama = $request->namaP;
// $compound->identity = $request->noIc;
// $compound->nama_syarikat = $request->namaS;
// $compound->no_daftar_syarikat = strtolower($request->daftarNo);
// $compound->alamat = $request->alamat;
// $compound->no_plate = $request->no_plate;
// $compound->no_cukai_jalan = $request->no_cukai_jalan;
// // $compound->nama_kawasan = $request->namaKawasan;
// // $compound->nama_taman = $request->namaTaman;
// // $compound->nama_jalan = $request->namaJalan;
// $compound->catatan = $request->catatan;
// $compound->latlong = $request->Latlong;
// $compound->akta = $faulty->deed_law_id;
// $compound->seksyen_kesalahan = $faulty->_id;
// $compound->jumlah_asal_kompaun = $faulty->amount;
// $compound->dikeluarkan = $staff->_id;
// $compound->status = 'Belum Bayar';
// $compound->modul = '03';
// $compound->no_telefon = $request->tel;
// $compound->no_akaun_lesen = $request->lesen;
// $compound->created_c = Carbon::now()->toDateTimeString();

// }

$saved = $compound->save();

@@ -683,6 +630,7 @@ class CompoundResourceController extends BaseController
return $this->sendResponse('', 'Kompaun ini telah dikeluarkan!');
}


if($saved){
// $compound = Compound::with('ConfidentialFile')->where('kpd',$kpd)->first();
// if(!empty($compound)){
@@ -1070,7 +1018,6 @@ class CompoundResourceController extends BaseController
}else {

$data = array();
// dd($this->compound->where('jenis', 'Parkir')->withTrashed()->count());

$faulty = Faulty::where('_id',$request->get('seksyen'))->first();
if(!empty($faulty)){

+ 13
- 13
app/Http/Controllers/ExportCompound.php Ver fichero

@@ -1,11 +1,11 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Exports\CompoundExport;
use Maatwebsite\Excel\Facades\Excel;
class ExportCompound extends Controller
{
/**
@@ -15,18 +15,18 @@ class ExportCompound extends Controller
{
return view('import');
}
/**
* @return \Illuminate\Support\Collection
*/
public function export($file, $jenis)
public function export($file, $jenis)
{
$location = 'public/uploads/cache/'.$file.'.json';
$data = json_decode(file_get_contents(base_path($location), true), true);

$final_data = array();

if($jenis == 'Pelbagai'){
if($jenis != 'Parkir'){
foreach ($data as $key => $d) {
$kemaskini_oleh = '';

@@ -48,7 +48,7 @@ class ExportCompound extends Controller
}else{
$tarikh_bayar = $d['updated_at'];
}
array_push($final_data, array(
'#' => $key+1,
'Kpd' => $d['kpd'],
@@ -112,18 +112,18 @@ class ExportCompound extends Controller
$filename = 'Report_Saman_'.$jenis;
return Excel::download(new CompoundExport($final_data,$jenis), $filename.'.xlsx');
}
/**
* @return \Illuminate\Support\Collection
*/
public function import()
public function import()
{
Excel::import(new UsersImport,request()->file('file'));
return back();
}

public function getData(Request $request)
public function getData(Request $request)
{
$data = $request->data;
$filename = time();
@@ -135,6 +135,6 @@ class ExportCompound extends Controller


public function export_compound_enforcer(){
}
}
}

+ 791
- 791
app/Http/Controllers/Main/CompoundController.php
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero


+ 23
- 9
app/Http/Controllers/Main/TaskController.php Ver fichero

@@ -43,9 +43,16 @@ class TaskController extends Controller
*/
public function requestUpdateTask(Request $request){
$id = Auth::guard('sadmin')->id();
$user = Staff::with('StaffDetail')->find($id);
$user = Staff::with('StaffDetail')->find($id);

if($request->modul == '02')
{
$compound = Compound::with('ConfidentialFile')->where('non',$request->non)->first();
}
else{
$compound = Compound::with('ConfidentialFile')->where('kpd',$request->kpd)->first();
}

$compound = Compound::with('ConfidentialFile')->where('kpd',$request->kpd)->first();
$file = ConfidentialFile::where('no_siri',$compound->ConfidentialFile->no_siri)->first();
$jbkod = $compound->jbkod;

@@ -53,13 +60,16 @@ class TaskController extends Controller
$gDate = $now->format('F Y');

if($request->dashboard == "true"){
$roles = Roles::where('kod', $request->kategori_modul)->first();
$roles = Roles::where('kod', $request->kategori_modul)->first();

if($compound->modul == $request->kategori_modul){
return redirect()->back()->withInput()->with('error_msg','<strong>Tidak Berjaya!</strong> Kompaun ini sudah berada di dalam kategori modul '.$roles->name);
}else{


if($request->categori_modul == '03' && $compound->modul == '02')
{

$this->dispatch(new StoreCompoundEPBT($request->all(), $compound->kpd, $user->StaffDetail->full_name, $user->StaffDetail->no_badan, $compound->seksyen_kesalahan));
}

@@ -221,11 +231,11 @@ class TaskController extends Controller
$now = Carbon::now()->format('d/m/Y h:i:s A');

$site = SiteSetting::first();
$compound = Compound::with('ConfidentialFile','Attachment','CompoundInvestigation')->where('kpd', $kpd)->first();
$compound = Compound::with('ConfidentialFile','Attachment','CompoundInvestigation')->where('kpd', $kpd)->orWhere('non', $kpd)->first();
if(empty($compound))
{
$kpd = (int)$kpd;
$compound = Compound::with('ConfidentialFile','Attachment','CompoundInvestigation')->where('kpd', $kpd)->first();
$compound = Compound::with('ConfidentialFile','Attachment','CompoundInvestigation')->where('kpd', $kpd)->orWhere('non', $kpd)->first();
}
$file = ConfidentialFile::with(['Memo' => function($q){
$q->orderBy('updated_at','ASC');
@@ -248,13 +258,17 @@ class TaskController extends Controller
}

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

$upload [] = [ 'name' => 'compound', 'contents' => $compound ];
$upload [] = [ 'name' => 'faulty', 'contents' => $faulty ];
$upload [] = [ 'name' => 'faulty', 'contents' => $faulty ];
$upload [] = [ 'name' => 'faultyN', 'contents' => $faultyN ];
$upload [] = [ 'name' => 'staff', 'contents' => $staff ];
$upload [] = [ 'name' => 'department', 'contents' => $department ];
$upload [] = [ 'name' => 'department', 'contents' => $department ];
$upload [] = [ 'name' => 'departmentN', 'contents' => $departmentN ];
$upload [] = [ 'name' => 'tawaran', 'contents' => $tawaran ];
$upload [] = [ 'name' => 'site', 'contents' => $site ];
$upload [] = [ 'name' => 'type', 'contents' => 'mbip' ];

+ 59
- 32
app/Http/Resources/CompoundResource.php Ver fichero

@@ -14,42 +14,69 @@ class CompoundResource extends JsonResource
*/
public function toArray($request)
{

if($this->faulty != null && $this->staffdetail != null){

if($this->modul == '02' && (!empty($this->non)))
if($this->modul == '02' && (!empty($this->non)))
{
if($this->faultyNotis != null && $this->staffdetailNotis != null)
{
$kpd = $this->non;
return [
'_id' => $this->_id,
'modul' => $this->modul,
'jenis' => $this->jenis_n,
'kpd' => $this->non,
'no_plate' => '',
'nric' => $this->identity,
'no_daftar_syarikat' => $this->no_daftar_syarikat,
'nama_syarikat' => $this->nama_syarikat,
'nama' => $this->nama,
'lesen' => $this->no_akaun_lesen,
'tarikh_masa' => date('d/m/Y H:i:s A', strtotime($this->created_n)),
'faulty_skter' => $this->faultyNotis->sketr,
'faulty_name' => $this->faultyNotis->nama,
'enforcer' => $this->staffdetailNotis->no_badan.', '.$this->staffdetailNotis->full_name,
'status' => $this->status,
'kadar_kompaun' => '',
'catatan_dari_admin' => $this->catatan_dari_admin,
'updated_by' => $this->updateby,
'updates_by' => $this->update_by,
'tarikh_bayar' => '',
'amount_payment' => '',
'created_at' => $this->created_at->format('Y-m-d H:i:s'),
'updated_at' => $this->updated_at->format('Y-m-d H:i'),
];
}
else{
$kpd = $this->kpd;

}
else{
if($this->faulty != null && $this->staffdetail != null)
{
return [
'_id' => $this->_id,
'modul' => $this->modul,
'jenis' => $this->jenis,
'kpd' => $this->kpd,
'no_plate' => $this->no_plate,
'nric' => $this->identity,
'no_daftar_syarikat' => $this->no_daftar_syarikat,
'nama_syarikat' => $this->nama_syarikat,
'nama' => $this->nama,
'lesen' => $this->no_akaun_lesen,
'tarikh_masa' => $this->created_at->format('d/m/Y H:i:s A'),
'faulty_skter' => $this->faulty->sketr,
'faulty_name' => $this->faulty->nama,
'enforcer' => $this->staffdetail->no_badan.', '.$this->staffdetail->full_name,
'status' => $this->status,
'kadar_kompaun' => $this->jumlah_asal_kompaun,
'catatan_dari_admin' => $this->catatan_dari_admin,
'updated_by' => $this->updateby,
'updates_by' => $this->update_by,
'tarikh_bayar' => $this->tarikh_bayar,
'amount_payment' => $this->amount_payment,
'created_at' => $this->created_at->format('Y-m-d H:i:s'),
'updated_at' => $this->updated_at->format('Y-m-d H:i'),
];
}

return [
'_id' => $this->_id,
'modul' => $this->modul,
'jenis' => $this->jenis,
'kpd' => $kpd,
'no_plate' => $this->no_plate,
'nric' => $this->identity,
'no_daftar_syarikat' => $this->no_daftar_syarikat,
'nama_syarikat' => $this->nama_syarikat,
'nama' => $this->nama,
'lesen' => $this->no_akaun_lesen,
'tarikh_masa' => $this->created_at->format('d/m/Y H:i:s A'),
'faulty_skter' => $this->faulty->sketr,
'faulty_name' => $this->faulty->nama,
'enforcer' => $this->staffdetail->no_badan.', '.$this->staffdetail->full_name,
'status' => $this->status,
'kadar_kompaun' => $this->jumlah_kemaskini_kompaun !== '' ? $this->jumlah_kemaskini_kompaun : $this->jumlah_asal_kompaun,
'catatan_dari_admin' => $this->catatan_dari_admin,
'updated_by' => $this->updateby,
'updates_by' => $this->update_by,
'tarikh_bayar' => $this->tarikh_bayar,
'amount_payment' => $this->amount_payment,
'created_at' => $this->created_at->format('Y-m-d H:i:s'),
'updated_at' => $this->updated_at->format('Y-m-d H:i'),
];
}

}
}

+ 1
- 1
app/Jobs/StoreCompound.php Ver fichero

@@ -58,7 +58,7 @@ class StoreCompound implements ShouldQueue
*/
public function handle(ConfidentialFile $file)
{
// $success_save_data = false;
// $success_save_data = false;
// $faulty = Faulty::where('_id', $this->request['seksyen'])->first();
// if($success_save_data == false){
// $count = $file->count();

+ 23
- 23
public/js/dataNotis.js Ver fichero

@@ -24,9 +24,9 @@ $(document).ready( function () {
{ "data": "nama", "name": "nama" },
{ "data": "enforcer", "name": "enforcer" },
{ "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>&nbsp;'+(meta.row+1);
@@ -39,7 +39,7 @@ $(document).ready( function () {
{
"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>';
+'<button onclick="getDetail(\''+data+'\')" class="btn btn-primary btn-sm waves-effect waves-light">KEMASKINI STATUS</button></div>';
},
"targets": 9,
},
@@ -48,7 +48,7 @@ $(document).ready( function () {
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);
console.log(`drawcallback ${data}`);
if (data && data.length > 0) {
for(var i=0;i<data.length;i++){
data[i].status_kemaskini = '-';
@@ -61,8 +61,8 @@ $(document).ready( function () {
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();
$('#link2').html('<a target="_blank" href="'+SITEURL+'/download/excel/compound/'+filename+'/Pelbagai" class="btn btn-primary btn-sm waves-effect waves-light">Excel</a>');
$('#link2').show();
},
error: function (xhr, ajaxOptions, thrownError) {
console.log(thrownError);
@@ -70,7 +70,7 @@ $(document).ready( function () {
}
});
}
},
},
"language": {
"paginate": {
"previous": "Sebelum",
@@ -83,7 +83,7 @@ $(document).ready( function () {
"info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri",
"sSearch": "Cari:",
}
});
});


tableP3 = $('#report3').DataTable({
@@ -114,9 +114,9 @@ $(document).ready( function () {
{ "data": "nama", "name": "nama" },
{ "data": "enforcer", "name": "enforcer" },
{ "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>&nbsp;'+(meta.row+1);
@@ -129,7 +129,7 @@ $(document).ready( function () {
{
"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>';
+'<button onclick="getDetail(\''+data+'\')" class="btn btn-primary btn-sm waves-effect waves-light">KEMASKINI STATUS</button></div>';
},
"targets": 9,
},
@@ -151,8 +151,8 @@ $(document).ready( function () {
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();
$('#link2').html('<a target="_blank" href="'+SITEURL+'/download/excel/compound/'+filename+'/Pelbagai" class="btn btn-primary btn-sm waves-effect waves-light">Excel</a>');
$('#link2').show();
},
error: function (xhr, ajaxOptions, thrownError) {
console.log(thrownError);
@@ -160,7 +160,7 @@ $(document).ready( function () {
}
});
}
},
},
"language": {
"paginate": {
"previous": "Sebelum",
@@ -173,7 +173,7 @@ $(document).ready( function () {
"info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri",
"sSearch": "Cari:",
}
});
});

tableP7 = $('#report7').DataTable({
// "dom": 'Blfrtip',
@@ -203,9 +203,9 @@ $(document).ready( function () {
{ "data": "nama", "name": "nama" },
{ "data": "enforcer", "name": "enforcer" },
{ "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>&nbsp;'+(meta.row+1);
@@ -218,7 +218,7 @@ $(document).ready( function () {
{
"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>';
+'<button onclick="getDetail(\''+data+'\')" class="btn btn-primary btn-sm waves-effect waves-light">KEMASKINI STATUS</button></div>';
},
"targets": 9,
},
@@ -240,8 +240,8 @@ $(document).ready( function () {
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();
$('#link2').html('<a target="_blank" href="'+SITEURL+'/download/excel/compound/'+filename+'/Pelbagai" class="btn btn-primary btn-sm waves-effect waves-light">Excel</a>');
$('#link2').show();
},
error: function (xhr, ajaxOptions, thrownError) {
console.log(thrownError);
@@ -249,7 +249,7 @@ $(document).ready( function () {
}
});
}
},
},
"language": {
"paginate": {
"previous": "Sebelum",
@@ -262,6 +262,6 @@ $(document).ready( function () {
"info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri",
"sSearch": "Cari:",
}
});
});

});
});

+ 7
- 7
public/js/dataParkir.js Ver fichero

@@ -25,9 +25,9 @@ $(document).ready( function () {
{ "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>&nbsp;'+(meta.row+1);
@@ -40,11 +40,11 @@ $(document).ready( function () {
{
"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>';
+'<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
@@ -71,7 +71,7 @@ $(document).ready( function () {
}
});
}
},
},
"language": {
"paginate": {
"previous": "Sebelum",
@@ -84,5 +84,5 @@ $(document).ready( function () {
"info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri",
"sSearch": "Cari:",
}
});
});
});
});

+ 1
- 1
public/js/dataPelbagai.js Ver fichero

@@ -1,5 +1,5 @@
$(document).ready( function () {
tablePl = $('#compoundPelbagai').DataTable({
tableP2 = $('#compoundPelbagai').DataTable({
// "dom": 'Blfrtip',
// "buttons": [
// 'copy', 'csv', 'excel', 'pdf', 'print'

+ 24
- 12
resources/views/main-dashboard/compound/_part/filter_form.blade.php Ver fichero

@@ -15,16 +15,30 @@
</div>
</div>

<div class="col-lg-3">
<label><b>Jenis Notis/Kompaun <code>*</code></b></label>
<select class="form-control form-control-sm" name="type" id="type_C" required>
<option value="Parkir">Parkir</option>
<option value="Pelbagai_LESEN">Pelbagai LESEN</option>
<option value="Pelbagai_JPB">Pelbagai JPB</option>
<option value="Pelbagai_KT">Pelbagai KT</option>
<option value="Pelbagai_PA">Pelbagai PA</option>
</select>
</div>
@if($modul == 'All')
<div class="col-lg-3">
<label><b>Jenis Notis/Kompaun <code>*</code></b></label>
<select class="form-control form-control-sm" name="type" id="type_C" required>
<option value="Parkir">Parkir</option>
<option value="Pelbagai_JPB">Pelbagai JPB</option>
<option value="Pelbagai_KT">Pelbagai KT</option>
<option value="Notis_NMH">Notis NMH</option>
<option value="Notis_NHN">Notis NHN</option>
<option value="Notis_NKG">Notis NKG</option>
<option value="Notis_PA">Notis PA</option>
<option value="Notis_NPPM">Notis NPPM</option>
</select>
</div>
@else
<div class="col-lg-3">
<label><b>Jenis Notis/Kompaun <code>*</code></b></label>
<select class="form-control form-control-sm" name="type" id="type_C" required>
<option value="Parkir">Parkir</option>
<option value="Pelbagai_JPB">Pelbagai JPB</option>
<option value="Pelbagai_KT">Pelbagai KT</option>
</select>
</div>
@endif
</div>

<div class="row clearfix" style="margin-bottom: 1.25em">
@@ -34,12 +48,10 @@
<div class="col-lg-3">
<input type="date" class=" form-control form-control-sm" value="{{ $now }}" name="start_date" id="start_date" required/>
</div>
@if($modul != '02')
<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>
@endif
</div>

<div class="row clearfix" style="margin-bottom: 1.25em">

+ 8
- 6
resources/views/main-dashboard/compound/_part/filter_form_notice.blade.php Ver fichero

@@ -16,13 +16,13 @@
</div>

<div class="col-lg-3">
<label><b>Jenis Kompaun <code>*</code></b></label>
<label><b>Jenis Notis/Kompaun <code>*</code></b></label>
<select class="form-control form-control-sm" name="type" id="type_C" required>
<option value="Parkir">Parkir</option>
<option value="Pelbagai_LESEN">Pelbagai LESEN</option>
<option value="Pelbagai_JPB">Pelbagai JPB</option>
<option value="Pelbagai_KT">Pelbagai KT</option>
<option value="Pelbagai_PA">Pelbagai PA</option>
<option value="Notis_NMH">Notis NMH</option>
<option value="Notis_NHN">Notis NHN</option>
<option value="Notis_NKG">Notis NKG</option>
<option value="Notis_PA">Notis PA</option>
<option value="Notis_NPPM">Notis NPPM</option>
</select>
</div>
</div>
@@ -34,10 +34,12 @@
<div class="col-lg-3">
<input type="date" class=" form-control form-control-sm" value="{{ $now }}" name="start_date" id="start_date" required/>
</div>
@if($modul != '02')
<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>
@endif
</div>

<div class="row clearfix" style="margin-bottom: 1.25em">

+ 505
- 344
resources/views/main-dashboard/compound/compound_index.blade.php Ver fichero

@@ -1,344 +1,505 @@
@extends('layout.master', ['uid' => $user->_id, 'token' => $user->token_firebase])
@section('page_title', 'Kompaun')
@section('sub_page_title', '')
@section('name', $user->StaffDetail->full_name)
@section('img_profile', $user->StaffDetail->profile_img)
@section('content')
<style type="text/css">
select.form-control, select.form-control:focus, select.form-control:hover {
border: 1px solid #ccc !important;
height: auto !important;
}
.panel-group .panel {
margin-bottom: 0;
overflow: hidden;
border-radius: 4px;
}
.panel-default {
border-color: #ddd;
}
.panel-default>.panel-heading {
color: #333;
background-color: #f5f5f5;
border-color: #ddd;
}
.panel-title {
margin-top: 0;
margin-bottom: 0;
font-size: 16px;
color: inherit;
}
.panel-body .table>thead>tr>th, .panel-body .table>tbody>tr>th, .panel-body .table>tfoot>tr>th, .panel-body .table>thead>tr>td, .panel-body .table>tbody>tr>td, .panel-body .table>tfoot>tr>td , .panel-body div{
padding: 8px 15px;
line-height: 1.428571429;
vertical-align: top;
border-top: 1px solid #ddd;
}
.glyphicon { margin-right:10px; }
.panel-body { padding:0px; }
.panel-body table tr td { padding-left: 15px }
.panel-body table tr td a:hover , .panel-body div a:hover{ color: #fff !important; }
.panel-body .table, .panel-body div {margin-bottom: 0px; }
.r-padd { padding-right: 5%; }
.active { color: #d84315; }
.active:hover { color: #d84315; }
th { font-weight: 600; }
table.dataTable.nowrap th, table.dataTable.nowrap td {
white-space: pre-line !important;
}
table.nowrap th, table.nowrap td {
white-space: pre-line !important;
}
/*.dataTables_length {
float:right !important;
}*/
</style>
<div class="inner-page">
<div class="row">
@include('main-dashboard.compound._part.menu_category')
@include('main-dashboard.compound._part.filter_form')
</div>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<div class="row">
<div class="col-md-8">
<h5>Senarai Semua Kompaun</h5>
</div>
<div class="col-md-4">
<div id="link" style="float:right"></div>
<div id="link1" style="float:right"></div>
</div>
</div>
</div>
<div class="card-body">
<div id="viewParkir">
@include('main-dashboard.compound._part.compound_parkir')
</div>
<div id="viewPelbagai">
@include('main-dashboard.compound._part.compound_pelbagai')
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="kemaskiniC" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form class="form-horizontal" id="updateSt">
<div class="modal-header">
<h5 class="modal-title">Kemaskini Status Kompaun</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<input type="hidden" name="id" id="id" value="" required/>
<input type="hidden" name="typeK" id="typeK" value="" required/>
<input type="hidden" name="current_id" id="current_id" value="{{ $user->_id }}" required/>
<div class="form-group">
<label class="col-sm-6 control-label"><b>Status</b></label>
<div class="col-sm-12">
<select class="form-control" name="status" required>
<option value="Belum Bayar">Belum Bayar</option>
<option value="Berbayar">Berbayar</option>
<option value="Batal">Batal</option>
<option value="Buang">Batal (Sistem)</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label"><b>Catatan <code>*</code></b></label>
<div class="col-sm-12">
<textarea class="form-control" name="remark"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label"><b>Jumlah Dibayar <code>*</code></b></label>
<div class="col-sm-12">
<input type="text" class="form-control autonumber" name="amount" data-v-min="0.00" data-v-max="99999.00"placeholder="0.00" required/>
</div>
</div>
<div class="form-group">
<label class="col-sm-6 control-label"><b>Amaun Tunggakan</b> <code>*</code></label>
<div class="col-sm-12">
<input type="text" class="form-control autonumber" name="tunggakan" data-v-min="0.00" data-v-max="99999.00" placeholder="0.00" required/>
<code>Sekiranya tiada amaun tunggakan, sila letak 0. Amaun tunggakan ini akan diguna untuk laporan</code>
</div>
</div>
<div class="form-group" id="datePay">
<label class="col-sm-6 control-label"><b>Tarikh Bayar</b> <code>*</code></label>
<div class="col-sm-12">
<input type="datetime-local" class="form-control" name="tarikh_bayar" id="tarikh_bayar"/>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm btn-secondary mobtn" data-dismiss="modal">Close</button>
<button id="submit" class="btn btn-sm btn-primary waves-effect waves-light">KEMASKINI</button>
</div>
</form>
</div>
</div>
</div>
</div>
@endsection
@section('external_js')
<script type="text/javascript">
var SITEURL = '{{URL::to('')}}';
var tableP, tablePl;
var queryString1 = '', queryString2 = '', token = "{{ csrf_token() }}";
$('#viewParkir').hide(); $('#link').hide();
$('#viewPelbagai').hide(); $('#link1').hide();
</script>
<script type="text/javascript" src="{{ asset('js/dataParkir.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/dataPelbagai.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/function_checkbox.js') }}"></script>
<script type="text/javascript">
$('#tapis').on('click', function (e) {
e.preventDefault();
$('#link').hide(); $('#link1').hide();
var form = $("#filter_form")[0];
if(form.checkValidity() === false) {
e.stopPropagation();
var isValid = form.reportValidity();
}else {
$('#viewPelbagai').hide();
$('#viewParkir').hide();
console.log("kpd checked = " + $('#check_kpd').prop("checked"));
if($('#check_kpd').prop("checked") == false){
$('#kpd').val('');
}
if($('#check_date').prop("checked") == false){
$('#start_date').val('');
$('#end_date').val('');
}
if($('#checkPlateNo').prop("checked") == false){
$('#plate_no').val('');
}
if($('#checkCompanyNo').prop("checked") == false){
$('#company_no').val('');
}
if($('#checkNric').prop("checked") == false){
$('#nric').val('');
}
if($('#checkLicense').prop("checked") == false){
$('#license').val('');
}
if($('#checkName').prop("checked") == false){
$('#nameP').val('');
}
if($('#checkCompanyName').prop("checked") == false){
$('#company_name').val('');
}
// Sumbit Search
var form_data = $('#filter_form').serialize();
if($('#type_C').val() == 'Parkir'){
queryString1 = '?'+form_data;
$('#viewPelbagai').hide();
$('#viewParkir').show();
tableP.ajax.url(SITEURL +'/api/list/compound'+ queryString1).load();
}else if($('#type_C').val() == "Pelbagai"){
queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}
else if($('#type_C').val() == "Pelbagai_JPB"){
queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}
else if($('#type_C').val() == "Pelbagai_KT"){
queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}
else if($('#type_C').val() == "Pelbagai_PA"){
queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}
else if($('#type_C').val() == "Pelbagai_LESEN"){
queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}
console.log(SITEURL +'/api/list/compound'+ queryString1);
console.log(SITEURL +'/api/list/compound'+ queryString2);
}
return false;
});
$('#submit').on('click', function (e) {
e.preventDefault();
var form = $("#updateSt")[0];
if(form.checkValidity() === false) {
e.stopPropagation();
var isValid = form.reportValidity();
}else {
var input = prompt("Adakah anda pasti kemaskini status kompaun ini? \nTaip 'yes' untuk teruskan", "");
if (input == "yes") {
var form_data = $('#updateSt').serialize();
// alert(form_data);
$.ajax({
type: "POST",
url: "{{ url('/api/update/compound/via-dashboard') }}",
data: form_data,
success:function(data){
if(data['success'] == true){
if($('#type_C').val() == 'Parkir'){
$('#viewPelbagai').hide();
$('#viewParkir').show();
tableP.ajax.url(SITEURL +'/api/list/compound'+ queryString1).load();
$('#kemaskiniC').modal('hide');
}else if($('#type_C').val() == "Pelbagai"){
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
$('#kemaskiniC').modal('hide');
}
}else if(data['success'] == false){
alert(response.data.message);
$('#kemaskiniC').modal('hide');
}
},
error: function (xhr, ajaxOptions, thrownError) {
console.log(thrownError);
// swal("Error deleting!", "Rekod tidak berjaya di buang", "error");
}
});
}else{
alert('Kemaskini status dibatalkan');
$('#kemaskiniC').modal('hide');
}
}
});
function getDetail(id) {
$('#datePay').hide();
$('#id').val(id);
if($('#type_C').val() == 'Parkir'){
$('#datePay').hide();
$('#tarikh_bayar').prop('required', false);
}else {
$('#datePay').show();
$('#tarikh_bayar').prop('required', true);
}
$('#kemaskiniC').modal({
show: true
})
};
</script>
@endsection
@extends('layout.master', ['uid' => $user->_id, 'token' => $user->token_firebase])
@section('page_title', 'Kompaun')
@section('sub_page_title', '')
@section('name', $user->StaffDetail->full_name)
@section('img_profile', $user->StaffDetail->profile_img)

@section('content')
<style type="text/css">
select.form-control, select.form-control:focus, select.form-control:hover {
border: 1px solid #ccc !important;
height: auto !important;
}

.panel-group .panel {
margin-bottom: 0;
overflow: hidden;
border-radius: 4px;
}
.panel-default {
border-color: #ddd;
}
.panel-default>.panel-heading {
color: #333;
background-color: #f5f5f5;
border-color: #ddd;
}
.panel-title {
margin-top: 0;
margin-bottom: 0;
font-size: 16px;
color: inherit;
}

.panel-body .table>thead>tr>th, .panel-body .table>tbody>tr>th, .panel-body .table>tfoot>tr>th, .panel-body .table>thead>tr>td, .panel-body .table>tbody>tr>td, .panel-body .table>tfoot>tr>td , .panel-body div{
padding: 8px 15px;
line-height: 1.428571429;
vertical-align: top;
border-top: 1px solid #ddd;
}
.glyphicon { margin-right:10px; }
.panel-body { padding:0px; }
.panel-body table tr td { padding-left: 15px }
.panel-body table tr td a:hover , .panel-body div a:hover{ color: #fff !important; }
.panel-body .table, .panel-body div {margin-bottom: 0px; }

.r-padd { padding-right: 5%; }
.active { color: #333333; }
.active:hover { color: #333333; }

th { font-weight: 600; }
table.dataTable.nowrap th, table.dataTable.nowrap td {
white-space: pre-line !important;
}

table.nowrap th, table.nowrap td {
white-space: pre-line !important;
}
/*.dataTables_length {
float:right !important;
}*/
</style>

<div class="inner-page">
<div class="row">
@include('main-dashboard.compound._part.menu_category')
@include('main-dashboard.compound._part.filter_form')
</div>
<div class="row">
<div class="col-md-12">

<div class="card">
<div class="card-header">
<div class="row">
<div class="col-md-8">
<h5>Senarai Semua Kompaun</h5>
</div>
<div class="col-md-4">
<div id="link" style="float:right"></div>
<div id="link1" style="float:right"></div>
<div id="link2" style="float:right"></div>
</div>
</div>
</div>
<div class="card-body">
<div id="viewParkir">
@include('main-dashboard.compound._part.compound_parkir')
</div>
<div id="viewPelbagai">
@include('main-dashboard.compound._part.compound_pelbagai')
</div>
<div id="viewNotis">
<div class="col-lg-12 col-xl-12">
<!-- Nav tabs -->
<ul class="nav nav-tabs md-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#default" role="tab">Tarikh Mula</a>
<div class="slide"></div>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#hari3" role="tab">3 Hari Sebelum</a>
<div class="slide"></div>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#hari7" role="tab">7 Hari Sebelum</a>
<div class="slide"></div>
</li>
</ul>

<!-- Tab panes -->
<div class="tab-content card-block">
<div class="tab-pane active" id="default" role="tabpanel">
<div class="dt-responsive table-responsive">
<table id="reportD" class="table table-sm table-striped table-bordered nowrap" style="width:100%">
<thead>
<tr>
<th>#</th>
<th>Modul</th>
<th>No Kpn</th>
<th>Jenis</th>
<th>Tarikh Masa</th>
<th>Kesalahan</th>
<th>Nric</th>
<th>Nama</th>
<th>PenguatKuasa</th>
<th>Tindakan</th>
</tr>
</thead>
<tfoot>
<tr>
<th>#</th>
<th>Modul</th>
<th>No Kpn</th>
<th>Jenis</th>
<th>Tarikh Masa</th>
<th>Kesalahan</th>
<th>Nric</th>
<th>Nama</th>
<th>PenguatKuasa</th>
<th>Tindakan</th>
</tr>
</tfoot>
</table>
</div>
</div>
<div class="tab-pane" id="hari3" role="tabpanel">
<div class="dt-responsive table-responsive">
<table id="report3" class="table table-sm table-striped table-bordered nowrap" style="width:100%">
<thead>
<tr>
<th>#</th>
<th>Modul</th>
<th>No Kpn</th>
<th>Jenis</th>
<th>Tarikh Masa</th>
<th>Kesalahan</th>
<th>Nric</th>
<th>Nama</th>
<th>PenguatKuasa</th>
<th>Tindakan</th>
</tr>
</thead>
<tfoot>
<tr>
<th>#</th>
<th>Modul</th>
<th>No Kpn</th>
<th>Jenis</th>
<th>Tarikh Masa</th>
<th>Kesalahan</th>
<th>Nric</th>
<th>Nama</th>
<th>PenguatKuasa</th>
<th>Tindakan</th>
</tr>
</tfoot>
</table>
</div>
</div>
<div class="tab-pane" id="hari7" role="tabpanel">
<div class="dt-responsive table-responsive">
<table id="report7" class="table table-sm table-striped table-bordered nowrap" style="width:100%">
<thead>
<tr>
<th>#</th>
<th>Modul</th>
<th>No Kpn</th>
<th>Jenis</th>
<th>Tarikh Masa</th>
<th>Kesalahan</th>
<th>Nric</th>
<th>Nama</th>
<th>PenguatKuasa</th>
<th>Tindakan</th>
</tr>
</thead>
<tfoot>
<tr>
<th>#</th>
<th>Modul</th>
<th>No Kpn</th>
<th>Jenis</th>
<th>Tarikh Masa</th>
<th>Kesalahan</th>
<th>Nric</th>
<th>Nama</th>
<th>PenguatKuasa</th>
<th>Tindakan</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

</div>
</div>

<div class="modal fade" id="kemaskiniC" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form class="form-horizontal" id="updateSt">
<div class="modal-header">
<h5 class="modal-title">Kemaskini Status Kompaun</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<input type="hidden" name="id" id="id" value="" required/>
<input type="hidden" name="typeK" id="typeK" value="" required/>
<input type="hidden" name="current_id" id="current_id" value="{{ $user->_id }}" required/>
<div class="form-group">
<label class="col-sm-6 control-label"><b>Status</b></label>
<div class="col-sm-12">
<select class="form-control" name="status" required>
<option value="Belum Bayar">Belum Bayar</option>
<option value="Berbayar">Berbayar</option>
<option value="Batal">Batal</option>
<option value="Buang">Batal (Sistem)</option>
</select>
</div>
</div>

<div class="form-group">
<label class="col-sm-6 control-label"><b>Catatan <code>*</code></b></label>
<div class="col-sm-12">
<textarea class="form-control" name="remark"></textarea>
</div>
</div>

<div class="form-group">
<label class="col-sm-6 control-label"><b>Jumlah Dibayar <code>*</code></b></label>
<div class="col-sm-12">
<input type="text" class="form-control autonumber" name="amount" data-v-min="0.00" data-v-max="99999.00"placeholder="0.00" required/>
</div>
</div>

<div class="form-group">
<label class="col-sm-6 control-label"><b>Amaun Tunggakan</b> <code>*</code></label>
<div class="col-sm-12">
<input type="text" class="form-control autonumber" name="tunggakan" data-v-min="0.00" data-v-max="99999.00" placeholder="0.00" required/>
<code>Sekiranya tiada amaun tunggakan, sila letak 0. Amaun tunggakan ini akan diguna untuk laporan</code>
</div>
</div>

<div class="form-group" id="datePay">
<label class="col-sm-6 control-label"><b>Tarikh Bayar</b> <code>*</code></label>
<div class="col-sm-12">
<input type="datetime-local" class="form-control" name="tarikh_bayar" id="tarikh_bayar"/>
</div>
</div>

</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm btn-secondary mobtn" data-dismiss="modal">Close</button>
<button id="submit" class="btn btn-sm btn-primary waves-effect waves-light">KEMASKINI</button>
</div>
</form>
</div>
</div>
</div>
</div>
@endsection

@section('external_js')
<script type="text/javascript">
var SITEURL = '{{URL::to('')}}';
var tableP, tableP2, tableP1, tableP3, tableP7;
var queryString1 = '', queryString2 = '', token = "{{ csrf_token() }}";

$('#viewParkir').hide(); $('#link').hide();
$('#viewPelbagai').hide(); $('#link1').hide();
$('#viewNotis').hide(); $('#link2').hide();
</script>
<script type="text/javascript" src="{{ asset('js/dataParkir.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/dataPelbagai.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/dataNotis.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/function_checkbox.js') }}"></script>
<script type="text/javascript">

$('#tapis').on('click', function (e) {

e.preventDefault();

$('#link').hide(); $('#link1').hide();
var form = $("#filter_form")[0];

if(form.checkValidity() === false) {
e.stopPropagation();
var isValid = form.reportValidity();
}else {

$('#viewPelbagai').hide();
$('#viewParkir').hide();

console.log("kpd checked = " + $('#check_kpd').prop("checked"));

if($('#check_kpd').prop("checked") == false){
$('#kpd').val('');
}

if($('#check_date').prop("checked") == false){
$('#start_date').val('');
$('#end_date').val('');
}

if($('#checkPlateNo').prop("checked") == false){
$('#plate_no').val('');
}

if($('#checkCompanyNo').prop("checked") == false){
$('#company_no').val('');
}

if($('#checkNric').prop("checked") == false){
$('#nric').val('');
}

if($('#checkLicense').prop("checked") == false){
$('#license').val('');
}

if($('#checkName').prop("checked") == false){
$('#nameP').val('');
}

if($('#checkCompanyName').prop("checked") == false){
$('#company_name').val('');
}

// Sumbit Search
var form_data = $('#filter_form').serialize();
if($('#type_C').val() == 'Parkir'){

queryString1 = '?'+form_data;
$('#viewPelbagai').hide();
$('#viewParkir').show();
$('#viewNotis').hide();
tableP.ajax.url(SITEURL +'/api/list/compound'+ queryString1).load();

}
else if($('#type_C').val() == "Pelbagai_JPB"){

queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
$('#viewNotis').hide();
tableP2.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}
else if($('#type_C').val() == "Pelbagai_KT"){

queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
$('#viewNotis').hide();
tableP2.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}
else if($('#type_C').val() == 'Notis_NPPM'){

queryString2 = '?'+form_data;
$('#viewPelbagai').hide();
$('#viewParkir').hide();
$('#viewNotis').show();
tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();

}else if($('#type_C').val() == "Notis_NMH"){

queryString2 = '?'+form_data;
$('#viewPelbagai').hide();
$('#viewParkir').hide();
$('#viewNotis').show();
tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();

}else if($('#type_C').val() == "Notis_NHN"){

queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
$('#viewNotis').show();
tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();

}else if($('#type_C').val() == "Notis_NKG"){

queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
$('#viewNotis').show();
tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();

}else if($('#type_C').val() == "Notis_PA"){

queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
$('#viewNotis').show();
tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}

console.log(SITEURL +'/api/list/compound'+ queryString1);
console.log(SITEURL +'/api/list/compound'+ queryString2);
}

return false;
});

$('#submit').on('click', function (e) {
e.preventDefault();
var form = $("#updateSt")[0];
if(form.checkValidity() === false) {
e.stopPropagation();
var isValid = form.reportValidity();
}else {
var input = prompt("Adakah anda pasti kemaskini status kompaun ini? \nTaip 'yes' untuk teruskan", "");
if (input == "yes") {
var form_data = $('#updateSt').serialize();
// alert(form_data);

$.ajax({
type: "POST",
url: "{{ url('/api/update/compound/via-dashboard') }}",
data: form_data,
success:function(data){

if(data['success'] == true){

if($('#type_C').val() == 'Parkir'){
$('#viewPelbagai').hide();
$('#viewParkir').show();
tableP.ajax.url(SITEURL +'/api/list/compound'+ queryString1).load();
$('#kemaskiniC').modal('hide');
}else if($('#type_C').val() == "Pelbagai"){
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
$('#kemaskiniC').modal('hide');
}

}else if(data['success'] == false){
alert(response.data.message);
$('#kemaskiniC').modal('hide');
}
},
error: function (xhr, ajaxOptions, thrownError) {
console.log(thrownError);
// swal("Error deleting!", "Rekod tidak berjaya di buang", "error");
}
});
}else{
alert('Kemaskini status dibatalkan');
$('#kemaskiniC').modal('hide');
}
}
});

function getDetail(id) {
$('#datePay').hide();
$('#id').val(id);
if($('#type_C').val() == 'Parkir'){
$('#datePay').hide();
$('#tarikh_bayar').prop('required', false);
}else {
$('#datePay').show();
$('#tarikh_bayar').prop('required', true);
}

$('#kemaskiniC').modal({
show: true
})
};
</script>
@endsection

+ 194
- 194
resources/views/main-dashboard/compound/notice_index.blade.php Ver fichero

@@ -1,194 +1,194 @@
@extends('layout.master', ['uid' => $user->_id, 'token' => $user->token_firebase])
@section('page_title', 'Kompaun')
@section('sub_page_title', '')
@section('name', $user->StaffDetail->full_name)
@section('img_profile', $user->StaffDetail->profile_img)
@section('content')
<style type="text/css">
select.form-control, select.form-control:focus, select.form-control:hover {
border: 1px solid #ccc !important;
height: auto !important;
}
.panel-group .panel {
margin-bottom: 0;
overflow: hidden;
border-radius: 4px;
}
.panel-default {
border-color: #ddd;
}
.panel-default>.panel-heading {
color: #333;
background-color: #f5f5f5;
border-color: #ddd;
}
.panel-title {
margin-top: 0;
margin-bottom: 0;
font-size: 16px;
color: inherit;
}
.panel-body .table>thead>tr>th, .panel-body .table>tbody>tr>th, .panel-body .table>tfoot>tr>th, .panel-body .table>thead>tr>td, .panel-body .table>tbody>tr>td, .panel-body .table>tfoot>tr>td , .panel-body div{
padding: 8px 15px;
line-height: 1.428571429;
vertical-align: top;
border-top: 1px solid #ddd;
}
.glyphicon { margin-right:10px; }
.panel-body { padding:0px; }
.panel-body table tr td { padding-left: 15px }
.panel-body table tr td a:hover , .panel-body div a:hover{ color: #d84315 !important; }
.panel-body .table, .panel-body div {margin-bottom: 0px; }
.r-padd { padding-right: 5%; }
.active { color: #d84315; }
.active:hover { color: #d84315; }
th { font-weight: 600; }
table.dataTable.nowrap th, table.dataTable.nowrap td {
white-space: pre-line !important;
}
table.nowrap th, table.nowrap td {
white-space: pre-line !important;
}
</style>
<div class="inner-page">
<div class="row">
@include('main-dashboard.compound._part.menu_category')
@include('main-dashboard.compound._part.filter_form')
</div>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h5>Senarai Kompaun Yang Ada Notis Amaran</h5>
<!-- { this.state.dataCompound.length > 0 ?
<ExportCSV csvData={this.state.dataCompound} fileName="Report_saman_1" type={this.state.form.type} />
: ''
} -->
</div>
<div class="card-body">
<div id="viewParkir">
@include('main-dashboard.compound._part.compound_parkir')
</div>
<div id="viewPelbagai">
@include('main-dashboard.compound._part.compound_pelbagai')
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('external_js')
<script type="text/javascript">
var SITEURL = '{{URL::to('')}}';
var tableP, tablePl;
var queryString1 = '', queryString2 = '';
$('#viewParkir').hide();
$('#viewPelbagai').hide();
</script>
<script type="text/javascript" src="{{ asset('js/dataCompleteParkir.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/dataCompletePelbagai.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/function_checkbox.js') }}"></script>
<script type="text/javascript">
$('#tapis').on('click', function (e) {
e.preventDefault();
var form = $("#filter_form")[0];
if(form.checkValidity() === false) {
e.stopPropagation();
var isValid = form.reportValidity();
}else {
$('#viewPelbagai').hide();
$('#viewParkir').hide();
if($('#check_kpd').prop("checked") == false){
$('#kpd').val('');
}
if($('#check_date').prop("checked") == false){
$('#start_date').val('');
$('#end_date').val('');
}
if($('#checkPlateNo').prop("checked") == false){
$('#plate_no').val('');
}
if($('#checkCompanyNo').prop("checked") == false){
$('#company_no').val('');
}
if($('#checkNric').prop("checked") == false){
$('#nric').val('');
}
if($('#checkLicense').prop("checked") == false){
$('#license').val('');
}
if($('#checkName').prop("checked") == false){
$('#nameP').val('');
}
if($('#checkCompanyName').prop("checked") == false){
$('#company_name').val('');
}
// Sumbit Search
var form_data = $('#filter_form').serialize();
if($('#type_C').val() == 'Parkir'){
queryString1 = '?'+form_data;
$('#viewPelbagai').hide();
$('#viewParkir').show();
tableP.ajax.url(SITEURL +'/api/list/compound'+ queryString1).load();
}else if($('#type_C').val() == "Pelbagai"){
queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}else if($('#type_C').val() == "Pelbagai_JPB"){
queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}else if($('#type_C').val() == "Pelbagai_KT"){
queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}else if($('#type_C').val() == "Pelbagai_PA"){
queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}else if($('#type_C').val() == "Pelbagai_LESEN"){
queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}
console.log(SITEURL +'/api/list/compound'+ queryString1);
console.log(SITEURL +'/api/list/compound'+ queryString2);
}
return false;
});
</script>
@endsection
@extends('layout.master', ['uid' => $user->_id, 'token' => $user->token_firebase])
@section('page_title', 'Kompaun')
@section('sub_page_title', '')
@section('name', $user->StaffDetail->full_name)
@section('img_profile', $user->StaffDetail->profile_img)
@section('content')
<style type="text/css">
select.form-control, select.form-control:focus, select.form-control:hover {
border: 1px solid #ccc !important;
height: auto !important;
}
.panel-group .panel {
margin-bottom: 0;
overflow: hidden;
border-radius: 4px;
}
.panel-default {
border-color: #ddd;
}
.panel-default>.panel-heading {
color: #333;
background-color: #f5f5f5;
border-color: #ddd;
}
.panel-title {
margin-top: 0;
margin-bottom: 0;
font-size: 16px;
color: inherit;
}
.panel-body .table>thead>tr>th, .panel-body .table>tbody>tr>th, .panel-body .table>tfoot>tr>th, .panel-body .table>thead>tr>td, .panel-body .table>tbody>tr>td, .panel-body .table>tfoot>tr>td , .panel-body div{
padding: 8px 15px;
line-height: 1.428571429;
vertical-align: top;
border-top: 1px solid #ddd;
}
.glyphicon { margin-right:10px; }
.panel-body { padding:0px; }
.panel-body table tr td { padding-left: 15px }
.panel-body table tr td a:hover , .panel-body div a:hover{ color: #d84315 !important; }
.panel-body .table, .panel-body div {margin-bottom: 0px; }
.r-padd { padding-right: 5%; }
.active { color: #d84315; }
.active:hover { color: #d84315; }
th { font-weight: 600; }
table.dataTable.nowrap th, table.dataTable.nowrap td {
white-space: pre-line !important;
}
table.nowrap th, table.nowrap td {
white-space: pre-line !important;
}
</style>
<div class="inner-page">
<div class="row">
@include('main-dashboard.compound._part.menu_category')
@include('main-dashboard.compound._part.filter_form')
</div>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h5>Senarai Kompaun Yang Ada Notis Amaran</h5>
<!-- { this.state.dataCompound.length > 0 ?
<ExportCSV csvData={this.state.dataCompound} fileName="Report_saman_1" type={this.state.form.type} />
: ''
} -->
</div>
<div class="card-body">
<div id="viewParkir">
@include('main-dashboard.compound._part.compound_parkir')
</div>
<div id="viewPelbagai">
@include('main-dashboard.compound._part.compound_pelbagai')
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('external_js')
<script type="text/javascript">
var SITEURL = '{{URL::to('')}}';
var tableP, tablePl;
var queryString1 = '', queryString2 = '';
$('#viewParkir').hide();
$('#viewPelbagai').hide();
</script>
<script type="text/javascript" src="{{ asset('js/dataCompleteParkir.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/dataCompletePelbagai.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/function_checkbox.js') }}"></script>
<script type="text/javascript">
$('#tapis').on('click', function (e) {
e.preventDefault();
var form = $("#filter_form")[0];
if(form.checkValidity() === false) {
e.stopPropagation();
var isValid = form.reportValidity();
}else {
$('#viewPelbagai').hide();
$('#viewParkir').hide();
if($('#check_kpd').prop("checked") == false){
$('#kpd').val('');
}
if($('#check_date').prop("checked") == false){
$('#start_date').val('');
$('#end_date').val('');
}
if($('#checkPlateNo').prop("checked") == false){
$('#plate_no').val('');
}
if($('#checkCompanyNo').prop("checked") == false){
$('#company_no').val('');
}
if($('#checkNric').prop("checked") == false){
$('#nric').val('');
}
if($('#checkLicense').prop("checked") == false){
$('#license').val('');
}
if($('#checkName').prop("checked") == false){
$('#nameP').val('');
}
if($('#checkCompanyName').prop("checked") == false){
$('#company_name').val('');
}
// Sumbit Search
var form_data = $('#filter_form').serialize();
if($('#type_C').val() == 'Parkir'){
queryString1 = '?'+form_data;
$('#viewPelbagai').hide();
$('#viewParkir').show();
tableP.ajax.url(SITEURL +'/api/list/compound'+ queryString1).load();
}else if($('#type_C').val() == "Pelbagai"){
queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}else if($('#type_C').val() == "Pelbagai_JPB"){
queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}else if($('#type_C').val() == "Pelbagai_KT"){
queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}else if($('#type_C').val() == "Pelbagai_PA"){
queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}else if($('#type_C').val() == "Pelbagai_LESEN"){
queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}
console.log(SITEURL +'/api/list/compound'+ queryString1);
console.log(SITEURL +'/api/list/compound'+ queryString2);
}
return false;
});
</script>
@endsection

+ 46
- 34
resources/views/main-dashboard/compound/prenotice_index.blade.php Ver fichero

@@ -6,7 +6,7 @@

@section('content')
<style type="text/css">
select.form-control, select.form-control:focus, select.form-control:hover {
select.form-control, select.form-control:focus, select.form-control:hover {
border: 1px solid #ccc !important;
height: auto !important;
}
@@ -60,7 +60,7 @@
<div class="inner-page">
<div class="row">
@include('main-dashboard.compound._part.menu_category')
@include('main-dashboard.compound._part.filter_form')
@include('main-dashboard.compound._part.filter_form_notice')
</div>
<div class="row">
<div class="col-md-12">
@@ -98,7 +98,7 @@
<div class="slide"></div>
</li>
</ul>
<!-- Tab panes -->
<div class="tab-content card-block">
<div class="tab-pane active" id="default" role="tabpanel">
@@ -207,7 +207,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>

@@ -272,7 +272,7 @@
var SITEURL = '{{URL::to('')}}';
var tableP1, tableP3, tableP7;
var queryString1 = '', queryString2 = '', token = "{{ csrf_token() }}";
$('#viewParkir').hide(); $('#link').hide();
$('#viewPelbagai').hide(); $('#link1').hide();
</script>
@@ -280,13 +280,13 @@
<script type="text/javascript" src="{{ asset('js/dataNotis.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/function_checkbox.js') }}"></script>
<script type="text/javascript">
$('#tapis').on('click', function (e) {

e.preventDefault();

$('#link').hide(); $('#link1').hide();
var form = $("#filter_form")[0];
var form = $("#filter_form")[0];

if(form.checkValidity() === false) {
e.stopPropagation();
@@ -334,14 +334,17 @@
// Sumbit Search
var form_data = $('#filter_form').serialize();

if($('#type_C').val() == 'Parkir'){
if($('#type_C').val() == 'Notis_NPPM'){

queryString1 = '?'+form_data;
$('#viewPelbagai').hide();
$('#viewParkir').show();
tableP.ajax.url(SITEURL +'/api/list/compound'+ queryString1).load();
queryString2 = '?'+form_data;
$('#viewPelbagai').show();
$('#viewParkir').hide();

}else if($('#type_C').val() == "Pelbagai_JPB"){
tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();

}else if($('#type_C').val() == "Notis_NMH"){

queryString2 = '?'+form_data;
$('#viewPelbagai').show();
@@ -351,7 +354,7 @@
tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}
else if($('#type_C').val() == "Pelbagai_KT"){
else if($('#type_C').val() == "Notis_NHN"){

queryString2 = '?'+form_data;
$('#viewPelbagai').show();
@@ -361,7 +364,7 @@
tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}
else if($('#type_C').val() == "Pelbagai_PA"){
else if($('#type_C').val() == "Notis_NKG"){

queryString2 = '?'+form_data;
$('#viewPelbagai').show();
@@ -371,7 +374,7 @@
tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
}
else if($('#type_C').val() == "Pelbagai_LESEN"){
else if($('#type_C').val() == "Notis_PA"){

queryString2 = '?'+form_data;
$('#viewPelbagai').show();
@@ -389,14 +392,14 @@

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];
var form = $("#updateSt")[0];
if(form.checkValidity() === false) {
e.stopPropagation();
var isValid = form.reportValidity();
@@ -414,31 +417,40 @@

if(data['success'] == true){

if($('#type_C').val() == 'Parkir'){
$('#viewPelbagai').hide();
$('#viewParkir').show();
tableP.ajax.url(SITEURL +'/api/list/compound'+ queryString1).load();
if($('#type_C').val() == 'Notis_NPPM'){
$('#viewPelbagai').show();
$('#viewParkir').hide();
tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
$('#kemaskiniC').modal('hide');
}else if($('#type_C').val() == "Pelbagai_KT"){
}else if($('#type_C').val() == "Notis_NMH"){
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
$('#kemaskiniC').modal('hide');
}else if($('#type_C').val() == "Pelbagai_PA"){
}else if($('#type_C').val() == "Notis_NHN"){
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
$('#kemaskiniC').modal('hide');
}
else if($('#type_C').val() == "Pelbagai_JPB"){
}else if($('#type_C').val() == "Notis_NKG"){
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
$('#kemaskiniC').modal('hide');
}else if($('#type_C').val() == "Pelbagai_LESEN"){
}else if($('#type_C').val() == "Notis_PA"){
$('#viewPelbagai').show();
$('#viewParkir').hide();
tablePl.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP1.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP3.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
tableP7.ajax.url(SITEURL +'/api/list/compound'+ queryString2).load();
$('#kemaskiniC').modal('hide');
}

@@ -456,7 +468,7 @@
alert('Kemaskini status dibatalkan');
$('#kemaskiniC').modal('hide');
}
}
}
});

function getDetail(id) {
@@ -465,7 +477,7 @@
if($('#type_C').val() == 'Parkir'){
$('#datePay').hide();
$('#tarikh_bayar').prop('required', false);
}else {
}else {
$('#datePay').show();
$('#tarikh_bayar').prop('required', true);
}
@@ -475,4 +487,4 @@
})
};
</script>
@endsection
@endsection

+ 6
- 5
resources/views/main-dashboard/compound_detail/compound_job.blade.php Ver fichero

@@ -100,7 +100,6 @@
@if($compound->status == 'Belum Bayar')
@if($compound->modul == '02')
<div><a href="{{ url('main/compound') }}/{{ $compound->non }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div>
<div><a href="{{ url('/main/compound') }}/{{$compound->non}}">Kompaun</a></div>
@else
<div><a href="{{ url('main/compound') }}/{{ $compound->kpd }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div>
<div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}">Kompaun</a></div>
@@ -194,11 +193,13 @@
<div class="col-lg-12 col-md-12">
<div class="card">
<div class="card-header">
<h5>Serahan Kompaun Kepada Pegawai</h5>
<h5>Serahan Notis/Kompaun Kepada Pegawai</h5>
</div>
<div class="card-block">
<input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
<input type="hidden" name="kpd" value="{{ $compound->kpd }}">
<input type="hidden" name="kpd" value="{{ $compound->kpd }}">
<input type="hidden" name="non" value="{{ $compound->non }}">
<input type="hidden" name="modul" value="{{ $compound->modul }}">
<input type="hidden" name="dashboard" value="true">
<div class="row">
<div class="col-lg-12 col-md-12">
@@ -233,7 +234,7 @@
<div class="col-lg-12 col-md-12">
<div class="card">
<div class="card-header">
<h5>Serahan Kompaun kepada Penguatkuasa</h5>
<h5>Serahan Notis/Kompaun kepada Penguatkuasa</h5>
@if($currentS == '')
<span>Kompaun ini <code>belum ditugasan</code> kepada penguatkuasa</span>
@else
@@ -283,7 +284,7 @@
</div>
</form>
@endif
@if(!isset($compound->tarikh_mahkamah)){
@if(($compound->modul != '02') && (!isset($compound->tarikh_mahkamah))){
<form method="POST" action="{{ url('/main/compound/update/court') }}" enctype="multipart/form-data">
<div class="row">
<div class="col-lg-12 col-md-12">

+ 0
- 1
resources/views/main-dashboard/compound_detail/history_detail.blade.php Ver fichero

@@ -100,7 +100,6 @@
@if($compound->status == 'Belum Bayar')
@if($compound->modul == '02')
<div><a href="{{ url('main/compound') }}/{{ $compound->non }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div>
<div><a href="{{ url('/main/compound') }}/{{$compound->non}}">Kompaun</a></div>
@else
<div><a href="{{ url('main/compound') }}/{{ $compound->kpd }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div>
<div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}">Kompaun</a></div>

+ 1
- 1
resources/views/main-dashboard/compound_detail/notice_detail.blade.php Ver fichero

@@ -104,7 +104,7 @@
@if($compound->status == 'Belum Bayar')
@if($compound->modul == '02')
<div><a href="{{ url('main/compound') }}/{{ $compound->non }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div>
<div><a href="{{ url('/main/compound') }}/{{$compound->non}}">Kompaun</a></div>
{{-- <div><a href="{{ url('/main/compound') }}/{{$compound->non}}">Kompaun</a></div> --}}
@else
<div><a href="{{ url('main/compound') }}/{{ $compound->kpd }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div>
<div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}">Kompaun</a></div>

Cargando…
Cancelar
Guardar