Merge branch 'pipi' into 'master'
fix kelulusan See merge request online-sistem1/kaunter!38
This commit is contained in:
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Events;
|
||||||
|
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Foundation\Events\Dispatchable;
|
||||||
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||||
|
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
||||||
|
|
||||||
|
class OperasiNotice implements ShouldBroadcast
|
||||||
|
{
|
||||||
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||||
|
|
||||||
|
public $cawangan,$namateller;
|
||||||
|
|
||||||
|
public function __construct($cawangan,$namakhazanah)
|
||||||
|
{
|
||||||
|
$this->cawangan = $cawangan;
|
||||||
|
$this->namakhazanah = $namakhazanah;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function broadcastOn()
|
||||||
|
{
|
||||||
|
return ['operasi-notify'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function broadcastAs()
|
||||||
|
{
|
||||||
|
return 'operasi-event';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,11 +11,12 @@ class StatusLiked implements ShouldBroadcast
|
|||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||||
|
|
||||||
public $message;
|
public $cawangan,$namateller;
|
||||||
|
|
||||||
public function __construct($message)
|
public function __construct($cawangan,$namateller)
|
||||||
{
|
{
|
||||||
$this->message = $message;
|
$this->cawangan = $cawangan;
|
||||||
|
$this->namateller = $namateller;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function broadcastOn()
|
public function broadcastOn()
|
||||||
|
|||||||
@@ -413,7 +413,7 @@ class GadaianController extends Controller
|
|||||||
$wakil = [];
|
$wakil = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('print.resittebussebelum',compact('gadai','customers_info','penebusan','wakil','totaltransaction'));
|
return view('print.resittebussebelum',compact('gadai','customers_info','penebusan','wakil'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function history(Request $request)
|
public function history(Request $request)
|
||||||
@@ -425,6 +425,7 @@ class GadaianController extends Controller
|
|||||||
if(sizeof($gadai) > 0)
|
if(sizeof($gadai) > 0)
|
||||||
$history = $gadai[0][0]['historygadaian'];
|
$history = $gadai[0][0]['historygadaian'];
|
||||||
|
|
||||||
|
|
||||||
$count = 0;
|
$count = 0;
|
||||||
$arrayhist = [];
|
$arrayhist = [];
|
||||||
|
|
||||||
@@ -436,7 +437,7 @@ class GadaianController extends Controller
|
|||||||
"norujukan" => $history
|
"norujukan" => $history
|
||||||
])->json();
|
])->json();
|
||||||
|
|
||||||
array_push($arrayhist,["norujukan" => $history,"jenistebus" => $tebus[0]['jenistebus'],"jbg" => $tebus[0]['jbg'],"t_tebus" => $tebus[0]['t_tebus']]);
|
array_push($arrayhist,["norujukan" => $history,"jenistebus" => ((isset($tebus[0])) ? $tebus[0]['jenistebus'] : 0),"jbg" => ((isset($tebus[0])) ? $tebus[0]['jbg'] : 0),"t_tebus" => ((isset($tebus[0])) ? $tebus[0]['t_tebus'] : 0)]);
|
||||||
|
|
||||||
if(sizeof($gadai) > 0)
|
if(sizeof($gadai) > 0)
|
||||||
$history = $gadai[0][0]['historygadaian'];
|
$history = $gadai[0][0]['historygadaian'];
|
||||||
@@ -504,7 +505,7 @@ class GadaianController extends Controller
|
|||||||
'teller' => $auth_user['name']
|
'teller' => $auth_user['name']
|
||||||
])->json();
|
])->json();
|
||||||
|
|
||||||
event(new StatusLiked('Penghantaran kepada Khazanah!'));
|
event(new StatusLiked($auth_user['cawangan'],$auth_user['name']));
|
||||||
|
|
||||||
return response()->json($createlulus,201);
|
return response()->json($createlulus,201);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ namespace App\Http\Controllers;
|
|||||||
//Events
|
//Events
|
||||||
use App\Events\StatusLiked;
|
use App\Events\StatusLiked;
|
||||||
use App\Events\NotifikasiPembayaran;
|
use App\Events\NotifikasiPembayaran;
|
||||||
|
use App\Events\OperasiNotice;
|
||||||
|
|
||||||
|
|
||||||
use App\User;
|
use App\User;
|
||||||
@@ -80,7 +81,7 @@ class KhazanahController extends Controller
|
|||||||
//Peti Besi Cawangan
|
//Peti Besi Cawangan
|
||||||
$getVault=Http::get( config('api.url').'/api/VaultController/'.$auth_user['cawangan'])->json();
|
$getVault=Http::get( config('api.url').'/api/VaultController/'.$auth_user['cawangan'])->json();
|
||||||
|
|
||||||
$getVault = $getVault[0]['BakiAwal'];
|
$getVault = $getVault[0]['bakiawal'];
|
||||||
|
|
||||||
//Marhun Terkumpul
|
//Marhun Terkumpul
|
||||||
$marhun = Http::get(config('api.url'). '/api/marhunterkumpul/laporan/'. $auth_user['cawangan'] .'/'. $harini->toDateString())->json();
|
$marhun = Http::get(config('api.url'). '/api/marhunterkumpul/laporan/'. $auth_user['cawangan'] .'/'. $harini->toDateString())->json();
|
||||||
@@ -274,6 +275,7 @@ class KhazanahController extends Controller
|
|||||||
$api_url = config('api.url');
|
$api_url = config('api.url');
|
||||||
|
|
||||||
$norujukan = $request->norujukan;
|
$norujukan = $request->norujukan;
|
||||||
|
$pelulus = $request->pelulus;
|
||||||
|
|
||||||
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||||
|
|
||||||
@@ -286,7 +288,20 @@ class KhazanahController extends Controller
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$updatelulus = Http::put(config('api.url') . '/api/UpdateKelulusan/' . $auth_user['cawangan'] . '/' . $norujukan)->json();
|
if($pelulus == 'khazanah')
|
||||||
|
{
|
||||||
|
$updatelulus = Http::put(config('api.url') . '/api/UpdateKelulusan/' . $auth_user['cawangan'] . '/' . $norujukan,[
|
||||||
|
"pengesahan" => "khazanah"
|
||||||
|
])->json();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$updatelulus = Http::put(config('api.url') . '/api/UpdateKelulusan/' . $auth_user['cawangan'] . '/' . $norujukan,[
|
||||||
|
"pengesahan" => "operasi"
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
event(new OperasiNotice($auth_user['cawangan'],$auth_user['name']));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -318,7 +333,7 @@ class KhazanahController extends Controller
|
|||||||
// 'teller' => $request->teller
|
// 'teller' => $request->teller
|
||||||
])->json();
|
])->json();
|
||||||
|
|
||||||
event(new StatusLiked('Penghantaran kepada Khazanah!'));
|
event(new StatusLiked($auth_user['cawangan'],$auth_user['name']));
|
||||||
|
|
||||||
return response()->json($createlulus,201);
|
return response()->json($createlulus,201);
|
||||||
}
|
}
|
||||||
@@ -466,12 +481,12 @@ class KhazanahController extends Controller
|
|||||||
$rekodb50 = $denominasilist[0]['bd50']; $rekodb100 = $denominasilist[0]['bd100'];
|
$rekodb50 = $denominasilist[0]['bd50']; $rekodb100 = $denominasilist[0]['bd100'];
|
||||||
|
|
||||||
//wang Syilling Initialize
|
//wang Syilling Initialize
|
||||||
$rekodsen1 = $denominasilist[0]['txtSen1']; $rekodsen5 = $denominasilist[0]['txtSen5']; $rekodsen10 = $denominasilist[0]['txtSen10'];
|
$rekodsen1 = $denominasilist[0]['txtsen1']; $rekodsen5 = $denominasilist[0]['txtsen5']; $rekodsen10 = $denominasilist[0]['txtsen10'];
|
||||||
$rekodsen20 = $denominasilist[0]['txtSen20']; $rekodsen50 = $denominasilist[0]['txtSen50'];
|
$rekodsen20 = $denominasilist[0]['txtsen20']; $rekodsen50 = $denominasilist[0]['txtsen50'];
|
||||||
|
|
||||||
//Wang Ringgit Initialize
|
//Wang Ringgit Initialize
|
||||||
$rekodring1 = $denominasilist[0]['txtRing1']; $rekodring5 = $denominasilist[0]['txtRing5']; $rekodring10 = $denominasilist[0]['txtRing10'];
|
$rekodring1 = $denominasilist[0]['txtring1']; $rekodring5 = $denominasilist[0]['txtring5']; $rekodring10 = $denominasilist[0]['txtring10'];
|
||||||
$rekodring20 = $denominasilist[0]['txtRing20']; $rekodring50 = $denominasilist[0]['txtRing50']; $rekodring100 = $denominasilist[0]['txtRing100'];
|
$rekodring20 = $denominasilist[0]['txtring20']; $rekodring50 = $denominasilist[0]['txtring50']; $rekodring100 = $denominasilist[0]['txtring100'];
|
||||||
|
|
||||||
//Tolok Rekod
|
//Tolok Rekod
|
||||||
$rekodb1 -= intval($request->ambilanb1);
|
$rekodb1 -= intval($request->ambilanb1);
|
||||||
@@ -503,20 +518,20 @@ class KhazanahController extends Controller
|
|||||||
'bd20'=> $rekodb20,
|
'bd20'=> $rekodb20,
|
||||||
'bd50'=> $rekodb50,
|
'bd50'=> $rekodb50,
|
||||||
'bd100'=> $rekodb100,
|
'bd100'=> $rekodb100,
|
||||||
'txtRing1'=> $rekodring1,
|
'txtring1'=> $rekodring1,
|
||||||
'txtRing5'=> $rekodring5,
|
'txtring5'=> $rekodring5,
|
||||||
'txtSen1'=> $rekodsen1,
|
'txtsen1'=> $rekodsen1,
|
||||||
'txtSen5'=> $rekodsen5,
|
'txtsen5'=> $rekodsen5,
|
||||||
'txtSen10'=> $rekodsen10,
|
'txtsen10'=> $rekodsen10,
|
||||||
'txtSen20'=> $rekodsen20,
|
'txtsen20'=> $rekodsen20,
|
||||||
'txtSen50'=> $rekodsen50,
|
'txtsen50'=> $rekodsen50,
|
||||||
'txtRing10'=> $rekodring10,
|
'txtring10'=> $rekodring10,
|
||||||
'txtRing20'=> $rekodring20,
|
'txtring20'=> $rekodring20,
|
||||||
'txtRing50'=> $rekodring50,
|
'txtring50'=> $rekodring50,
|
||||||
'txtRing100'=> $rekodring100,
|
'txtring100'=> $rekodring100,
|
||||||
'txtRing1000'=> "0",
|
'txtring1000'=> "0",
|
||||||
'jumlahbundle'=> "0",
|
'jumlahbundle'=> "0",
|
||||||
'txtJumlah'=> "0",
|
'txtjumlah'=> "0",
|
||||||
'jumlahkeping' => "0"
|
'jumlahkeping' => "0"
|
||||||
|
|
||||||
]);
|
]);
|
||||||
@@ -579,20 +594,20 @@ class KhazanahController extends Controller
|
|||||||
'bd20'=> $rekodb20,
|
'bd20'=> $rekodb20,
|
||||||
'bd50'=> $rekodb50,
|
'bd50'=> $rekodb50,
|
||||||
'bd100'=> $rekodb100,
|
'bd100'=> $rekodb100,
|
||||||
'txtRing1'=> $rekodring1,
|
'txtring1'=> $rekodring1,
|
||||||
'txtRing5'=> $rekodring5,
|
'txtring5'=> $rekodring5,
|
||||||
'txtSen1'=> $rekodsen1,
|
'txtsen1'=> $rekodsen1,
|
||||||
'txtSen5'=> $rekodsen5,
|
'txtsen5'=> $rekodsen5,
|
||||||
'txtSen10'=> $rekodsen10,
|
'txtsen10'=> $rekodsen10,
|
||||||
'txtSen20'=> $rekodsen20,
|
'txtsen20'=> $rekodsen20,
|
||||||
'txtSen50'=> $rekodsen50,
|
'txtsen50'=> $rekodsen50,
|
||||||
'txtRing10'=> $rekodring10,
|
'txtring10'=> $rekodring10,
|
||||||
'txtRing20'=> $rekodring20,
|
'txtring20'=> $rekodring20,
|
||||||
'txtRing50'=> $rekodring50,
|
'txtring50'=> $rekodring50,
|
||||||
'txtRing100'=> $rekodring100,
|
'txtring100'=> $rekodring100,
|
||||||
'txtRing1000'=> "0",
|
'txtring1000'=> "0",
|
||||||
'jumlahbundle'=> "0",
|
'jumlahbundle'=> "0",
|
||||||
'txtJumlah'=> "0",
|
'txtjumlah'=> "0",
|
||||||
'jumlahkeping' => "0"
|
'jumlahkeping' => "0"
|
||||||
|
|
||||||
]);
|
]);
|
||||||
@@ -703,11 +718,11 @@ class KhazanahController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
$latestVault=Http::get(config('api.url').'/api/VaultController/'.$auth_user['cawangan'])->json();
|
$latestVault=Http::get(config('api.url').'/api/VaultController/'.$auth_user['cawangan'])->json();
|
||||||
$masukV=$latestVault[0]['Masuk'];
|
$masukV=$latestVault[0]['masuk'];
|
||||||
$keluarV=$latestVault[0]['Keluar'];
|
$keluarV=$latestVault[0]['keluar'];
|
||||||
$pendahuluanV=$latestVault[0]['pendahuluan'];
|
$pendahuluanV=$latestVault[0]['pendahuluan'];
|
||||||
$serahanV=$latestVault[0]['serahan'];
|
$serahanV=$latestVault[0]['serahan'];
|
||||||
$BakiAwalV=$latestVault[0]['BakiAwal'];
|
$BakiAwalV=$latestVault[0]['bakiawal'];
|
||||||
|
|
||||||
// dd($latestVault);
|
// dd($latestVault);
|
||||||
// return;
|
// return;
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ namespace App\Http\Controllers;
|
|||||||
|
|
||||||
|
|
||||||
//Events
|
//Events
|
||||||
|
use App\Events\OperasiNotice;
|
||||||
use App\Events\StatusLiked;
|
use App\Events\StatusLiked;
|
||||||
use App\Events\NotifikasiPembayaran;
|
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
@@ -30,12 +30,6 @@ class OperasiController extends Controller
|
|||||||
{
|
{
|
||||||
$kelulusan = $kelulusan[0];
|
$kelulusan = $kelulusan[0];
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return view('operasi.kelulusan',compact('cawangan_info','api_url','kelulusan'));
|
return view('operasi.kelulusan',compact('cawangan_info','api_url','kelulusan'));
|
||||||
}
|
}
|
||||||
@@ -74,7 +68,9 @@ class OperasiController extends Controller
|
|||||||
|
|
||||||
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||||
|
|
||||||
$updatelulus = Http::put(config('api.url') . '/api/UpdateKelulusan/' . $request->kodcaw . '/' . $norujukan)->json();
|
$updatelulus = Http::put(config('api.url') . '/api/UpdateKelulusan/' . $request->kodcaw . '/' . $norujukan,[
|
||||||
|
'sahkan' => 1
|
||||||
|
])->json();
|
||||||
|
|
||||||
return response()->json($updatelulus,200);
|
return response()->json($updatelulus,200);
|
||||||
}
|
}
|
||||||
@@ -104,7 +100,7 @@ class OperasiController extends Controller
|
|||||||
// 'teller' => $request->teller
|
// 'teller' => $request->teller
|
||||||
])->json();
|
])->json();
|
||||||
|
|
||||||
event(new StatusLiked('Penghantaran kepada Operasi!'));
|
event(new StatusLiked($auth_user['cawangan'],$auth_user['name']));
|
||||||
|
|
||||||
return response()->json($createlulus,201);
|
return response()->json($createlulus,201);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -313,12 +313,12 @@
|
|||||||
<th>Bil</th>
|
<th>Bil</th>
|
||||||
<th>No Rujukan</th>
|
<th>No Rujukan</th>
|
||||||
<th>Tarikh Gadai</th>
|
<th>Tarikh Gadai</th>
|
||||||
<th>Pembiayaan</th>
|
<th>Tarikh Matang</th>
|
||||||
<th>Nilai Marhun</th>
|
<th>Nilai Marhun</th>
|
||||||
|
<th>Pembiayaan</th>
|
||||||
|
<th>Margin</th>
|
||||||
<th>Tempoh</th>
|
<th>Tempoh</th>
|
||||||
<th>Keuntungan</th>
|
<th>Keuntungan</th>
|
||||||
<th>Tarikh Matang</th>
|
|
||||||
<th>Margin</th>
|
|
||||||
<th>Kos Keuntungan</th>
|
<th>Kos Keuntungan</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -330,12 +330,12 @@
|
|||||||
<th>Bil</th>
|
<th>Bil</th>
|
||||||
<th>No Rujukan</th>
|
<th>No Rujukan</th>
|
||||||
<th>Tarikh Gadai</th>
|
<th>Tarikh Gadai</th>
|
||||||
<th>Pembiayaan</th>
|
<th>Tarikh Matang</th>
|
||||||
<th>Nilai Marhun</th>
|
<th>Nilai Marhun</th>
|
||||||
|
<th>Pembiayaan</th>
|
||||||
|
<th>Margin</th>
|
||||||
<th>Tempoh</th>
|
<th>Tempoh</th>
|
||||||
<th>Keuntungan</th>
|
<th>Keuntungan</th>
|
||||||
<th>Tarikh Matang</th>
|
|
||||||
<th>Margin</th>
|
|
||||||
<th>Kos Keuntungan</th>
|
<th>Kos Keuntungan</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -355,6 +355,8 @@
|
|||||||
<script>
|
<script>
|
||||||
var api_url = "<?php echo $api_url ?>";
|
var api_url = "<?php echo $api_url ?>";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var tablegadai = $('#myTable').DataTable({
|
var tablegadai = $('#myTable').DataTable({
|
||||||
"scrollX": true
|
"scrollX": true
|
||||||
});
|
});
|
||||||
@@ -571,6 +573,39 @@
|
|||||||
function ubahfunc(e)
|
function ubahfunc(e)
|
||||||
{
|
{
|
||||||
let ubahid = $('input[name="belum"]:checked').val();
|
let ubahid = $('input[name="belum"]:checked').val();
|
||||||
|
let harini = new Date();harini.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
if($("input[name='options']:checked").val() == 'belum_tebus')
|
||||||
|
{
|
||||||
|
let test1 = $('input[name="belum"]:checked').closest('tr').children('td:eq(2)').text();
|
||||||
|
let tarikhgadai2 = new Date(test1);tarikhgadai2.setHours(0, 0, 0, 0);
|
||||||
|
if(+harini !== +tarikhgadai2)
|
||||||
|
{
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran',
|
||||||
|
text: 'Tidak boleh Ubah gadai melebihi tarikh yang sama!'
|
||||||
|
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if($("input[name='options']:checked").val() == 'sudah_tebus')
|
||||||
|
{
|
||||||
|
let test = $('input[name="sudahtebus"]:checked').closest('tr').children('td:eq(2)').text();
|
||||||
|
let tarikhgadai1 = new Date(test);tarikhgadai1.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
if(+harini !== +tarikhgadai1)
|
||||||
|
{
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran',
|
||||||
|
text: 'Tidak boleh Ubah gadai melebihi tarikh yang sama!'
|
||||||
|
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(ubahid == null && $("input[name='options']:checked").val() == 'belum_tebus')
|
if(ubahid == null && $("input[name='options']:checked").val() == 'belum_tebus')
|
||||||
{
|
{
|
||||||
@@ -593,6 +628,9 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const swalWithBootstrapButtons = Swal.mixin
|
const swalWithBootstrapButtons = Swal.mixin
|
||||||
({
|
({
|
||||||
@@ -707,6 +745,40 @@
|
|||||||
let hapusid = $('input[name="belum"]:checked').val();
|
let hapusid = $('input[name="belum"]:checked').val();
|
||||||
let hapusidsudah = $('input[name="sudahtebus"]:checked').val();
|
let hapusidsudah = $('input[name="sudahtebus"]:checked').val();
|
||||||
|
|
||||||
|
let harini = new Date();harini.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
if($("input[name='options']:checked").val() == 'belum_tebus')
|
||||||
|
{
|
||||||
|
let test1 = $('input[name="belum"]:checked').closest('tr').children('td:eq(2)').text();
|
||||||
|
let tarikhgadai2 = new Date(test1);tarikhgadai2.setHours(0, 0, 0, 0);
|
||||||
|
if(+harini !== +tarikhgadai2)
|
||||||
|
{
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran',
|
||||||
|
text: 'Tidak boleh Hapus gadai melebihi tarikh yang sama!'
|
||||||
|
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if($("input[name='options']:checked").val() == 'sudah_tebus')
|
||||||
|
{
|
||||||
|
let test = $('input[name="sudahtebus"]:checked').closest('tr').children('td:eq(2)').text();
|
||||||
|
let tarikhgadai1 = new Date(test);tarikhgadai1.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
if(+harini !== +tarikhgadai1)
|
||||||
|
{
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Amaran',
|
||||||
|
text: 'Tidak boleh Hapus gadai melebihi tarikh yang sama!'
|
||||||
|
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(hapusid == null && $("input[name='options']:checked").val() == 'belum_tebus')
|
if(hapusid == null && $("input[name='options']:checked").val() == 'belum_tebus')
|
||||||
{
|
{
|
||||||
@@ -746,154 +818,155 @@
|
|||||||
cancelButtonText: 'Batal',
|
cancelButtonText: 'Batal',
|
||||||
reverseButtons: true
|
reverseButtons: true
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
|
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Tunggu Pengesahan Daripada Khazanah.',
|
title: 'Tunggu Pengesahan Daripada Khazanah.',
|
||||||
icon: 'info',
|
icon: 'info',
|
||||||
width: 600,
|
width: 600,
|
||||||
padding: '3em',
|
padding: '3em',
|
||||||
background: '#fffff',
|
background: '#fffff',
|
||||||
showCancelButton: false,
|
showCancelButton: false,
|
||||||
showConfirmButton: false,
|
showConfirmButton: false,
|
||||||
allowOutsideClick: false,
|
allowOutsideClick: false,
|
||||||
allowEscapeKey: false,
|
allowEscapeKey: false,
|
||||||
allowEnterKey: false
|
allowEnterKey: false
|
||||||
})
|
})
|
||||||
|
|
||||||
let mohon = "Hapus Gadai";
|
let mohon = "Hapus Gadai";
|
||||||
let id = 0;
|
let id = 0;
|
||||||
if($("input[name='options']:checked").val() == 'belum_tebus')
|
|
||||||
{
|
|
||||||
id = hapusid;
|
|
||||||
}
|
|
||||||
else if($("input[name='options']:checked").val() == 'sudah_tebus')
|
|
||||||
{
|
|
||||||
id = hapusidsudah;
|
|
||||||
}
|
|
||||||
|
|
||||||
$.ajax({
|
if($("input[name='options']:checked").val() == 'belum_tebus')
|
||||||
method:'post',
|
|
||||||
url: '{{ route("teller.createkelulusan") }}',
|
|
||||||
data: {
|
|
||||||
"_token": "{{ csrf_token() }}",
|
|
||||||
"norujukan" : id,
|
|
||||||
"mohon" : mohon
|
|
||||||
},
|
|
||||||
success:function(data){
|
|
||||||
|
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
},error: function(xhr, status, error) {
|
|
||||||
var err = eval("(" + xhr.responseText + ")");
|
|
||||||
alert(xhr.responseText);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//TIME INTERVAL
|
|
||||||
let timerInterval;
|
|
||||||
|
|
||||||
timerInterval = setInterval(function()
|
|
||||||
{
|
|
||||||
$.ajax({
|
|
||||||
method:'get',
|
|
||||||
url: "{{ route('teller.getkelulusan') }}",
|
|
||||||
data: {
|
|
||||||
"norujukan" : id
|
|
||||||
},
|
|
||||||
success:function(data){
|
|
||||||
console.log(data);
|
|
||||||
if(data != 0)
|
|
||||||
{
|
|
||||||
console.log('berjaya');
|
|
||||||
clearInterval(timerInterval);
|
|
||||||
Swal.fire({
|
|
||||||
icon: 'success',
|
|
||||||
title: 'Anda Berjaya Menerima Pengesahan'
|
|
||||||
}).then(function(){
|
|
||||||
|
|
||||||
if($("input[name='options']:checked").val() == 'belum_tebus')
|
|
||||||
{
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
method:'put',
|
|
||||||
url:api_url + '/api/gadai/hapus/' + kodcaw + '/' + hapusid,
|
|
||||||
success:function(data)
|
|
||||||
{
|
|
||||||
console.log(data);
|
|
||||||
swalWithBootstrapButtons.fire(
|
|
||||||
'Hapus!',
|
|
||||||
'Data pelanggan telah dihapuskan.',
|
|
||||||
'success'
|
|
||||||
).then(function () {
|
|
||||||
location.reload();
|
|
||||||
});
|
|
||||||
|
|
||||||
},error: function(xhr, status, error) {
|
|
||||||
var err = eval("(" + xhr.responseText + ")");
|
|
||||||
alert(xhr.responseText);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
else if($("input[name='options']:checked").val() == 'sudah_tebus')
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
method:'put',
|
|
||||||
url:api_url+'/api/tebus/hapus/' + kodcaw + '/' + hapusidsudah,
|
|
||||||
success:function(data)
|
|
||||||
{
|
|
||||||
if(data != "Bukan-Tebus")
|
|
||||||
{
|
{
|
||||||
swalWithBootstrapButtons.fire(
|
id = hapusid;
|
||||||
'Hapus!',
|
}
|
||||||
'Data pelanggan telah dihapuskan.',
|
else if($("input[name='options']:checked").val() == 'sudah_tebus')
|
||||||
'success'
|
{
|
||||||
).then(function () {
|
id = hapusidsudah;
|
||||||
location.reload();
|
}
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
method:'post',
|
||||||
|
url: '{{ route("teller.createkelulusan") }}',
|
||||||
|
data: {
|
||||||
|
"_token": "{{ csrf_token() }}",
|
||||||
|
"norujukan" : id,
|
||||||
|
"mohon" : mohon
|
||||||
|
},
|
||||||
|
success:function(data){
|
||||||
|
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
|
},error: function(xhr, status, error) {
|
||||||
|
var err = eval("(" + xhr.responseText + ")");
|
||||||
|
alert(xhr.responseText);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//TIME INTERVAL
|
||||||
|
let timerInterval;
|
||||||
|
|
||||||
|
timerInterval = setInterval(function()
|
||||||
|
{
|
||||||
|
$.ajax({
|
||||||
|
method:'get',
|
||||||
|
url: "{{ route('teller.getkelulusan') }}",
|
||||||
|
data: {
|
||||||
|
"norujukan" : id
|
||||||
|
},
|
||||||
|
success:function(data){
|
||||||
|
console.log(data);
|
||||||
|
if(data != 0)
|
||||||
|
{
|
||||||
|
console.log('berjaya');
|
||||||
|
clearInterval(timerInterval);
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'success',
|
||||||
|
title: 'Anda Berjaya Menerima Pengesahan'
|
||||||
|
}).then(function(){
|
||||||
|
|
||||||
|
if($("input[name='options']:checked").val() == 'belum_tebus')
|
||||||
|
{
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
method:'put',
|
||||||
|
url: api_url + '/api/gadai/hapus/' + kodcaw + '/' + hapusid,
|
||||||
|
success:function(data)
|
||||||
|
{
|
||||||
|
console.log(data);
|
||||||
|
swalWithBootstrapButtons.fire(
|
||||||
|
'Hapus!',
|
||||||
|
'Data pelanggan telah dihapuskan.',
|
||||||
|
'success'
|
||||||
|
).then(function () {
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
|
||||||
|
},error: function(xhr, status, error) {
|
||||||
|
var err = eval("(" + xhr.responseText + ")");
|
||||||
|
alert(xhr.responseText);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
else if($("input[name='options']:checked").val() == 'sudah_tebus')
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
method:'put',
|
||||||
|
url:api_url + '/api/tebus/hapus/' + kodcaw + '/' + hapusidsudah,
|
||||||
|
success:function(data)
|
||||||
|
{
|
||||||
|
if(data != "Bukan-Tebus")
|
||||||
|
{
|
||||||
|
swalWithBootstrapButtons.fire(
|
||||||
|
'Hapus!',
|
||||||
|
'Data pelanggan telah dihapuskan.',
|
||||||
|
'success'
|
||||||
|
).then(function () {
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
swalWithBootstrapButtons.fire(
|
||||||
|
'Amaran!',
|
||||||
|
'Hapus Hanya Untuk Jenis Tebus Sahaja!',
|
||||||
|
'error'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},error: function(xhr, status, error) {
|
||||||
|
var err = eval("(" + xhr.responseText + ")");
|
||||||
|
console.log(xhr.responseText);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
},error: function(xhr, status, error) {
|
||||||
|
var err = eval("(" + xhr.responseText + ")");
|
||||||
|
alert(xhr.responseText);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
else
|
}, 3000);
|
||||||
{
|
|
||||||
|
|
||||||
|
}else if (result.dismiss === Swal.DismissReason.cancel) {
|
||||||
swalWithBootstrapButtons.fire(
|
swalWithBootstrapButtons.fire(
|
||||||
'Amaran!',
|
'Cancelled',
|
||||||
'Hapus Hanya Untuk Jenis Tebus Sahaja!',
|
'Your imaginary file is safe :)',
|
||||||
'error'
|
'error'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},error: function(xhr, status, error) {
|
|
||||||
var err = eval("(" + xhr.responseText + ")");
|
|
||||||
alert(xhr.responseText);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
},error: function(xhr, status, error) {
|
|
||||||
var err = eval("(" + xhr.responseText + ")");
|
|
||||||
alert(xhr.responseText);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}, 3000);
|
|
||||||
|
|
||||||
|
|
||||||
}else if (result.dismiss === Swal.DismissReason.cancel) {
|
|
||||||
swalWithBootstrapButtons.fire(
|
|
||||||
'Cancelled',
|
|
||||||
'Your imaginary file is safe :)',
|
|
||||||
'error'
|
|
||||||
)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function gadaiOptionButton(noic){
|
function gadaiOptionButton(noic){
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
<td>{{ $cawangan_info['details_caw'] }}</td>
|
<td>{{ $cawangan_info['details_caw'] }}</td>
|
||||||
<td>{{ $k['norujukan'] }}</td>
|
<td>{{ $k['norujukan'] }}</td>
|
||||||
<td>{{ $k['komen'] }}</td>
|
<td>{{ $k['komen'] }}</td>
|
||||||
<td><button class="btn btn-primary mr-2" onclick="updatelulus(this)" data-norujukan="{{ $k['norujukan'] }}"><i class="fas fa-thumbs-up"></i></button><button class="btn btn-danger"><i class="fas fa-thumbs-down"></i></button></td>
|
<td>{{ $k['pelulus'] }}</td>
|
||||||
|
<td><button class="btn btn-primary mr-2" data-pelulus="{{ $k['pelulus'] }}" onclick="updatelulus(this)" data-norujukan="{{ $k['norujukan'] }}"><i class="fas fa-thumbs-up"></i></button>
|
||||||
|
<button class="btn btn-danger"><i class="fas fa-thumbs-down"></i></button></td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
@foreach($kelulusanmohonid as $index=>$km)
|
@foreach($kelulusanmohonid as $index=>$km)
|
||||||
@@ -78,13 +80,16 @@
|
|||||||
function updatelulus(e)
|
function updatelulus(e)
|
||||||
{
|
{
|
||||||
let norujukan = $(e).data('norujukan');
|
let norujukan = $(e).data('norujukan');
|
||||||
|
let pelulus = $(e).data('pelulus');
|
||||||
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method:'put',
|
method:'put',
|
||||||
url: "{{ route('khazanah.updatekelulusan') }}",
|
url: "{{ route('khazanah.updatekelulusan') }}",
|
||||||
data: {
|
data: {
|
||||||
"_token": "{{ csrf_token() }}",
|
"_token": "{{ csrf_token() }}",
|
||||||
"norujukan" : norujukan
|
"norujukan" : norujukan,
|
||||||
|
"pelulus" : pelulus
|
||||||
},
|
},
|
||||||
success:function(data){
|
success:function(data){
|
||||||
|
|
||||||
|
|||||||
@@ -122,12 +122,18 @@
|
|||||||
encrypted: true
|
encrypted: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var cawangankhazanah = '{{ $auth_user["cawangan"] }}';
|
||||||
|
|
||||||
var channel = pusher.subscribe('status-liked');
|
var channel = pusher.subscribe('status-liked');
|
||||||
channel.bind('my-event', function(data) {
|
channel.bind('my-event', function(data) {
|
||||||
let message = JSON.stringify(data);
|
// let message = JSON.stringify(data);
|
||||||
|
|
||||||
|
|
||||||
|
if(cawangankhazanah == data.cawangan)
|
||||||
|
{
|
||||||
|
|
||||||
$('#bell').css("color", "red");
|
$('#bell').css("color", "red");
|
||||||
$('#linkz').text("Teller Pohon Kelulusan");
|
$('#linkz').text(data.namateller + " Memohon Kelulusan");
|
||||||
$("#linkz").attr("href", "{{ url('kelulusan') }}");
|
$("#linkz").attr("href", "{{ url('kelulusan') }}");
|
||||||
|
|
||||||
const Toast = Swal.mixin({
|
const Toast = Swal.mixin({
|
||||||
@@ -146,6 +152,8 @@
|
|||||||
icon: 'error',
|
icon: 'error',
|
||||||
title: 'Kelulusan Dipohon Sekarang!'
|
title: 'Kelulusan Dipohon Sekarang!'
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -223,12 +223,12 @@
|
|||||||
encrypted: true
|
encrypted: true
|
||||||
});
|
});
|
||||||
|
|
||||||
var channel = pusher.subscribe('status-liked');
|
var channel = pusher.subscribe('operasi-notify');
|
||||||
channel.bind('my-event', function(data) {
|
channel.bind('operasi-event', function(data) {
|
||||||
let message = JSON.stringify(data);
|
let message = JSON.stringify(data);
|
||||||
|
|
||||||
$('#bell').css("color", "red");
|
$('#bell').css("color", "red");
|
||||||
$('#linkz').text("Teller Pohon Kelulusan");
|
$('#linkz').text(data.namateller + " Pohon Kelulusan");
|
||||||
$("#linkz").attr("href", "{{ url('kelulusan') }}");
|
$("#linkz").attr("href", "{{ url('kelulusan') }}");
|
||||||
|
|
||||||
const Toast = Swal.mixin({
|
const Toast = Swal.mixin({
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
Try publishing an event to channel <code>my-channel</code>
|
Try publishing an event to channel <code>my-channel</code>
|
||||||
with event name <code>my-event</code>.
|
with event name <code>my-event</code>.
|
||||||
</p>
|
</p>
|
||||||
<button onclick="trigtest()">Click</button>
|
<button>Click</button>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
||||||
@@ -121,10 +121,12 @@
|
|||||||
|
|
||||||
var channel = pusher.subscribe('status-liked');
|
var channel = pusher.subscribe('status-liked');
|
||||||
channel.bind('my-event', function(data) {
|
channel.bind('my-event', function(data) {
|
||||||
let message = JSON.stringify(data);
|
|
||||||
|
|
||||||
console.log(data);
|
console.log(data);
|
||||||
console.log(message);
|
|
||||||
|
if(data.message == 'KOK LANAS')
|
||||||
|
console.log(data.message);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
+2
-2
@@ -22,8 +22,8 @@ Route::get('/testtry',function(){
|
|||||||
|
|
||||||
//Testing Jer
|
//Testing Jer
|
||||||
Route::get('test', function () {
|
Route::get('test', function () {
|
||||||
event(new App\Events\StatusLiked('KOK LANAS'));
|
event(new App\Events\StatusLiked('KOK LANAS','KOK KELI'));
|
||||||
return "Event has been sent!";
|
return "Event has been try je sent!";
|
||||||
});
|
});
|
||||||
|
|
||||||
// Route::get('resitbiasa', function () {
|
// Route::get('resitbiasa', function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user