16 lines
459 B
JavaScript
16 lines
459 B
JavaScript
document.addEventListener('DOMContentLoaded', () => {
|
|
document.querySelectorAll('.toast').forEach((toastEl) => {
|
|
if (window.bootstrap) {
|
|
const toast = new bootstrap.Toast(toastEl, { delay: 4200 });
|
|
toast.show();
|
|
}
|
|
});
|
|
|
|
const moneyInputs = document.querySelectorAll('.money-input');
|
|
moneyInputs.forEach((input) => {
|
|
input.addEventListener('input', () => {
|
|
if (Number(input.value) < 0) input.value = '0';
|
|
});
|
|
});
|
|
});
|