diff --git a/app/Events/OperasiNotice.php b/app/Events/OperasiNotice.php
index 519b617..7098b18 100644
--- a/app/Events/OperasiNotice.php
+++ b/app/Events/OperasiNotice.php
@@ -11,7 +11,7 @@ class OperasiNotice implements ShouldBroadcast
{
use Dispatchable, InteractsWithSockets, SerializesModels;
- public $cawangan,$namateller;
+ public $cawangan,$namakhazanah;
public function __construct($cawangan,$namakhazanah)
{
diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php
index 42fbb9d..1c17191 100644
--- a/app/Http/Controllers/KhazanahController.php
+++ b/app/Http/Controllers/KhazanahController.php
@@ -573,7 +573,7 @@ class KhazanahController extends Controller
if($updatelulus)
{
- event(new NotifikasiUbahHapus($norujukan,"batal",$request->komenubahhapus,$getlulus['teller']));
+ event(new NotifikasiUbahHapus($norujukan,"batal",$request->komenubahhapus,$request->teller));
}
}else{
@@ -583,7 +583,7 @@ class KhazanahController extends Controller
if($updatelulus)
{
- event(new NotifikasiUbahHapus($norujukan,"lulus","tiada",$getlulus['teller']));
+ event(new NotifikasiUbahHapus($norujukan,"lulus","tiada",$request->teller));
}
}
}
@@ -2916,7 +2916,7 @@ class KhazanahController extends Controller
// return redirect()->route('khazanah.customer_info')->with('aghinformation','Mengalami masalah dalam menjana.|error');
}
- return response($daftarpolis);
+ return response($daftar);
}
public function ulangcetakSuratAkuanGadaianHilang($norujukan)
diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/info.blade.php
index ad42b14..c7a01d7 100644
--- a/resources/views/customers/info.blade.php
+++ b/resources/views/customers/info.blade.php
@@ -561,7 +561,7 @@
channel.bind('my-kelulusan', function(data) {
- if(data.norujukan == norujukan && data.siri == siricreated)
+ if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller)
{
if(data.kelulusan == 'lulus')
{
@@ -1203,10 +1203,12 @@
encrypted: true
});
+ let teller = "{{ Auth::user()->name }}";
+
var channel = pusher.subscribe('notice-ubahhapus');
channel.bind('my-ubahhapus', function(data) {
- if(data.norujukan == norujukan)
+ if(data.norujukan == norujukan && data.teller == teller)
{
if(data.kelulusan == 'lulus')
{
@@ -1416,10 +1418,12 @@
encrypted: true
});
+ let teller = "{{ Auth::user()->name }}";
+
var channel = pusher.subscribe('notice-ubahhapus');
channel.bind('my-ubahhapus', function(data) {
- if(data.norujukan == ubahid)
+ if(data.norujukan == ubahid && data.teller == teller)
{
if(data.kelulusan == 'lulus')
{
@@ -1565,6 +1569,8 @@
}
});
+ let teller = "{{ Auth::user()->name }}";
+
var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", {
cluster: 'ap1',
encrypted: true
@@ -1573,7 +1579,7 @@
var channel = pusher.subscribe('notice-ubahhapus');
channel.bind('my-ubahhapus', function(data) {
- if(data.norujukan == id)
+ if(data.norujukan == id && data.teller == teller)
{
if(data.kelulusan == 'lulus')
{
@@ -1583,7 +1589,6 @@
title: 'Telah Disahkan'
}).then(function(){
- let teller = "{{ Auth::user()->name }}";
if($("input[name='options']:checked").val() == 'belum_tebus'){
$.ajax({
diff --git a/resources/views/gadaian/edit.blade.php b/resources/views/gadaian/edit.blade.php
index 53c90eb..822b40e 100644
--- a/resources/views/gadaian/edit.blade.php
+++ b/resources/views/gadaian/edit.blade.php
@@ -939,7 +939,7 @@
channel.bind('my-kelulusan', function(data) {
- if(data.norujukan == norujukan && data.siri == siricreated)
+ if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller)
{
if(data.kelulusan == 'lulus')
{
@@ -1046,7 +1046,7 @@
// console.log(message);
- if(data.norujukan == norujukan && data.siri == siricreated)
+ if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller)
{
if(data.kelulusan == 'lulus')
{
diff --git a/resources/views/khazanah/info.blade.php b/resources/views/khazanah/info.blade.php
index 9872b31..bbcde99 100644
--- a/resources/views/khazanah/info.blade.php
+++ b/resources/views/khazanah/info.blade.php
@@ -556,7 +556,7 @@
function checkAGH()
{
-
+ $('AGHModalEdit').hide();
}
function checktuntutbaki(e)
@@ -691,6 +691,7 @@
function ulangcetakagh(e)
{
var komen2 = $(e).data('komen2');
+ var noruj = $(e).data('histid');
if(komen2 !== null)
{
@@ -711,6 +712,7 @@
}
}else{
$('#AGHModalEdit').modal('show');
+ $('#norujukanhiddenedit').val(noruj);
swal.close();
}
@@ -746,7 +748,7 @@
showConfirmButton: false,
html: "
" +
'' +
- '',
+ '',
icon: 'error',
title: 'Surat Akuan Gadaian Hilang telah dikeluarkan!'
});
@@ -802,6 +804,24 @@
});
+ $('#negeriaghedit').change(function(){
+
+ var daerahselect = document.getElementById("daerahaghedit");
+
+ $('#daerahaghedit').attr('disabled', false);
+ $(daerahagh).empty();
+ $.ajax({
+ method:'get',
+ url: api_url + '/api/daerahkodnegeri/' + this.value,
+ success:function(data){
+ $.each(data, function( index, daerah ){
+ addOptionEdit(daerah.koddaerah,daerah.namadaerah);
+ });
+ }
+ });
+
+ });
+
function addOption(textopt,valueopt) {
optionText = textopt;
@@ -810,6 +830,14 @@
$('#daerahagh').append(``);
}
+ function addOptionEdit(textopt,valueopt) {
+
+ optionText = textopt;
+ optionValue = valueopt;
+
+ $('#daerahaghedit').append(``);
+ }
+
function rekodasal(gadaian){
diff --git a/resources/views/khazanah/kelulusan.blade.php b/resources/views/khazanah/kelulusan.blade.php
index 5c9909c..020e583 100644
--- a/resources/views/khazanah/kelulusan.blade.php
+++ b/resources/views/khazanah/kelulusan.blade.php
@@ -400,11 +400,14 @@
allowOutsideClick: false
})
+ let teller = $(e).closest('tr').children('td:eq(1)').text();
let norujukan = $(e).data('norujukan');
let pelulus = $(e).data('pelulus');
let siri = $(e).data('siri');
let namakhazanah = "{{ Auth::user()->name }}";
+ teller = String(teller);
+
$.ajax({
method:'put',
url: "{{ route('khazanah.updatekelulusan') }}",
@@ -415,7 +418,8 @@
"siri" : siri,
"komenkelulusan" : komenkelulusan,
"pembatalan" : "batal",
- 'namakhazanah' : namakhazanah
+ 'namakhazanah' : namakhazanah,
+ 'teller' : teller
},
success:function(data){
@@ -476,15 +480,19 @@
let norujukan = $(e).data('norujukan');
+ let teller = $(e).closest('tr').children('td:eq(1)').text();
let namakhazanah = "{{ $auth_user = Auth::user()->name }}";
+ teller = String(teller);
+
$.ajax({
method:'put',
url: "{{ route('khazanah.updatekelulusan') }}",
data: {
"_token": "{{ csrf_token() }}",
"norujukan" : norujukan,
- "khazanah" : namakhazanah
+ "khazanah" : namakhazanah,
+ 'teller' : teller
},
success:function(data){
@@ -552,6 +560,9 @@
let norujukan = $(e).data('norujukan');
let namakhazanah = "{{ $auth_user = Auth::user()->name }}";
+ let teller = $(e).closest('tr').children('td:eq(1)').text();
+
+ teller = String(teller);
$.ajax({
method:'put',
@@ -561,7 +572,9 @@
"norujukan" : norujukan,
"khazanah" : namakhazanah,
"komenubahhapus" : komenkelulusan,
- "batal" : 'batal'
+ "batal" : 'batal',
+ 'teller' : teller
+
},
success:function(data){
diff --git a/resources/views/lelongan/index.blade.php b/resources/views/lelongan/index.blade.php
index de0ebe8..85af903 100644
--- a/resources/views/lelongan/index.blade.php
+++ b/resources/views/lelongan/index.blade.php
@@ -307,11 +307,13 @@
encrypted: true
});
+ let teller = "{{ Auth::user()->name }}";
+
var channel = pusher.subscribe('notice-ubahhapus');
channel.bind('my-ubahhapus', function(data) {
- if(data.norujukan == norujukan)
+ if(data.norujukan == norujukan && data.teller == teller)
{
if(data.kelulusan == 'lulus')
{
diff --git a/resources/views/modal/agh.blade.php b/resources/views/modal/agh.blade.php
index 276889f..e81f715 100644
--- a/resources/views/modal/agh.blade.php
+++ b/resources/views/modal/agh.blade.php
@@ -78,11 +78,11 @@