From 28b985f72b6bd3ed616d72def50ec83357dc6367 Mon Sep 17 00:00:00 2001 From: hafifierahman Date: Tue, 5 Apr 2022 06:01:17 +0800 Subject: [PATCH] cit skit --- .../views/khazanah/permohonanwang.blade.php | 56 ++++++++++++++----- 1 file changed, 42 insertions(+), 14 deletions(-) diff --git a/resources/views/khazanah/permohonanwang.blade.php b/resources/views/khazanah/permohonanwang.blade.php index 9ca9c6b..573d5c0 100644 --- a/resources/views/khazanah/permohonanwang.blade.php +++ b/resources/views/khazanah/permohonanwang.blade.php @@ -207,25 +207,53 @@ showCancelButton: true, animation: 'slide-from-top', inputPlaceholder: 'Sila Pilih Bank', - allowOutsideClick: false + allowOutsideClick: false, + preConfirm: (value) => { + if(!value){ + Swal.showValidationMessage( + `Pilih Bank yang dinyatakan` + ); + } + } }).then(function (result) { if (result) { if (result.isConfirmed) { - $.ajax({ - method:"put", - url: api_url + '/admin/permohonan/tagcit', - data: { - "mohonid" : mid, - "bank" : result.value - }, - success:function(data) - { - if(data === 1) - Swal.fire('Diterima!', '', 'success') - } - }); + let cit = result.value; + Swal.fire({ + title: 'Masukkan No Resit', + input: 'text', + animation: 'slide-from-top', + inputPlaceholder: 'No Resit', + allowOutsideClick: false, + preConfirm: (value) => { + if(!value){ + Swal.showValidationMessage( + `Masukkan No Resit Di dalam kotak disediakan` + ); + } + } + }).then(function (response) { + if(response){ + $.ajax({ + method:"put", + url: api_url + '/admin/permohonan/tagcit', + data: { + "mohonid" : mid, + "bank" : cit, + "resitcit" : response.value + }, + success:function(data) + { + if(data === 1) + Swal.fire('Diterima!', '', 'success') + } + }); + } + + + }); }else{ }