fix(pemohon/survey): penambahan resedule di awal pemohon dan resedule suveyor, dan perbaikkan tolak paparan, dan perbaikkan struktur foto
This commit is contained in:
@@ -46,36 +46,24 @@
|
||||
|
||||
/* Media Print */
|
||||
@media print {
|
||||
.photo-item {
|
||||
width: 48%;
|
||||
margin-right: 2%;
|
||||
float: left;
|
||||
padding: 5px;
|
||||
box-sizing: border-box;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.photo-item img {
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
object-fit: contain;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 5px;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.photo-container {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.photo-row {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
td {
|
||||
vertical-align: top;
|
||||
text-align: center;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
.photo-image {
|
||||
width: auto;
|
||||
height: 400px;
|
||||
max-height: 400px;
|
||||
}
|
||||
.page-break {
|
||||
page-break-after: always;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@isset($basicData['foto'])
|
||||
@@ -93,6 +81,8 @@
|
||||
@if ($groupedPhotos->isEmpty())
|
||||
<p class="text-gray-500">Tidak ada foto yang tersedia.</p>
|
||||
@else
|
||||
|
||||
|
||||
@foreach ($mainPhotos as $category => $photos)
|
||||
@php
|
||||
$groupedBySubcategory = $photos->groupBy('sub');
|
||||
@@ -100,142 +90,77 @@
|
||||
|
||||
@foreach ($groupedBySubcategory as $subcategory => $subPhotos)
|
||||
@if (count($subPhotos) > 0)
|
||||
<table width="100%" border="0" style="align-content: center; text-align: center">
|
||||
<tr>
|
||||
@if (count($subPhotos) === 1)
|
||||
@php
|
||||
$item = $subPhotos->first();
|
||||
$imagePath = storage_path('app/public/' . $item['path']);
|
||||
@endphp
|
||||
<td style="width: 100%; vertical-align: top; text-align: center" colspan="2"
|
||||
class="photo-item border">
|
||||
<p style="font-weight: medium; font-size: 10px">{{ $category }} -
|
||||
|
||||
@isset($subcategory)
|
||||
@if (trim($subcategory) !== '')
|
||||
{{ $subcategory }} -
|
||||
@endif
|
||||
@endisset
|
||||
|
||||
{{ $item['name'] ?? '' }}
|
||||
</p>
|
||||
@if ($statusLpj || file_exists($imagePath))
|
||||
<img src="{{ $imagePath }}" alt="{{ $item['path'] }}" class="photo-image"
|
||||
style="width: 100%; max-width: 300px;">
|
||||
@endif
|
||||
@isset($item['description'])
|
||||
<p style="font-size:9px">{{ $item['description'] }}</p>
|
||||
@endisset
|
||||
</td>
|
||||
@else
|
||||
@foreach ($subPhotos as $index => $item)
|
||||
@foreach ($subPhotos->chunk(2) as $chunkedPhotos)
|
||||
<table width="100%" border="0" style="align-content: center; text-align: center; margin-bottom: 20px">
|
||||
@foreach ($chunkedPhotos as $item)
|
||||
@php
|
||||
$imagePath = storage_path('app/public/' . $item['path']);
|
||||
@endphp
|
||||
<td style="width: 50%; vertical-align: top; text-align: center"
|
||||
class="photo-item border">
|
||||
<tr>
|
||||
<td style="width: 100%; padding: 10px;" class="photo-item border">
|
||||
<p style="font-weight: medium; font-size: 10px">{{ $category }} -
|
||||
|
||||
@isset($subcategory)
|
||||
@if (trim($subcategory) !== '')
|
||||
{{ $subcategory }} -
|
||||
@endif
|
||||
@endisset
|
||||
|
||||
{{ $item['name'] ?? '' }}
|
||||
</p>
|
||||
@if ($statusLpj || file_exists($imagePath))
|
||||
<img src="{{ $imagePath }}" alt="{{ $item['path'] }}" class="photo-image"
|
||||
style="width: 100%; max-width: 300px;">
|
||||
<img src="{{ $imagePath }}" alt="{{ $item['path'] }}" class="photo-image">
|
||||
@endif
|
||||
@isset($item['description'])
|
||||
<p style="font-size:9px">{{ $item['description'] }}</p>
|
||||
@endisset
|
||||
</td>
|
||||
@if (($index + 1) % 2 == 0)
|
||||
</tr>
|
||||
<tr>
|
||||
</tr>
|
||||
@endforeach
|
||||
@if (count($chunkedPhotos) < 2)
|
||||
<tr style="width: 100%;"></tr>
|
||||
@endif
|
||||
</table>
|
||||
<div class="page-break"></div>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
@if (count($subPhotos) % 2 != 0)
|
||||
<td style="width: 50%;"></td>
|
||||
@endif
|
||||
@endif
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
@endforeach
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
<div class="page-break"></div>
|
||||
|
||||
@if (!$otherPhotos->isEmpty())
|
||||
@foreach ($otherPhotos->groupBy('sub') as $subcategory => $subPhotos)
|
||||
@if (count($subPhotos) > 0)
|
||||
<table width="100%" border="0" style="align-content: center; text-align: center">
|
||||
<tr>
|
||||
@if (count($subPhotos) === 1)
|
||||
@php
|
||||
$item = $subPhotos->first();
|
||||
$imagePath = storage_path('app/public/' . $item['path']);
|
||||
@endphp
|
||||
<td style="width: 100%; vertical-align: top; text-align: center" colspan="2"
|
||||
class="photo-item border">
|
||||
<p style="font-weight: medium; font-size: 10px">Lainnya -
|
||||
|
||||
@isset($subcategory)
|
||||
@if (trim($subcategory) !== '')
|
||||
{{ $subcategory }} -
|
||||
@endif
|
||||
@endisset
|
||||
|
||||
{{ $item['name'] ?? '' }}
|
||||
</p>
|
||||
@if ($statusLpj || file_exists($imagePath))
|
||||
<img src="{{ $imagePath }}" alt="{{ $item['path'] }}" class="photo-image"
|
||||
style="width: 100%; max-width: 300px;">
|
||||
@endif
|
||||
@isset($item['description'])
|
||||
<p style="font-size:9px">{{ $item['description'] }}</p>
|
||||
@endisset
|
||||
</td>
|
||||
@else
|
||||
@foreach ($subPhotos as $index => $item)
|
||||
@php
|
||||
$imagePath = storage_path('app/public/' . $item['path']);
|
||||
@endphp
|
||||
<td style="width: 50%; vertical-align: top; text-align: center" class="photo-item border">
|
||||
<p style="font-weight: medium; font-size: 10px">Lainnya -
|
||||
|
||||
@isset($subcategory)
|
||||
@if (trim($subcategory) !== '')
|
||||
{{ $subcategory }} -
|
||||
@endif
|
||||
@endisset
|
||||
|
||||
{{ $item['name'] ?? '' }}
|
||||
</p>
|
||||
@if ($statusLpj || file_exists($imagePath))
|
||||
<img src="{{ $imagePath }}" alt="{{ $item['path'] }}" class="photo-image"
|
||||
style="width: 100%; max-width: 300px;">
|
||||
@endif
|
||||
@isset($item['description'])
|
||||
<p style="font-size:9px">{{ $item['description'] }}</p>
|
||||
@endisset
|
||||
</td>
|
||||
@if (($index + 1) % 2 == 0)
|
||||
</tr>
|
||||
<tr>
|
||||
@endif
|
||||
@endforeach
|
||||
@if (count($subPhotos) % 2 != 0)
|
||||
<td style="width: 50%;"></td>
|
||||
|
||||
@if (!$otherPhotos->isEmpty())
|
||||
@foreach ($otherPhotos->groupBy('sub') as $subcategory => $subPhotos)
|
||||
@if (count($subPhotos) > 0)
|
||||
@foreach ($subPhotos->chunk(2) as $chunkedPhotos)
|
||||
<table width="100%" border="0" style="align-content: center; text-align: center; margin-bottom: 20px">
|
||||
@foreach ($chunkedPhotos as $item)
|
||||
@php
|
||||
$imagePath = storage_path('app/public/' . $item['path']);
|
||||
@endphp
|
||||
<tr>
|
||||
<td style="width: 100%; padding: 10px;" class="photo-item border">
|
||||
<p style="font-weight: medium; font-size: 10px">Lainnya -
|
||||
@isset($subcategory)
|
||||
@if (trim($subcategory) !== '')
|
||||
{{ $subcategory }} -
|
||||
@endif
|
||||
@endisset
|
||||
{{ $item['name'] ?? '' }}
|
||||
</p>
|
||||
@if ($statusLpj || file_exists($imagePath))
|
||||
<img src="{{ $imagePath }}" alt="{{ $item['path'] }}" class="photo-image">
|
||||
@endif
|
||||
@isset($item['description'])
|
||||
<p style="font-size:9px">{{ $item['description'] }}</p>
|
||||
@endisset
|
||||
</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@if (count($chunkedPhotos) < 2)
|
||||
<tr style="width: 100%;"></tr>
|
||||
@endif
|
||||
</table>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endif
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endisset
|
||||
|
||||
|
||||
Reference in New Issue
Block a user