fix: tampilan detail laporan, dan ganti route print out, penambahan service
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
|
||||
/* Image Styling */
|
||||
.photo-item img {
|
||||
display: block;
|
||||
margin: auto;
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
@@ -97,13 +99,14 @@
|
||||
style="align-content: center; text-align: center; margin-bottom: 20px">
|
||||
@foreach ($chunkedPhotos as $item)
|
||||
@php
|
||||
$filePath = $statusLpj == 1 ? storage_path('app/public/' . $item['path']) : asset('storage/' . $item['path']);
|
||||
$filePath = asset('storage/' . $item['path']);
|
||||
$extension = strtolower(pathinfo($item['path'], PATHINFO_EXTENSION));
|
||||
$isImage = in_array($extension, ['jpg', 'jpeg', 'png', 'gif']);
|
||||
$isPdf = $extension === 'pdf';
|
||||
@endphp
|
||||
<tr>
|
||||
<td style="width: 100%; padding: 10px; text-align: center" class="photo-item border" >
|
||||
<td style="width: 100%; padding: 10px; align-content: center; text-align: center" class="photo-item border " >
|
||||
<p style="font-weight: medium; font-size: 10px">{{ $category }} -
|
||||
@isset($subcategory)
|
||||
@if (trim($subcategory) !== '')
|
||||
@@ -114,14 +117,14 @@
|
||||
</p>
|
||||
@if ($statusLpj || file_exists(public_path('storage/' . $item['path'])))
|
||||
@if ($isImage)
|
||||
<img src="{{ $filePath }}" alt="{{ $item['path'] }}" class="photo-image" style="text-align: center;">
|
||||
<img src="{{ $filePath }}" alt="{{ $item['path'] }}" class="photo-image" style="align-content: center; text-align: center;">
|
||||
@elseif ($isPdf)
|
||||
<a href="{{ $filePath }}" download="{{ basename($filePath) }}" style="font-size:12px; color:#1a73e8; text-decoration: underline;">
|
||||
⬇️ Unduh File PDF
|
||||
</a>
|
||||
@else
|
||||
<a href="{{ $filePath }}" download="{{ basename($filePath) }}" style="font-size:12px; color:#1a73e8; text-decoration: underline;">
|
||||
⬇️ Unduh File
|
||||
⬇️ Unduh File
|
||||
</a>
|
||||
@endif
|
||||
@endif
|
||||
@@ -149,7 +152,8 @@
|
||||
style="align-content: center; text-align: center; margin-bottom: 20px">
|
||||
@foreach ($chunkedPhotos as $item)
|
||||
@php
|
||||
$filePath = asset('storage/' . $item['path']);
|
||||
$filePath = $statusLpj == 1 ? storage_path('app/public/' . $item['path']) : asset('storage/' . $item['path']);
|
||||
|
||||
$extension = strtolower(pathinfo($item['path'], PATHINFO_EXTENSION));
|
||||
$isPdf = $extension === 'pdf';
|
||||
@endphp
|
||||
|
||||
Reference in New Issue
Block a user