Add PDF viewer and Permohonan details views
Created a PDF viewer component with modal functionality using PDFObject library. Added detailed views for Permohonan and Print pages, displaying relevant information about permohonan requests and debenture details.
This commit is contained in:
25
resources/views/component/pdfviewer.blade.php
Normal file
25
resources/views/component/pdfviewer.blade.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<!-- 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
|
||||
Reference in New Issue
Block a user