fix(surveyor): perbaikkan foto dan print out hasil inspeksi
This commit is contained in:
@@ -30,8 +30,9 @@
|
||||
|
||||
/* Image Styling */
|
||||
.photo-item img {
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
width: auto;
|
||||
height: 400px;
|
||||
max-height: 400px;
|
||||
object-fit: contain;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 5px;
|
||||
@@ -46,24 +47,27 @@
|
||||
|
||||
/* Media Print */
|
||||
@media print {
|
||||
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;
|
||||
}
|
||||
}
|
||||
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'])
|
||||
@@ -81,8 +85,6 @@
|
||||
@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');
|
||||
@@ -91,12 +93,13 @@
|
||||
@foreach ($groupedBySubcategory 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>
|
||||
<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">{{ $category }} -
|
||||
@isset($subcategory)
|
||||
@@ -114,10 +117,10 @@
|
||||
@endisset
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@if (count($chunkedPhotos) < 2)
|
||||
<tr style="width: 100%;"></tr>
|
||||
@endif
|
||||
@endforeach
|
||||
@if (count($chunkedPhotos) < 2)
|
||||
<tr style="width: 100%;"></tr>
|
||||
@endif
|
||||
</table>
|
||||
<div class="page-break"></div>
|
||||
@endforeach
|
||||
@@ -129,12 +132,13 @@
|
||||
@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>
|
||||
<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)
|
||||
@@ -151,7 +155,7 @@
|
||||
<p style="font-size:9px">{{ $item['description'] }}</p>
|
||||
@endisset
|
||||
</td>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</tr>
|
||||
@if (count($chunkedPhotos) < 2)
|
||||
<tr style="width: 100%;"></tr>
|
||||
@@ -163,4 +167,3 @@
|
||||
@endif
|
||||
@endif
|
||||
@endisset
|
||||
|
||||
|
||||
Reference in New Issue
Block a user