Merge remote-tracking branch 'composer/feature/senior-officer' into staging
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user