Added pdf shown logic in part validation error
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s

This commit is contained in:
dhanabalan
2026-12-01 15:31:24 +05:30
parent bd37d224d5
commit 13017082b6

View File

@@ -13,7 +13,7 @@
</div>
@endif --}}
@if ($getState())
{{-- @if ($getState())
<div class="p-4 text-center">
<img src="{{ $getState() }}?v={{ time() }}"
onerror="this.onerror=null; this.src='{{ asset('images/not-found.png') }}'"
@@ -26,6 +26,52 @@
class="rounded shadow mx-auto"
style="width: 200px; height: 200px; object-fit: contain;" />
</div>
@endif --}}
@if ($getState())
@php
$url = $getState() . '?v=' . time();
$extension = strtolower(
pathinfo(parse_url($getState(), PHP_URL_PATH), PATHINFO_EXTENSION)
);
@endphp
<div class="p-4 text-center">
@if ($extension === 'pdf')
<iframe
src="{{ $url }}"
width="100%"
height="400px"
style="border: 1px solid #ddd; border-radius: 8px;">
</iframe>
@else
<img
src="{{ $url }}"
onerror="this.onerror=null; this.src='{{ asset('images/not-found.png') }}'"
class="rounded shadow mx-auto"
style="width: 200px; height: 200px; object-fit: contain;"
/>
@endif
</div>
@else
<div class="p-4 text-center">
<img
src="{{ asset('images/not-found.png') }}"
class="rounded shadow mx-auto"
style="width: 200px; height: 200px; object-fit: contain;"
/>
</div>
@endif