fix(survyor/penilai): perbaikan view print-resume, lampiran, foto-lampiran, foto, header, main dan controller penilai dan surveyor

This commit is contained in:
majid
2025-02-25 08:50:03 +07:00
parent e4cec2a9a2
commit dfa364cdd8
10 changed files with 245 additions and 318 deletions

View File

@@ -283,11 +283,11 @@
console.error(`Dropzone element not found: ${selector}`);
return null;
}
const processedFiles = new Set();
myDropzone = new Dropzone(selector, {
url: "{{ route('surveyor.storeFoto') }}",
paramName: paramName,
maxFilesize: 30,
acceptedFiles: 'image/*',
uploadMultiple: false,
parallelUploads: 1,
@@ -304,14 +304,40 @@
param_name: paramName,
nomor_registrasi: '{{ $permohonan->nomor_registrasi ?? '' }}',
},
accept: function(file, done) {
// Generate a unique identifier for the file
const fileId = file.name + '_' + file.size;
addedfiles: function(files) {
uploadQueue += files.length;
uploadBatch = Array.from(files);
if (files.length > 0) showLoadingOverlay();
// If file is already being processed, reject it
if (processedFiles.has(fileId)) {
done('File sudah dalam antrian upload.');
return;
}
// Add file to processed set
processedFiles.add(fileId);
done();
},
addedfiles: function(files) {
const validFiles = Array.from(files).filter(file => {
// Generate a unique ID for this file
const fileId = file.name + '_' + file.size;
// Only count files that haven't been rejected
return !file.rejected;
});
uploadQueue += validFiles.length;
uploadBatch = validFiles;
if (validFiles.length > 0) showLoadingOverlay();
},
error: function(file, response) {
// Remove file from processed list on error
const fileId = file.name + '_' + file.size;
processedFiles.delete(fileId);
handleUploadComplete(file, false, response.message);
},
success: function(file, response) {
@@ -333,7 +359,14 @@
},
init: function() {
// var myDropzone = this;
const dz = this;
// Clear processed files when all uploads complete
this.on("queuecomplete", function() {
processedFiles.clear();
});
// Load existing photos
loadExistingPhotos(this, paramName);
}

View File

@@ -280,6 +280,14 @@
<div class="card-body w-full">
@include('lpj::component.detail-jaminan', ['status' => true])
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
<label class="form-label font-medium max-w-56">Nomor NIB</label>
<div class="flex flex-wrap items-baseline w-full">
<input type="text" name="nomor_nib" class="input w-full" value="{{ isset($forminspeksi['asset']['nomor_nib']) ? $forminspeksi['asset']['nomor_nib'] : '' }}"
placeholder="Masukkan Nomor NIB">
</div>
</div>
<div class=" mx-auto rounded-lg overflow-hidden">
<div class="py-4 ">
<h1 class="text-md font-medium text-gray-900">Hubungan cadeb/debitur dengan Pemilik Jaminan</h1>

View File

@@ -424,9 +424,11 @@
<table>
@if (@isset($dokumen))
@foreach ($dokumen->detail as $detail)
<tr>
@if (isset($detail->dokumen_jaminan))
@if (isset($detail->dokumen_jaminan))
<tr>
<td width="25%"><strong>{{ $detail->name ?? '' }}</strong></td>
</tr>
<tr>
<td>
@if (isset($detail->dokumen_jaminan))
@php
@@ -449,27 +451,28 @@
@endforeach
@endif
</td>
@endif
</tr>
</tr>
@endif
<tr>
@if (isset($detail->details))
@if (json_decode($detail->details))
@foreach (json_decode($detail->details) as $key => $value)
@if (!is_null($value) && $value !== '')
<td style=" padding: 2px;">{{ ucwords(str_replace('_', ' ', $key)) ?? '' }}
@if (isset($detail->details))
@if (json_decode($detail->details))
@foreach (json_decode($detail->details) as $key => $value)
@if (!is_null($value) && $value !== '')
<tr>
<td style="padding: 2px;">
{{ ucwords(str_replace('_', ' ', $key)) ?? '' }}
</td>
<td style=" padding: 2px;">{{ $value }}
<td style="padding: 2px;">
{{ $value }}
@if ($key == 'luas_bangunan' || $key == 'luas_tanah')
<sup>m2</sup>
@endif
</td>
@endif
@endforeach
@endif
</tr>
@endif
@endforeach
@endif
</tr>
@endif
@endforeach
@endif