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
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user