update data pemanding dan otorisator, pembuatan seeder kjpp mengunakan exel
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||
<span class="text-2sm text-gray-700">
|
||||
{{formatAlamat($dokumen->pemilik)}}
|
||||
{{ formatAlamat($dokumen->pemilik) }}
|
||||
</span>
|
||||
@endforeach
|
||||
</div>
|
||||
@@ -118,8 +118,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Delete button to remove photo -->
|
||||
<button type="button" class="btn btn-danger btn-sm delete-btn"
|
||||
id="btnDelete">
|
||||
<button type="button" class="btn btn-danger btn-sm delete-btn" id="btnDelete">
|
||||
<i class="ki-filled ki-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -190,9 +189,8 @@
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<img id="foto_rute_lainnya-preview-{{ $index }}"
|
||||
src="{{ asset('storage/' . $photo['foto_rute_lainnya']) }}"
|
||||
alt="Foto Rute " class="mt-2 max-w-full h-auto"
|
||||
style="width: 30rem;">
|
||||
src="{{ asset('storage/' . $photo['foto_rute_lainnya']) }}" alt="Foto Rute "
|
||||
class="mt-2 max-w-full h-auto" style="width: 30rem;">
|
||||
<div class="flex flex-col lg:flex-row gap-2 w-full">
|
||||
|
||||
<div class="flex flex-wrap items-baseline px-2">
|
||||
@@ -260,7 +258,6 @@
|
||||
['label' => 'Tampak Samping Kiri', 'index' => 1],
|
||||
['label' => 'Tampak Samping Kanan', 'index' => 2],
|
||||
['label' => 'Nomor Rumah/Unit', 'index' => 3],
|
||||
|
||||
];
|
||||
} elseif ($kategori === 'apartemen-kantor') {
|
||||
$objekViews = [
|
||||
@@ -332,35 +329,34 @@
|
||||
|
||||
@if (count($objekViews) > 0)
|
||||
@foreach ($objekViews as $view)
|
||||
<div class="flex flex-wrap gap-4 {{ !$loop->first ? 'mt-2' : '' }}">
|
||||
<div class="flex w-full gap-4">
|
||||
<label class="form-label max-w-56"><span
|
||||
class="form-label">{{ $view['label'] }}</span></label>
|
||||
<input type="hidden" class="form-control"
|
||||
name="name_objek[]" value="{{ $view['label'] }}" />
|
||||
<div class="w-full grid gap-5">
|
||||
<img id="foto_object_jaminan_preview_{{ $view['index'] }}"
|
||||
src="{{ isset($formFoto['object_jaminan'][$view['index']]['foto_objek']) ? asset('storage/' . $formFoto['object_jaminan'][$view['index']]['foto_objek']) : '' }}"
|
||||
alt="{{ $view['label'] }}" class="mb-2 h-auto"
|
||||
|
||||
style="{{ isset($formFoto['object_jaminan'][$view['index']]['foto_objek']) ? 'width: 30rem;' : 'display: none;' }}"
|
||||
onerror="this.style.display='none';" />
|
||||
<div class="input-group w-full flex gap-2">
|
||||
<input type="file" name="foto_objek[]"
|
||||
class="file-input file-input-bordered w-full"
|
||||
accept="image/*" capture="camera"
|
||||
onchange="previewImage(this, 'foto_object_jaminan_preview_{{ $view['index'] }}')">
|
||||
<button type="button" id="btnCamera"
|
||||
class="btn btn-light"
|
||||
data-modal-toggle="#cameraModal">
|
||||
<i class="ki-outline ki-abstract-33"></i> Camera
|
||||
</button>
|
||||
<div class="flex flex-wrap gap-4 {{ !$loop->first ? 'mt-2' : '' }}">
|
||||
<div class="flex w-full gap-4">
|
||||
<label class="form-label max-w-56"><span
|
||||
class="form-label">{{ $view['label'] }}</span></label>
|
||||
<input type="hidden" class="form-control"
|
||||
name="name_objek[]" value="{{ $view['label'] }}" />
|
||||
<div class="w-full grid gap-5">
|
||||
<img id="foto_object_jaminan_preview_{{ $view['index'] }}"
|
||||
src="{{ isset($formFoto['object_jaminan'][$view['index']]['foto_objek']) ? asset('storage/' . $formFoto['object_jaminan'][$view['index']]['foto_objek']) : '' }}"
|
||||
alt="{{ $view['label'] }}" class="mb-2 h-auto"
|
||||
style="{{ isset($formFoto['object_jaminan'][$view['index']]['foto_objek']) ? 'width: 30rem;' : 'display: none;' }}"
|
||||
onerror="this.style.display='none';" />
|
||||
<div class="input-group w-full flex gap-2">
|
||||
<input type="file" name="foto_objek[]"
|
||||
class="file-input file-input-bordered w-full"
|
||||
accept="image/*" capture="camera"
|
||||
onchange="previewImage(this, 'foto_object_jaminan_preview_{{ $view['index'] }}')">
|
||||
<button type="button" id="btnCamera"
|
||||
class="btn btn-light"
|
||||
data-modal-toggle="#cameraModal">
|
||||
<i class="ki-outline ki-abstract-33"></i> Camera
|
||||
</button>
|
||||
</div>
|
||||
<textarea name="deskripsi_objek[]" class="textarea" rows="3" placeholder="Deskripsi">{{ isset($formFoto['object_jaminan'][$view['index']]) ? str_replace($view['label'] . ': ', '', $formFoto['object_jaminan'][$view['index']]['deskripsi_objek']) : '' }}</textarea>
|
||||
</div>
|
||||
<textarea name="deskripsi_objek[]" class="textarea" rows="3" placeholder="Deskripsi">{{ isset($formFoto['object_jaminan'][$view['index']]) ? str_replace($view['label'] . ': ', '', $formFoto['object_jaminan'][$view['index']]['deskripsi_objek']) : '' }}</textarea>
|
||||
</div>
|
||||
<span class="alert text-danger text-sm"></span>
|
||||
</div>
|
||||
<span class="alert text-danger text-sm"></span>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
@@ -596,24 +592,17 @@
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div id="loadingOverlay" class="fixed inset-0 bg-black bg-opacity-50 hidden items-center justify-center z-50">
|
||||
<div class="bg-white p-4 rounded-lg">
|
||||
<div class="loader"></div>
|
||||
<p class="mt-2 text-center">Sedang memproses...</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Kamera -->
|
||||
@include('lpj::surveyor.components.modal-kamera')
|
||||
@endsection
|
||||
@endsection
|
||||
|
||||
@include('lpj::surveyor.js.fotojs')
|
||||
@include('lpj::surveyor.js.fotojs')
|
||||
@include('lpj::surveyor.js.utils')
|
||||
@push('scripts')
|
||||
<script>
|
||||
function submitFoto() {
|
||||
const loadingOverlay = document.getElementById('loadingOverlay');
|
||||
loadingOverlay.classList.remove('hidden');
|
||||
loadingOverlay.classList.add('flex');
|
||||
showLoadingSwal('Mengirim data ke server...');
|
||||
|
||||
const formElement = $('#formFoto')[0];
|
||||
const formData = new FormData(formElement);
|
||||
@@ -630,6 +619,7 @@
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
hideLoadingSwal();
|
||||
Swal.fire({
|
||||
title: 'Berhasil!',
|
||||
text: response.message,
|
||||
@@ -644,6 +634,7 @@
|
||||
|
||||
});
|
||||
} else {
|
||||
hideLoadingSwal();
|
||||
Swal.fire({
|
||||
title: 'Error!',
|
||||
text: response.message || 'Terjadi kesalahan',
|
||||
@@ -652,8 +643,6 @@
|
||||
});
|
||||
}
|
||||
console.log(response);
|
||||
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
let errors = xhr.responseJSON?.errors;
|
||||
@@ -663,41 +652,11 @@
|
||||
$(`#error-${key}`).text(value[0]);
|
||||
});
|
||||
}
|
||||
console.error('Terjadi error:', error); // Menampilkan pesan error di konsol
|
||||
console.log('Status:', status);
|
||||
console.log('Response:', xhr.responseText);
|
||||
console.log(errors);
|
||||
hideLoadingSwal();
|
||||
toastrErrorBuild(error);
|
||||
},
|
||||
complete: function() {
|
||||
// Re-enable the button and hide the spinner
|
||||
loadingOverlay.classList.add('hidden');
|
||||
loadingOverlay.classList.remove('flex');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@include('lpj::surveyor.js.camera-editor')
|
||||
@endpush
|
||||
|
||||
<style>
|
||||
.loader {
|
||||
border: 4px solid #f3f3f3;
|
||||
border-radius: 50%;
|
||||
border-top: 4px solid #3498db;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
animation: spin 1s linear infinite;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user