Add PDF preview feature and improve permohonan management
Introduced a "Preview" button for jaminan documents to view PDFs directly. Refactored Permohonan management to include a show view and print functionality, and updated relevant views and routes accordingly.
This commit is contained in:
@@ -96,28 +96,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal for PDF viewing -->
|
||||
<div id="pdfModal" class="fixed inset-0 bg-gray-800 bg-opacity-75 flex items-center justify-center hidden w-full">
|
||||
<div class="bg-white rounded-lg overflow-hidden shadow-xl transform transition-all min-w-3xl w-[1500px] h-[1200px]">
|
||||
<div class="p-4 h-full">
|
||||
<button onclick="closePDFModal()" class="float-right text-2xl">
|
||||
<i class="ki-filled ki-cross-square text-red-600"></i>
|
||||
</button>
|
||||
<div id="pdfViewer" class="h-full"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('scripts')
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.3.0/pdfobject.min.js"></script>
|
||||
<script>
|
||||
function viewPDF(url) {
|
||||
PDFObject.embed(url, "#pdfViewer");
|
||||
document.getElementById('pdfModal').classList.remove('hidden');
|
||||
}
|
||||
|
||||
function closePDFModal() {
|
||||
document.getElementById('pdfModal').classList.add('hidden');
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
@include('lpj::component.pdfviewer')
|
||||
|
||||
Reference in New Issue
Block a user