fix lapfix
This commit is contained in:
@@ -12,10 +12,12 @@ class PendahuluanSerahan implements ShouldBroadcast
|
|||||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||||
|
|
||||||
public $pengesahan;
|
public $pengesahan;
|
||||||
|
public $cawangan;
|
||||||
|
|
||||||
public function __construct($pengesahan)
|
public function __construct($pengesahan,$cawangan)
|
||||||
{
|
{
|
||||||
$this->pengesahan = $pengesahan;
|
$this->pengesahan = $pengesahan;
|
||||||
|
$this->cawangan = $cawangan
|
||||||
}
|
}
|
||||||
|
|
||||||
public function broadcastOn()
|
public function broadcastOn()
|
||||||
|
|||||||
@@ -1118,7 +1118,7 @@ class KhazanahController extends Controller
|
|||||||
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
event(new PendahuluanSerahan("Lulus"));
|
event(new PendahuluanSerahan("Lulus",$auth_user['cawangan']));
|
||||||
|
|
||||||
$updaterequest=Http::put(config('api.url').'/api/requestTeller/update/'. $auth_user['cawangan'],[
|
$updaterequest=Http::put(config('api.url').'/api/requestTeller/update/'. $auth_user['cawangan'],[
|
||||||
'kodlaluan' => $request->teller,
|
'kodlaluan' => $request->teller,
|
||||||
@@ -1198,7 +1198,7 @@ class KhazanahController extends Controller
|
|||||||
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
event(new PendahuluanSerahan("Lulus"));
|
event(new PendahuluanSerahan("Lulus",$auth_user['cawangan']));
|
||||||
|
|
||||||
$updaterequest=Http::put(config('api.url').'/api/requestTeller/update/'. $auth_user['cawangan'],[
|
$updaterequest=Http::put(config('api.url').'/api/requestTeller/update/'. $auth_user['cawangan'],[
|
||||||
'kodlaluan' => $request->teller,
|
'kodlaluan' => $request->teller,
|
||||||
@@ -2941,7 +2941,7 @@ class KhazanahController extends Controller
|
|||||||
'kodlaluan'=>$kodlaluan
|
'kodlaluan'=>$kodlaluan
|
||||||
]);
|
]);
|
||||||
|
|
||||||
event(new PendahuluanSerahan("Batal"));
|
event(new PendahuluanSerahan("Batal",$auth_user['cawangan']));
|
||||||
|
|
||||||
return response('Berjaya');
|
return response('Berjaya');
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+2
-2
@@ -466,7 +466,7 @@ async function openuptambahdanserah(e)
|
|||||||
var channel = pusher.subscribe('pendahuluanserahan-notice');
|
var channel = pusher.subscribe('pendahuluanserahan-notice');
|
||||||
channel.bind('penserahan-event', function(data) {
|
channel.bind('penserahan-event', function(data) {
|
||||||
|
|
||||||
if(data.pengesahan === 'Lulus')
|
if(data.pengesahan === 'Lulus' && data.cawangan == kodcaw)
|
||||||
{
|
{
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
@@ -631,7 +631,7 @@ function tambahdanserahanfunc(e)
|
|||||||
channel.bind('penserahan-event', function(data) {
|
channel.bind('penserahan-event', function(data) {
|
||||||
// let message = JSON.stringify(data);
|
// let message = JSON.stringify(data);
|
||||||
|
|
||||||
if(data.pengesahan === 'Lulus')
|
if(data.pengesahan === 'Lulus' && data.cawangan == kodcaw)
|
||||||
{
|
{
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
|
|||||||
@@ -630,33 +630,20 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//TIME INTERVAL
|
var channel = pusher.subscribe('status-liked');
|
||||||
let timerInterval;
|
channel.bind('my-event', function(data) {
|
||||||
|
|
||||||
timerInterval = setInterval(function(){
|
if(cawangan == data.cawangan)
|
||||||
$.ajax({
|
{
|
||||||
method:'get',
|
Swal.fire({
|
||||||
url: "{{ route('teller.getkelulusan') }}",
|
icon: 'success',
|
||||||
data: {
|
title: 'Telah Disahkan'
|
||||||
"norujukan" : norujukan
|
}).then(function(){
|
||||||
},
|
$("#print_submit_belum_serah").submit();
|
||||||
success:function(data){
|
});
|
||||||
if(data != 0){
|
}
|
||||||
clearInterval(timerInterval);
|
|
||||||
Swal.fire({
|
});
|
||||||
icon: 'success',
|
|
||||||
title: 'Telah Disahkan'
|
|
||||||
}).then(function(){
|
|
||||||
$("#print_submit_belum_serah").submit();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},error: function(xhr, status, error) {
|
|
||||||
var err = eval("(" + xhr.responseText + ")");
|
|
||||||
alert(xhr.responseText);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, 3000);
|
|
||||||
|
|
||||||
|
|
||||||
}else if (result.dismiss === Swal.DismissReason.cancel) {
|
}else if (result.dismiss === Swal.DismissReason.cancel) {
|
||||||
swalWithBootstrapButtons.fire(
|
swalWithBootstrapButtons.fire(
|
||||||
|
|||||||
Reference in New Issue
Block a user