fix skit2

This commit is contained in:
hafifierahman
2021-03-02 09:45:16 +08:00
parent 3dde0f030c
commit 2fc0f916b8
7 changed files with 59 additions and 18 deletions
+25 -1
View File
@@ -493,7 +493,7 @@
urlroute = urlroute.replace(':id', gadai_detail["norujukan"]);
tablelelong.row.add([
counter,
'<a href=' + urlroute +'>' + gadai_detail['norujukan'] + '</a>',
'<a href="#" onclick="checktuntutbaki(this)" data-norujukan=' + gadai_detail['norujukan'] + ' data-tarikhtuntut=' + gadai_detail['trkhtuntut'] + '>' + gadai_detail['norujukan'] + '</a>',
gadai_detail['t_lelong'],
gadai_detail['trkhtuntut'],
'RM '+ formatter.format(gadai_detail['pinjaman']),
@@ -508,6 +508,30 @@
});
});
}
function checktuntutbaki(e)
{
let tarikhtuntut = $(e).data('tarikhtuntut');
let norujukan = $(e).data('norujukan');
var urlroute = '{{ route("lelongan", ":id") }}';
urlroute = urlroute.replace(':id', norujukan);
if (tarikhtuntut == null)
{
window.location.href = urlroute;
}else{
Swal.fire({
icon: 'error',
title: 'Amaran',
text: 'Lelongan telah dibayar!'
});
}
return false;
}
$(document).ready( function () {
$('#myTable').parents('div.dataTables_wrapper').first().hide();