fix(penilai): print out laporan
This commit is contained in:
@@ -356,9 +356,30 @@
|
||||
if (preview) {
|
||||
preview.id = newImageId;
|
||||
preview.src = '';
|
||||
preview.accept = ".jpg,.jpeg,.png";
|
||||
preview.classList.add('hidden');
|
||||
input.onchange = function() {
|
||||
previewImage(this, newImageId);
|
||||
const file = this.files[0];
|
||||
if (file) {
|
||||
const validExtensions = ['image/jpeg', 'image/png', 'image/gif',
|
||||
'image/webp'
|
||||
];
|
||||
if (validExtensions.includes(file.type)) {
|
||||
previewImage(this, newImageId);
|
||||
} else {
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Format Tidak Didukung',
|
||||
text: 'Hanya file gambar dengan format JPG, PNG, GIF, atau WEBP yang diperbolehkan.',
|
||||
position: 'top-end',
|
||||
toast: true,
|
||||
showConfirmButton: false,
|
||||
timer: 3000,
|
||||
timerProgressBar: true
|
||||
});
|
||||
this.value = '';
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user