resolve conflict
This commit is contained in:
@@ -324,9 +324,12 @@
|
||||
<div class='col-md-8'>
|
||||
@php
|
||||
$poskod = Http::get($api_url . '/api/poskod/'. $customer_info['poskod'])->json();
|
||||
if(empty($poskod)){
|
||||
$poskod = array('koddaerah'=>'NIL','kodnegeri' => 'NIL');
|
||||
}
|
||||
$daerah = Http::get($api_url . '/api/daerah/' . $poskod['koddaerah'])->json();
|
||||
@endphp
|
||||
<input type="text" readonly name='koddaerah' id='koddaerah' value="{{ $daerah['namadaerah'] }}" class='form-control'>
|
||||
<input type="text" readonly name='koddaerah' id='koddaerah' value="{{ $daerah ? $daerah['namadaerah'] : 'NIL' }}" class='form-control'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='form-group row col-md-12'>
|
||||
@@ -337,7 +340,7 @@
|
||||
@php
|
||||
$negeri = Http::get($api_url . '/api/negeri/' . $poskod['kodnegeri'])->json();
|
||||
@endphp
|
||||
<input type="text" readonly name='kodnegeri' id='kodnegeri' value="{{ $negeri['negeri'] }}" class='form-control'>
|
||||
<input type="text" readonly name='kodnegeri' id='kodnegeri' value="{{ $negeri ? $negeri['negeri'] : 'NIL' }}" class='form-control'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='form-group row col-md-12'>
|
||||
@@ -556,7 +559,7 @@
|
||||
|
||||
function checkAGH()
|
||||
{
|
||||
|
||||
$('AGHModalEdit').hide();
|
||||
}
|
||||
|
||||
function checktuntutbaki(e)
|
||||
@@ -688,23 +691,35 @@
|
||||
}
|
||||
}
|
||||
|
||||
function ulangcetakagh()
|
||||
function ulangcetakagh(e)
|
||||
{
|
||||
if($("input[name='options']:checked").val() == 'belum_tebus'){
|
||||
var komen2 = $(e).data('komen2');
|
||||
var noruj = $(e).data('histid');
|
||||
|
||||
if(komen2 !== null)
|
||||
{
|
||||
if($("input[name='options']:checked").val() == 'belum_tebus'){
|
||||
let histid = $('input[name="belum"]:checked').val();
|
||||
if(histid == null){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran',
|
||||
text: 'Sila pilih salah satu SAG'
|
||||
});
|
||||
}else{
|
||||
let urlroute = '{{ route("agh.ulangcetak", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', histid);
|
||||
window.open(urlroute, '_blank');
|
||||
swal.close();
|
||||
if(histid == null){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran',
|
||||
text: 'Sila pilih salah satu SAG'
|
||||
});
|
||||
}else{
|
||||
let urlroute = '{{ route("agh.ulangcetak", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', histid);
|
||||
window.open(urlroute, '_blank');
|
||||
swal.close();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$('#AGHModalEdit').modal('show');
|
||||
$('#norujukanhiddenedit').val(noruj);
|
||||
swal.close();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
function saghilangfunc()
|
||||
@@ -724,6 +739,7 @@
|
||||
data:{ "norujukan" : histid,"kodcaw" : kodcaw},
|
||||
success:function(data)
|
||||
{
|
||||
|
||||
var count = Object.keys(data).length;
|
||||
|
||||
if(count > 0)
|
||||
@@ -735,7 +751,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()">' + '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!'
|
||||
});
|
||||
@@ -791,6 +807,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;
|
||||
@@ -799,6 +833,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){
|
||||
|
||||
Reference in New Issue
Block a user