disabled maklumat keuntungan and hapus ansuran dan fixed bug nokp more than 13 have special characters.
This commit is contained in:
@@ -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
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user