update foto jaminan dan laporan preview
This commit is contained in:
@@ -398,10 +398,10 @@
|
||||
<div class="preview-container grid grid-cols-2 md:grid-cols-4 gap-4">
|
||||
@foreach ($lantaiFotos as $foto)
|
||||
<div class="preview-item relative">
|
||||
<img src="{{ asset('storage/' . $foto['path']) }}"
|
||||
alt="{{ $foto['name'] }}"
|
||||
<img src="{{ asset('storage/' . $foto['path']) }}"
|
||||
alt="{{ $foto['name'] }}"
|
||||
class="w-full h-40 object-cover rounded-lg">
|
||||
<button type="button"
|
||||
<button type="button"
|
||||
class="absolute top-2 right-2 btn btn-sm btn-danger btn-icon btnRemoveFoto"
|
||||
data-path="{{ $foto['path'] }}">
|
||||
<i class="ki-solid ki-cross"></i>
|
||||
@@ -409,12 +409,12 @@
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<input type="file"
|
||||
name="foto_lantai_unit[{{ $lantaiKey }}][]"
|
||||
class="file-input hidden"
|
||||
multiple
|
||||
accept="image/*"
|
||||
onchange="handleFileInput(this)"
|
||||
<input type="file"
|
||||
name="foto_lantai_unit[{{ $lantaiKey }}][]"
|
||||
class="file-input hidden"
|
||||
multiple
|
||||
accept="image/*"
|
||||
onchange="handleFileInput(this)"
|
||||
data-lantai="{{ $lantaiKey }}">
|
||||
<button type="button" class="btn btn-light btn-sm btnUploadFiles mt-2">
|
||||
<i class="ki-outline ki-upload"></i> Unggah Gambar
|
||||
@@ -604,7 +604,7 @@
|
||||
<script>
|
||||
|
||||
console.log('@json($formFoto)');
|
||||
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const lantaiContainer = document.getElementById("lantaiContainer");
|
||||
const btnAddLantai = document.getElementById("btnAddLantai");
|
||||
@@ -649,15 +649,15 @@
|
||||
Hapus
|
||||
</button>
|
||||
</div>
|
||||
<div class="dropzone w-full border-2 border-dashed border-gray-400 rounded-lg p-4 mt-2"
|
||||
ondrop="handleDrop(event)"
|
||||
<div class="dropzone w-full border-2 border-dashed border-gray-400 rounded-lg p-4 mt-2"
|
||||
ondrop="handleDrop(event)"
|
||||
ondragover="allowDrop(event)">
|
||||
<div class="preview-container grid grid-cols-2 md:grid-cols-4 gap-4"></div>
|
||||
<input type="file"
|
||||
name="foto_lantai_unit[${lantaiCount}][]"
|
||||
class="file-input hidden"
|
||||
multiple
|
||||
accept="image/*"
|
||||
<input type="file"
|
||||
name="foto_lantai_unit[${lantaiCount}][]"
|
||||
class="file-input hidden"
|
||||
multiple
|
||||
accept="image/*"
|
||||
data-lantai="${lantaiCount}"
|
||||
onchange="handleFileInput(this)">
|
||||
<button type="button" class="btn btn-light btn-sm btnUploadFiles">
|
||||
@@ -806,11 +806,11 @@
|
||||
icon: 'success',
|
||||
confirmButtonText: 'OK'
|
||||
}).then((response) => {
|
||||
// if (response.isConfirmed) {
|
||||
// window.location.href =
|
||||
// '{{ route('surveyor.show', ['id' => $permohonan->id]) }}';
|
||||
// }
|
||||
console.log(response);
|
||||
if (response.isConfirmed) {
|
||||
window.location.href =
|
||||
'{{ route('surveyor.show', ['id' => $permohonan->id]) }}';
|
||||
}
|
||||
// console.log(response);
|
||||
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user