feat(penilai): tambahkan fitur upload file paparan
- Menambahkan metode edit untuk menampilkan form upload file paparan. - Menambahkan metode storePaparan untuk menyimpan file paparan ke database. - Membuat migrasi untuk menambahkan kolom file_paparan pada tabel penilai. - Menambahkan tampilan edit.blade.php untuk form upload. - Memperbarui tampilan show.blade.php untuk mengarahkan ke form edit. - Menambahkan breadcrumb untuk navigasi ke halaman upload file paparan. - Memperbarui rute untuk mendukung pengeditan dan penyimpanan file paparan.
This commit is contained in:
@@ -560,45 +560,9 @@
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes'
|
||||
}).then((result) => {
|
||||
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: `/penilai/storePaparan/${permohonanId}`,
|
||||
type: "PUT",
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
// window.location.reload();
|
||||
hideLoadingSwal();
|
||||
Swal.fire({
|
||||
title: 'Berhasil!',
|
||||
text: response.message,
|
||||
icon: 'success',
|
||||
confirmButtonText: 'OK'
|
||||
}).then((response) => {
|
||||
if (response.isConfirmed) {
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.log('Error checking button status:', error, status, xhr);
|
||||
if (xhr.responseJSON.message) {
|
||||
// window.location.reload();
|
||||
hideLoadingSwal();
|
||||
|
||||
} else {
|
||||
// window.location.reload();
|
||||
hideLoadingSwal();
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
window.location.href = `/penilai/${permohonanId}/edit`;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user