update view laporan di so

This commit is contained in:
majid
2024-12-28 07:27:00 +07:00
parent 2005f546c5
commit 9a24751f65
4 changed files with 18 additions and 26 deletions

View File

@@ -764,27 +764,6 @@
const formElement = $('#formFoto')[0];
const formData = new FormData(formElement);
const lantaiInputs = document.querySelectorAll('.lantai-input');
lantaiInputs.forEach((input, index) => {
const files = input.files;
if (files.length > 0) {
// Gunakan dot notation sesuai Laravel
Array.from(files).forEach((file, fileIndex) => {
formData.append(`foto_lantai_unit.${index}`, file);
// Nama lantai unit
const namaLantai = document.querySelector(`[name="name_lantai_unit.${index}"]`);
if (namaLantai && namaLantai.value) {
formData.append(`name_lantai_unit.${index}`, namaLantai.value);
}
});
}
});
$.ajax({
url: '{{ route('surveyor.storeFoto') }}',
type: 'POST',