Use sweetalert for popup instead of regular js alert
This commit is contained in:
@@ -467,7 +467,15 @@
|
||||
}
|
||||
|
||||
if (stringHasTwoDecimalNumber && lastDecimalIsNotZeroOrFive) {
|
||||
alert('Nilai untuk sen terakhir adalah 0 dan 5 sahaja');
|
||||
|
||||
Swal.fire({
|
||||
position: 'center',
|
||||
icon: 'error',
|
||||
title: 'Nilai untuk sen terakhir adalah 0 dan 5 sahaja',
|
||||
showConfirmButton: false,
|
||||
timer: 3000
|
||||
})
|
||||
|
||||
input.value = input.value.split('.')[0] + '.' + input.value.split('.')[1].substring(0, 1) + '0';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user