disabled maklumat keuntungan and hapus ansuran dan fixed bug nokp more than 13 have special characters.

This commit is contained in:
Hafifie PKB
2024-03-06 22:17:04 +08:00
parent de32f6b13d
commit 640e7291b9
5 changed files with 47 additions and 33 deletions
+22 -15
View File
@@ -1220,22 +1220,29 @@
var nokp = $('#noic').val();
if(id_type=='nokp'){
if($.isNumeric(nokp) == false){
Swal.fire({
icon: 'error',
title: 'Amaran!',
text: 'Sila Masukkan Nombor Sahaja Pada No KP Pelanggan'
});
event.preventDefault();
return false;
if(nokp.substr(-1) != '*')
{
console.log('ada special characters');
Swal.fire({
icon: 'error',
title: 'Amaran!',
text: 'Sila Masukkan Nombor Sahaja Pada No KP Pelanggan'
});
event.preventDefault();
return false;
}
}
if(nokp.length != 12){
Swal.fire({
icon: 'error',
title: 'Amaran!',
text: 'Sila Periksa No KP Pelanggan'
});
event.preventDefault();
return false;
if(nokp.substr(-1) != '*')
{
Swal.fire({
icon: 'error',
title: 'Amaran!',
text: 'Sila Periksa No KP Pelanggan'
});
event.preventDefault();
return false;
}
}
}else if(id_type=='passport'){
// if(nokp.length < 5){
@@ -1282,4 +1289,4 @@
<script src="{{ asset('js/postcode-concerns.js') }}"></script>
@endpush
@endsection
@endsection
+1 -1
View File
@@ -246,7 +246,7 @@
<button class="btn btn-primary" onclick="ubahfunc(this)" id="button-edit-gadaian">Ubah</button>
<button class="btn btn-primary" onclick="hapusfunc()">Hapus</button>
<button class="btn btn-primary" onclick="histfunc()">Rekod Gadaian</button>
<button class="btn btn-primary" onclick="removeansuran(this)" id="button-remove-ansuran">Hapus Ansuran</button>
{{-- <button class="btn btn-primary" onclick="removeansuran(this)" id="button-remove-ansuran">Hapus Ansuran</button> --}}
</div>
</div>