Files
qds/resources/views/filament/pages/sticker-structure-preview-page.blade.php
dhanabalan 44ed90354d
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Successful in 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Laravel Larastan / larastan (pull_request) Failing after 2m21s
Laravel Pint / pint (pull_request) Failing after 2m19s
Added sticker structure preview page blade file
2025-12-23 17:29:49 +05:30

70 lines
2.9 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<x-filament-panels::page>
<div class="space-y-4">
{{-- Form --}}
<div class="space-y-4">
{{ $this->filtersForm($this->form) }}
</div>
{{-- Preview Button --}}
<div class="flex flex-row gap-2 mt-4">
<button
type="button"
wire:click="showPreview"
class="px-3 py-1 border border-primary-500 text-primary-600 rounded hover:bg-primary-50 hover:border-primary-700 transition text-sm"
>
Show Preview
</button>
</div>
{{-- PDF Preview --}}
{{-- @if($this->pdfPreview)
<div class="mt-6">
<h3 class="text-lg font-medium text-gray-900">Preview</h3>
<div class="mt-2 border rounded overflow-hidden bg-white">
<embed
src="data:application/pdf;base64,{{ $this->pdfPreview }}"
type="application/pdf"
width="100%"
height="600px"
class="bg-gray-50"
/>
</div>
</div>
@endif --}}
{{-- PDF Preview with Fallback --}}
@if($this->pdfPreview)
<div class="mt-6">
<h3 class="text-lg font-medium text-gray-900">Sticker Preview</h3>
<div class="mt-2 border rounded overflow-hidden bg-gray-50">
<object
data="data:application/pdf;base64,{{ $this->pdfPreview }}"
type="application/pdf"
width="100%"
height="600"
style="min-height: 600px;"
>
<p class="p-4 text-red-600 bg-white border border-red-200 rounded">
<strong>⚠️ Your browser cannot display PDFs inline.</strong><br>
Dont worry you can still:
</p>
<div class="p-4 bg-white">
<!-- Fallback: Provide a download link -->
<a
href="data:application/pdf;base64,{{ $this->pdfPreview }}"
download="sticker_preview.pdf"
class="inline-flex items-center px-4 py-2 bg-primary-600 text-white text-sm font-medium rounded hover:bg-primary-700"
>
📥 Download PDF Preview
</a>
<p class="mt-2 text-sm text-gray-600">
Or try opening this page in Chrome, Edge, or Firefox.
</p>
</div>
</object>
</div>
</div>
@endif
</div>
</x-filament-panels::page>