fix polis

This commit is contained in:
fifi97
2021-07-15 04:38:12 +08:00
parent 68b2cd63cc
commit f7b26a0c47
11 changed files with 81 additions and 29 deletions
+30 -2
View File
@@ -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: "<br>" +
'<button type="button" role="button" tabindex="0" class="btn btn-primary mr-1" onclick="swal.close()">' + 'Okay' + '</button>' +
'<button type="button" role="button" tabindex="0" class="btn btn-primary" onclick="ulangcetakagh(this)" data-komen2="' + data[0].komen2 + '">' + 'Ulang Cetak' + '</button>',
'<button type="button" role="button" tabindex="0" class="btn btn-primary" data-histid="' + histid + '" onclick="ulangcetakagh(this)" data-komen2="' + data[0].komen2 + '">' + 'Ulang Cetak' + '</button>',
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(`<option value='${optionText}'>${optionValue}</option>`);
}
function addOptionEdit(textopt,valueopt) {
optionText = textopt;
optionValue = valueopt;
$('#daerahaghedit').append(`<option value='${optionText}'>${optionValue}</option>`);
}
function rekodasal(gadaian){
+16 -3
View File
@@ -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){