fix: perbaikkan tampilan dan print out lpj setalah migrate db old ke db new
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Tanggal Survey</label>
|
||||
<div class="flex flex-wrap items-base line w-full">
|
||||
<p class="text-2sm text-gray-700">{{ $permohonan->created_at->format('d/m/Y') }}</p>
|
||||
<p class="text-2sm text-gray-700"> {{ $permohonan->created_at ? $permohonan->created_at->format('d/m/Y') : '' }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -81,10 +81,12 @@
|
||||
</div>
|
||||
@php
|
||||
use Modules\Usermanagement\Models\User;
|
||||
$cabangUser = User::where('id', $permohonan->user->id)->first();
|
||||
$cabangUser = null;
|
||||
|
||||
if ($permohonan->user) {
|
||||
$cabangUser = User::where('id', $permohonan->user->id)->first();
|
||||
}
|
||||
// print_r($cabangUser->sign);
|
||||
|
||||
@endphp
|
||||
@endsection
|
||||
|
||||
@@ -95,122 +97,122 @@
|
||||
console.log(datas);
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const signaturePads = {};
|
||||
const types = ['penilai', 'cabang', 'debitur', 'kjpp'];
|
||||
const types = ['penilai', 'cabang', 'debitur', 'kjpp'];
|
||||
|
||||
// Initialize all signature pads
|
||||
types.forEach(type => initSignaturePad(type));
|
||||
// Initialize all signature pads
|
||||
types.forEach(type => initSignaturePad(type));
|
||||
|
||||
function initSignaturePad(type) {
|
||||
const canvas = document.getElementById(`signature-pad-${type}`);
|
||||
if (!canvas) return;
|
||||
function initSignaturePad(type) {
|
||||
const canvas = document.getElementById(`signature-pad-${type}`);
|
||||
if (!canvas) return;
|
||||
|
||||
// Improved canvas sizing with strict boundary control
|
||||
function resizeCanvas() {
|
||||
const container = canvas.closest('.signature-pad-container');
|
||||
const containerWidth = container.clientWidth;
|
||||
// Improved canvas sizing with strict boundary control
|
||||
function resizeCanvas() {
|
||||
const container = canvas.closest('.signature-pad-container');
|
||||
const containerWidth = container.clientWidth;
|
||||
|
||||
// Set canvas style dimensions
|
||||
canvas.style.width = '100%';
|
||||
canvas.style.height = `${containerWidth * 0.5}px`; // 2:1 aspect ratio
|
||||
// Set canvas style dimensions
|
||||
canvas.style.width = '100%';
|
||||
canvas.style.height = `${containerWidth * 0.5}px`; // 2:1 aspect ratio
|
||||
|
||||
// Set actual canvas dimensions with high DPI support
|
||||
const ratio = window.devicePixelRatio || 1;
|
||||
canvas.width = containerWidth * ratio;
|
||||
canvas.height = (containerWidth * 0.5) * ratio;
|
||||
// Set actual canvas dimensions with high DPI support
|
||||
const ratio = window.devicePixelRatio || 1;
|
||||
canvas.width = containerWidth * ratio;
|
||||
canvas.height = (containerWidth * 0.5) * ratio;
|
||||
|
||||
// Scale canvas context
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.scale(ratio, ratio);
|
||||
// Scale canvas context
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.scale(ratio, ratio);
|
||||
|
||||
// Clear and redraw existing signature if any
|
||||
if (signaturePads[type] && !signaturePads[type].isEmpty()) {
|
||||
const signaturePad = signaturePads[type];
|
||||
const imageData = signaturePad.toData();
|
||||
signaturePad.clear();
|
||||
signaturePad.fromData(imageData);
|
||||
}
|
||||
}
|
||||
|
||||
// Create signature pad with boundary and scaling control
|
||||
const signaturePad = new SignaturePad(canvas, {
|
||||
backgroundColor: 'rgba(255, 255, 255, 0)',
|
||||
penColor: 'rgb(0, 0, 0)',
|
||||
minWidth: 0.5,
|
||||
maxWidth: 2.5,
|
||||
throttle: 16,
|
||||
dotSize: 2,
|
||||
|
||||
// Custom function to control signature drawing
|
||||
onBegin: (event) => {
|
||||
const ctx = canvas.getContext('2d');
|
||||
const rect = canvas.getBoundingClientRect();
|
||||
const scaleX = canvas.width / rect.width;
|
||||
const scaleY = canvas.height / rect.height;
|
||||
|
||||
// Ensure drawing stays within canvas
|
||||
if (
|
||||
event.clientX < rect.left ||
|
||||
event.clientX > rect.right ||
|
||||
event.clientY < rect.top ||
|
||||
event.clientY > rect.bottom
|
||||
) {
|
||||
return false;
|
||||
// Clear and redraw existing signature if any
|
||||
if (signaturePads[type] && !signaturePads[type].isEmpty()) {
|
||||
const signaturePad = signaturePads[type];
|
||||
const imageData = signaturePad.toData();
|
||||
signaturePad.clear();
|
||||
signaturePad.fromData(imageData);
|
||||
}
|
||||
}
|
||||
|
||||
// Create signature pad with boundary and scaling control
|
||||
const signaturePad = new SignaturePad(canvas, {
|
||||
backgroundColor: 'rgba(255, 255, 255, 0)',
|
||||
penColor: 'rgb(0, 0, 0)',
|
||||
minWidth: 0.5,
|
||||
maxWidth: 2.5,
|
||||
throttle: 16,
|
||||
dotSize: 2,
|
||||
|
||||
// Custom function to control signature drawing
|
||||
onBegin: (event) => {
|
||||
const ctx = canvas.getContext('2d');
|
||||
const rect = canvas.getBoundingClientRect();
|
||||
const scaleX = canvas.width / rect.width;
|
||||
const scaleY = canvas.height / rect.height;
|
||||
|
||||
// Ensure drawing stays within canvas
|
||||
if (
|
||||
event.clientX < rect.left ||
|
||||
event.clientX > rect.right ||
|
||||
event.clientY < rect.top ||
|
||||
event.clientY > rect.bottom
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
signaturePads[type] = signaturePad;
|
||||
|
||||
// Initial resize
|
||||
resizeCanvas();
|
||||
|
||||
// Load existing signature
|
||||
if (type === 'penilai' || type === 'cabang') {
|
||||
loadPenilaiAndCabangSignature(type, signaturePad);
|
||||
} else {
|
||||
loadSignature(type, signaturePad);
|
||||
}
|
||||
|
||||
// Add event listeners
|
||||
addEventListeners(type, signaturePad);
|
||||
|
||||
// Add resize listener
|
||||
window.addEventListener('resize', () => {
|
||||
resizeCanvas();
|
||||
});
|
||||
}
|
||||
});
|
||||
signaturePads[type] = signaturePad;
|
||||
|
||||
// Initial resize
|
||||
resizeCanvas();
|
||||
function drawSignature(signaturePad, imageUrl) {
|
||||
const image = new Image();
|
||||
image.crossOrigin = 'Anonymous';
|
||||
image.onload = function() {
|
||||
const ctx = signaturePad.canvas.getContext('2d');
|
||||
const canvasWidth = signaturePad.canvas.width;
|
||||
const canvasHeight = signaturePad.canvas.height;
|
||||
|
||||
// Load existing signature
|
||||
if (type === 'penilai' || type === 'cabang') {
|
||||
loadPenilaiAndCabangSignature(type, signaturePad);
|
||||
} else {
|
||||
loadSignature(type, signaturePad);
|
||||
}
|
||||
// Clear previous content
|
||||
ctx.clearRect(0, 0, canvasWidth, canvasHeight);
|
||||
|
||||
// Add event listeners
|
||||
addEventListeners(type, signaturePad);
|
||||
// Calculate scaling to fit within canvas while maintaining aspect ratio
|
||||
const scale = Math.min(
|
||||
canvasWidth / image.width,
|
||||
canvasHeight / image.height
|
||||
);
|
||||
|
||||
// Add resize listener
|
||||
window.addEventListener('resize', () => {
|
||||
resizeCanvas();
|
||||
});
|
||||
}
|
||||
const scaledWidth = image.width * scale;
|
||||
const scaledHeight = image.height * scale;
|
||||
|
||||
function drawSignature(signaturePad, imageUrl) {
|
||||
const image = new Image();
|
||||
image.crossOrigin = 'Anonymous';
|
||||
image.onload = function() {
|
||||
const ctx = signaturePad.canvas.getContext('2d');
|
||||
const canvasWidth = signaturePad.canvas.width;
|
||||
const canvasHeight = signaturePad.canvas.height;
|
||||
// Center the image
|
||||
const x = (canvasWidth - scaledWidth) / 2;
|
||||
const y = (canvasHeight - scaledHeight) / 2;
|
||||
|
||||
// Clear previous content
|
||||
ctx.clearRect(0, 0, canvasWidth, canvasHeight);
|
||||
|
||||
// Calculate scaling to fit within canvas while maintaining aspect ratio
|
||||
const scale = Math.min(
|
||||
canvasWidth / image.width,
|
||||
canvasHeight / image.height
|
||||
);
|
||||
|
||||
const scaledWidth = image.width * scale;
|
||||
const scaledHeight = image.height * scale;
|
||||
|
||||
// Center the image
|
||||
const x = (canvasWidth - scaledWidth) / 2;
|
||||
const y = (canvasHeight - scaledHeight) / 2;
|
||||
|
||||
// Draw the scaled and centered image
|
||||
ctx.drawImage(image, x, y, scaledWidth, scaledHeight);
|
||||
};
|
||||
image.onerror = function() {
|
||||
console.error('Error loading signature image');
|
||||
};
|
||||
image.src = imageUrl;
|
||||
}
|
||||
// Draw the scaled and centered image
|
||||
ctx.drawImage(image, x, y, scaledWidth, scaledHeight);
|
||||
};
|
||||
image.onerror = function() {
|
||||
console.error('Error loading signature image');
|
||||
};
|
||||
image.src = imageUrl;
|
||||
}
|
||||
|
||||
function addEventListeners(type, signaturePad) {
|
||||
document.getElementById(`save-${type}`)?.addEventListener('click', () => saveSignature(type,
|
||||
@@ -237,7 +239,7 @@
|
||||
(type === 'penilai' ?
|
||||
`{{ asset('storage/signatures/' . Auth::user()->id . '/' . Auth::user()->sign) }}` :
|
||||
(type === 'cabang' ?
|
||||
`{{ asset('storage/signatures/' . $cabangUser->id . '/' . $cabangUser->sign) }}` :
|
||||
`{{ asset('storage/signatures/' . $cabangUser?->id . '/' . $cabangUser?->sign) }}` :
|
||||
'')) :
|
||||
signaturePad.toDataURL('image/png', 1.0); // Use full quality
|
||||
|
||||
@@ -332,13 +334,13 @@
|
||||
} else {
|
||||
const signUrl = type === 'penilai' ?
|
||||
`{{ asset('storage/signatures/' . Auth::user()->id . '/' . Auth::user()->sign) }}` :
|
||||
`{{ asset('storage/signatures/' . $cabangUser->id . '/' . $cabangUser->sign) }}`;
|
||||
`{{ asset('storage/signatures/' . $cabangUser?->id . '/' . $cabangUser?->sign) }}`;
|
||||
|
||||
drawSignature(signaturePad, signUrl);
|
||||
|
||||
const defaultName = type === 'penilai' ?
|
||||
`{{ Auth::user()->name }}` :
|
||||
`{{ $cabangUser->name }}`;
|
||||
`{{ $cabangUser?->name }}`;
|
||||
if (nameInputElement) {
|
||||
nameInputElement.value = defaultName;
|
||||
}
|
||||
@@ -362,7 +364,7 @@
|
||||
(type === 'penilai' ?
|
||||
`{{ asset('storage/signatures/' . Auth::user()->id . '/' . Auth::user()->sign) }}` :
|
||||
(type === 'cabang' ?
|
||||
`{{ asset('storage/signatures/' . $cabangUser->id . '/' . $cabangUser->sign) }}` :
|
||||
`{{ asset('storage/signatures/' . $cabangUser?->id . '/' . $cabangUser?->sign) }}` :
|
||||
'')) :
|
||||
signaturePad.toDataURL('image/png');
|
||||
|
||||
@@ -519,17 +521,17 @@
|
||||
const formData = new FormData(form);
|
||||
|
||||
const fotoFields = [
|
||||
'foto_gistaru',
|
||||
'foto_bhumi',
|
||||
'foto_argis_region',
|
||||
'foto_tempat',
|
||||
'foto_sentuh_tanahku',
|
||||
'upload_gs'
|
||||
];
|
||||
'foto_gistaru',
|
||||
'foto_bhumi',
|
||||
'foto_argis_region',
|
||||
'foto_tempat',
|
||||
'foto_sentuh_tanahku',
|
||||
'upload_gs'
|
||||
];
|
||||
|
||||
fotoFields.forEach((field) => {
|
||||
formData.delete(field);
|
||||
});
|
||||
fotoFields.forEach((field) => {
|
||||
formData.delete(field);
|
||||
});
|
||||
$.ajax({
|
||||
url: '{{ route('surveyor.store') }}',
|
||||
type: 'POST',
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@if (!empty($forminspeksi['fakta']['rute_menuju']))
|
||||
<tr>
|
||||
<td width="20%" style="vertical-align: top;">Rute Munuju</td>
|
||||
<td width="1%" style="vertical-align: top;">:</td>
|
||||
@@ -62,8 +62,11 @@
|
||||
<p>{{ $forminspeksi['fakta']['rute_menuju'] ?? '' }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
|
||||
@if (!empty($forminspeksi['fakta']['batas_batas_input']))
|
||||
|
||||
<tr>
|
||||
<td width="20%" style="vertical-align: top;">Batas Batas </td>
|
||||
<td width="1%" style="vertical-align: top;">:</td>
|
||||
@@ -71,13 +74,15 @@
|
||||
|
||||
|
||||
@foreach ($forminspeksi['fakta']['batas_batas_input'] ?? [] as $arah => $batas)
|
||||
@if ($batas)
|
||||
<p> - {{ $arah }} : {{ $batas }}</p>
|
||||
@endif
|
||||
@if ($batas)
|
||||
<p> - {{ $arah }} : {{ $batas }}</p>
|
||||
@endif
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if (!empty($forminspeksi['fakta']['kondisi_lingkungan']))
|
||||
<tr>
|
||||
<td width="20%" style="vertical-align: top;">Kondisi lain terkait lingkungan </td>
|
||||
<td width="1%" style="vertical-align: top;">:</td>
|
||||
@@ -89,6 +94,9 @@
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if (!empty($forminspeksi['fakta']['kondisi_lain_bangunan']))
|
||||
<tr>
|
||||
<td width="20%" style="vertical-align: top;">Kondisi lain terkait Bangunan </td>
|
||||
<td width="1%" style="vertical-align: top;">:</td>
|
||||
@@ -99,6 +107,8 @@
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if (!empty($forminspeksi['fakta']['informasi_dokument']))
|
||||
<tr>
|
||||
<td width="20%" style="vertical-align: top;">Informasi Terkait Dokumen </td>
|
||||
<td width="1%" style="vertical-align: top;">:</td>
|
||||
@@ -110,7 +120,7 @@
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
Jakarta {{ formatTanggalIndonesia($permohonan->penilaian->waktu_penilaian) }}
|
||||
{{ $permohonan->debiture->branch->name ?? '' }} {{ formatTanggalIndonesia($permohonan->penilaian->waktu_penilaian) }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -1,103 +1,108 @@
|
||||
<div class="no-break" >
|
||||
<table
|
||||
style="width: 100%; border: 1px solid #000; border-collapse: collapse; ">
|
||||
<tr>
|
||||
<td style="text-align: center; margin-top: 5px;">
|
||||
<h2 style="text-transform: uppercase; text-align: center; margin: 0;">Informasi Dinas Tata Ruang</h2>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
@php
|
||||
$informasi = [
|
||||
'peruntukan',
|
||||
'kdb',
|
||||
'kdh',
|
||||
'gsb',
|
||||
'max_lantai',
|
||||
'klb',
|
||||
'gss',
|
||||
'pelebaran_jalan',
|
||||
'nama_petugas',
|
||||
];
|
||||
|
||||
$fotoTypes = [
|
||||
'upload_gs',
|
||||
'foto_sentuh_tanahku',
|
||||
'foto_gistaru',
|
||||
'foto_bhumi',
|
||||
'foto_argis_region',
|
||||
'foto_tempat',
|
||||
];
|
||||
|
||||
<tr>
|
||||
<td width="20%" style="vertical-align: top;">Informasi Dinas Tata Ruang </td>
|
||||
<td width="1%" style="vertical-align: top;">:</td>
|
||||
<td style="vertical-align: top;">
|
||||
@php
|
||||
$informasi = [
|
||||
'peruntukan',
|
||||
'kdb',
|
||||
'kdh',
|
||||
'gsb',
|
||||
'max_lantai',
|
||||
'klb',
|
||||
'gss',
|
||||
'pelebaran_jalan',
|
||||
'nama_petugas',
|
||||
];
|
||||
@endphp
|
||||
$customLabels = [
|
||||
'upload_gs' => 'Gambar Situasi',
|
||||
'foto_sentuh_tanahku' => 'Sentuh Tanahku',
|
||||
'foto_gistaru' => 'Gistaru',
|
||||
'foto_bhumi' => 'Bhumi',
|
||||
'foto_argis_region' => 'Blad Tata Ruang ',
|
||||
'foto_tempat' => 'Peta Lokasi',
|
||||
];
|
||||
|
||||
@foreach ($informasi as $key)
|
||||
@if (isset($forminspeksi['fakta'][$key]) && $forminspeksi['fakta'][$key] !== '-')
|
||||
@php
|
||||
$displayKey = ucfirst(str_replace('_', ' ', $key));
|
||||
if (strlen($key) == 3) {
|
||||
$displayKey = strtoupper($key);
|
||||
}
|
||||
@endphp
|
||||
<p> - {{ $displayKey }}: {{ $forminspeksi['fakta'][$key] }}</p>
|
||||
@endif
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
// Periksa apakah ada informasi dinas tata ruang yang valid
|
||||
$hasInformasi = collect($informasi)->some(fn($key) => isset($forminspeksi['fakta'][$key]) && $forminspeksi['fakta'][$key] !== '-');
|
||||
|
||||
@php
|
||||
$fotoTypes = [
|
||||
'upload_gs',
|
||||
'foto_sentuh_tanahku',
|
||||
'foto_gistaru',
|
||||
'foto_bhumi',
|
||||
'foto_argis_region',
|
||||
'foto_tempat',
|
||||
];
|
||||
// Periksa apakah ada foto yang valid
|
||||
$hasValidPhotos = collect($fotoTypes)->some(function ($type) use ($forminspeksi) {
|
||||
$imagePath = $forminspeksi[$type] ?? null;
|
||||
return $imagePath && file_exists(storage_path('app/public/' . $imagePath));
|
||||
});
|
||||
|
||||
$customLabels = [
|
||||
'upload_gs' => 'Gambar Situasi',
|
||||
'foto_sentuh_tanahku' => 'Sentuh Tanahku',
|
||||
'foto_gistaru' => 'Gistaru',
|
||||
'foto_bhumi' => 'Bhumi',
|
||||
'foto_argis_region' => 'Blad Tata Ruang ',
|
||||
'foto_tempat' => 'Peta Lokasi',
|
||||
];
|
||||
// Memindahkan foto_tempat ke depan jika ada
|
||||
if (($key = array_search('upload_gs', $fotoTypes)) !== false) {
|
||||
unset($fotoTypes[$key]);
|
||||
array_unshift($fotoTypes, 'upload_gs');
|
||||
}
|
||||
// Filter fotoTypes untuk memastikan hanya yang memiliki imagePath valid
|
||||
$validPhotoTypes = array_filter($fotoTypes, function ($type) use ($forminspeksi) {
|
||||
return isset($forminspeksi[$type]) && !empty($forminspeksi[$type]) && is_string($forminspeksi[$type]);
|
||||
});
|
||||
@endphp
|
||||
@foreach ($validPhotoTypes as $type)
|
||||
@php
|
||||
$imagePath = $forminspeksi[$type] ?? null;
|
||||
$imageUrl = is_string($imagePath) ? asset('storage/' . $imagePath) : null;
|
||||
// Periksa apakah ada catatan yang perlu diperhatikan
|
||||
$hasNotes = !empty($forminspeksi['fakta']['keterangan'] ?? []);
|
||||
@endphp
|
||||
|
||||
@endphp
|
||||
@if ($imagePath && file_exists(storage_path('app/public/' . $imagePath)))
|
||||
@if ($hasInformasi || $hasValidPhotos || $hasNotes)
|
||||
<div class="no-break">
|
||||
<table style="width: 100%; border: 1px solid #000; border-collapse: collapse;">
|
||||
<tr>
|
||||
<td style="text-align: center; margin-top: 5px;">
|
||||
<h2 style="text-transform: uppercase; text-align: center; margin: 0;">Informasi Dinas Tata Ruang</h2>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
@if ($hasInformasi)
|
||||
<tr>
|
||||
<td style="20%"> {{ $customLabels[$type] ?? '' }}</td>
|
||||
<td width="1%" style="vertical-align: top;"></td>
|
||||
<td style="width: 79%">
|
||||
<img src="{{ storage_path('app/public/' . $imagePath) }}" alt="{{ $imageUrl }}"
|
||||
style="max-height: 400px; height: auto; max-width: 100%;">
|
||||
<td width="20%" style="vertical-align: top;">Informasi Dinas Tata Ruang</td>
|
||||
<td width="1%" style="vertical-align: top;">:</td>
|
||||
<td style="vertical-align: top;">
|
||||
@foreach ($informasi as $key)
|
||||
@if (isset($forminspeksi['fakta'][$key]) && $forminspeksi['fakta'][$key] !== '-')
|
||||
@php
|
||||
$displayKey = ucfirst(str_replace('_', ' ', $key));
|
||||
if (strlen($key) == 3) {
|
||||
$displayKey = strtoupper($key);
|
||||
}
|
||||
@endphp
|
||||
<p>- {{ $displayKey }}: {{ $forminspeksi['fakta'][$key] }}</p>
|
||||
@endif
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
<tr>
|
||||
<td width="20%" style="vertical-align: top;">Catatan yang Perlu Diperhatikan </td>
|
||||
<td width="1%" style="vertical-align: top;">:</td>
|
||||
<td style="vertical-align: top;">
|
||||
|
||||
@foreach ($forminspeksi['fakta']['keterangan'] ?? [] as $informasi)
|
||||
<p>{!! nl2br(e($informasi)) !!}</p>
|
||||
@if ($hasValidPhotos)
|
||||
@foreach ($fotoTypes as $type)
|
||||
@php
|
||||
$imagePath = $forminspeksi[$type] ?? null;
|
||||
$imageUrl = is_string($imagePath) ? asset('storage/' . $imagePath) : null;
|
||||
@endphp
|
||||
@if ($imagePath && file_exists(storage_path('app/public/' . $imagePath)))
|
||||
<tr>
|
||||
<td style="20%"> {{ $customLabels[$type] ?? '' }}</td>
|
||||
<td width="1%" style="vertical-align: top;"></td>
|
||||
<td style="width: 79%">
|
||||
<img src="{{ storage_path('app/public/' . $imagePath) }}" alt="{{ $imageUrl }}"
|
||||
style="max-height: 400px; height: auto; max-width: 100%;">
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
@if ($hasNotes)
|
||||
<tr>
|
||||
<td width="20%" style="vertical-align: top;">Catatan yang Perlu Diperhatikan</td>
|
||||
<td width="1%" style="vertical-align: top;">:</td>
|
||||
<td style="vertical-align: top;">
|
||||
@foreach ($forminspeksi['fakta']['keterangan'] ?? [] as $informasi)
|
||||
<p>{!! nl2br(e($informasi)) !!}</p>
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -69,22 +69,26 @@
|
||||
<tr>
|
||||
@foreach ($basicData['laluLintasLokasi'] as $index => $item)
|
||||
@if ($index % 3 == 0 && $index > 0)
|
||||
</tr>
|
||||
<tr>
|
||||
@endif
|
||||
<td class="checkbox-item">
|
||||
<label class="checkbox-label">
|
||||
<input type="checkbox"
|
||||
{{ isset($forminspeksi['lingkungan']['lalu_lintas'])
|
||||
&& is_array($forminspeksi['lingkungan']['lalu_lintas'])
|
||||
&& in_array($item->name, $forminspeksi['lingkungan']['lalu_lintas'])
|
||||
? 'checked' : '' }}>
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
<tr>
|
||||
</table>
|
||||
@endif
|
||||
<td class="checkbox-item">
|
||||
<label class="checkbox-label">
|
||||
<input type="checkbox"
|
||||
{{ isset($forminspeksi['lingkungan']['lalu_lintas']) && in_array($item->name, $forminspeksi['lingkungan']['lalu_lintas']) ? 'checked' : '' }}>
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="vertical-align: top;">Golongan Masyarakat Sekitar</td>
|
||||
|
||||
@@ -255,12 +255,19 @@
|
||||
<td style="width: 1%; padding: 2px; vertical-align: top;">:</td>
|
||||
<td style="vertical-align: top; padding: 2px;">
|
||||
@if (isset($forminspeksi['asset']['debitur_perwakilan']) && !empty($forminspeksi['asset']['debitur_perwakilan']))
|
||||
@foreach ($forminspeksi['asset']['debitur_perwakilan'] as $key => $item)
|
||||
<p style="margin: 0; padding:0;">
|
||||
{{ $item }}
|
||||
</p>
|
||||
@endforeach
|
||||
@endif
|
||||
@if (is_array($forminspeksi['asset']['debitur_perwakilan']))
|
||||
@foreach ($forminspeksi['asset']['debitur_perwakilan'] as $key => $item)
|
||||
<p style="margin: 0; padding:0;">
|
||||
{{ $item }}
|
||||
</p>
|
||||
@endforeach
|
||||
@else
|
||||
<p style="margin: 0; padding:0;">
|
||||
{{ $forminspeksi['asset']['debitur_perwakilan'] }}
|
||||
</p>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -383,12 +390,13 @@
|
||||
<td style="width: 25%; padding: 2px; vertical-align: top;">Titik Kordinat</td>
|
||||
<td style="width: 1%; vertical-align: top;">:</td>
|
||||
<td style="vertical-align: top; width: 79%;">
|
||||
{{ isset($forminspeksi['asset']['kordinat_lat']) ? $forminspeksi['asset']['kordinat_lat'] : '' }}
|
||||
{{ isset($forminspeksi['asset']['kordinat_lat']) && !empty($forminspeksi['asset']['kordinat_lat']) ? $forminspeksi['asset']['kordinat_lat'] : '-' }}
|
||||
,
|
||||
{{ isset($forminspeksi['asset']['kordinat_lng']) ? $forminspeksi['asset']['kordinat_lng'] : '' }}
|
||||
{{ isset($forminspeksi['asset']['kordinat_lng']) && !empty($forminspeksi['asset']['kordinat_lng']) ? $forminspeksi['asset']['kordinat_lng'] : '-' }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="no-break" >
|
||||
<table
|
||||
style="width: 100%; border: 1px solid #000; border-collapse: collapse; ">
|
||||
|
||||
Reference in New Issue
Block a user