Файловый менеджер - Редактировать - /home/clickysoft/public_html/somni.clickysoft.net/resources/views/landlord/lease_detail.blade.php
Назад
@extends('landlord.layouts.landlord') @section('title', 'Landlord Dashboard - SOMNI') @section('links') <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" /> @endsection @section('content') <div class="db-backdrop"></div> <div class="main-section"> <x-landlord-side-nav /> <main class="layout-main"> <div class="content-wrapper"> <section class="profile-edit p-0"> <div class="container-fluid custom-container"> <div class="row "> <div class="col-md-12"> <div class="main-db-layout"> <div class="row vh-100"> <div class="col-md-8"> <div class="pdf-d-head"> <input type="hidden" id="document_path" value="{{ ($lease->status == 0) ? asset('/storage/'.$lease->template->document_path) : asset('/storage/'.$lease->document_path) }}" /> <h4>{{basename($lease->document_path)}}</h4> <div class="view-pdf-cta"> <a href="{{ ($lease->status == 0) ? asset('/storage/'.$lease->template->document_path) : asset('/storage/'.$lease->document_path) }}" target="_blank" class="vpf-btn"> View PDF </a> </div> </div> <div class="recipient-box lease_detail"> <div class="recipient-head"> <h4>Recipients </h4> </div> <div class="rcp-details"> <div class="rcp-user"> @if ($lease->status == 1) <div class="rp-green-thum"> <img src="{{asset('/images/rp-green-check.svg')}}" alt="" class="img-fluid"> </div> @endif <div class="rp-dt-content"> <h6>{{$lease->tenant->name ?? ''}}</h6> <p>{{$lease->tenant->email ?? ''}}</p> </div> </div> <div class="rcp-user-details"> <div class="rp-dt-content"> <h6>Sent For Signing</h6> <p>Sent {{date('M. j, Y', strtotime($lease->created_at))}}</p> </div> </div> </div> @if ($lease->status == 1) <div class="rcp-details"> <div class="rcp-user"> <div class="rp-green-thum"><img src="{{asset('/images/rp-green-check.svg')}}" alt="" class="img-fluid"></div> <div class="rp-dt-content"> <h6>{{$lease->tenant->name ?? ''}}</h6> <p>{{$lease->tenant->email ?? ''}}</p> </div> </div> <div class="rcp-user-details"> <div class="rp-dt-content"> <h6>Signed & Received</h6> <p>{{date('M. j, Y', strtotime($lease->updated_at))}}</p> </div> </div> </div> @endif </div> <div class="auctor-box"> <div class="auctor-head"> <div class="auctro-title"> <h4>Print or download</h4> <div class="file-print"> <button id="download_pdf_btn" type="button" class="revert-btn"><img src="{{asset('/images/fle.svg')}}" alt="" class="img-fluid"></button> <button id="print_pdf_btn" type="button" class="revert-btn"><img src="{{asset('/images/prnter.svg')}}" alt="" class="img-fluid"></button> </div> </div> </div> <div class="email-copy-cta"> <button type="button" class="email-copy-btn" id="copy_email"> <input type="hidden" id="tenant_email" value="{{$lease->tenant->email}}" /> <img src="{{asset('/images/bl-env.svg')}}" alt="" class="img-fluid"> Email Copy </button> </div> </div> </div> <div class="col-md-4"> <div class="pdf-listing-rail"> <div class="rail-head"> <h5>{{basename($lease->document_path)}}</h5> <p>Pages: <span id="total_page_count">0</span></p> </div> <div class="rail-pdf-thumb-main"> {{-- <div class="rail-pdf-thumb"> <a href="somni.pdf" target="_blank"> <img class="w-100" data-pdf-thumbnail-file="{{asset('/storage/'.$lease->document_path)}}" data-pdf-thumbnail-width="209" width="209" data-pdf-thumbnail-height="152" height="152" src="{{asset('/images/pdf.png')}}"> </a> <div class="pdf-count"> <p>1 of 12</p> </div> </div> --}} </div> </div> </div> </div> </div> </div> </div> </section> </main> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script src="https://www.gstatic.com/firebasejs/8.3.2/firebase.js"></script> <script src="https://www.gstatic.com/firebasejs/8.3.2/firebase-messaging.js"></script> <link href="https://cdn.jsdelivr.net/npm/sweetalert2@11.7.27/dist/sweetalert2.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.7.27/dist/sweetalert2.all.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script> <script src="{{asset('/js/global.js')}}"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.4.456/pdf.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.4.456/pdf.worker.js"></script> <script src="{{asset('/js/pdfThumbnails.js')}}" data-pdfjs-src="pdf.js/build/pdf.js"></script> <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js"></script> @if(!empty($verification)) <x-email-verification-popup :verification=$verification /> @endif <script> $(document).ready(async function () { // var pdfUrl = $('#document_path').val(); // var railPdfThumbMain = $('.rail-pdf-thumb-main'); // pdfjsLib.getDocument(pdfUrl).promise.then(function(pdf) { // var totalPages = pdf.numPages; // $('#total_page_count').html(totalPages); // // Loop through all pages // for (var pageNumber = 1; pageNumber <= totalPages; pageNumber++) { // // Fetch each page // console.log('This is the loop number: ',pageNumber); // pdf.getPage(pageNumber).then(function(page) { // console.log(page._pageIndex); // var viewport = page.getViewport({ scale: 1.0 }); // var canvas = document.createElement('canvas'); // var context = canvas.getContext('2d'); // canvas.height = viewport.height; // canvas.width = viewport.width; // var renderContext = { // canvasContext: context, // viewport: viewport // }; // var renderTask = page.render(renderContext); // renderTask.promise.then(function() { // // Create and append HTML for each page // var railPdfThumb = $('<div class="rail-pdf-thumb">'); // var pdfCount = $('<div class="pdf-count">').html('<p>' + (page._pageIndex + 1) + ' of ' + totalPages + '</p>'); // var pdfLink = $('<a>').attr('href', pdfUrl + '#page=' + (page._pageIndex + 1)).attr('target', '_blank'); // var pdfImage = $('<img>').addClass('w-100').attr('data-pdf-thumbnail-file', pdfUrl) // .attr('data-pdf-thumbnail-width', '209').attr('width', '209') // .attr('data-pdf-thumbnail-height', '152').attr('height', '152') // .attr('src', canvas.toDataURL()); // Set the image source to the canvas content // pdfLink.append(pdfImage); // railPdfThumb.append(pdfLink).append(pdfCount); // // Append the created HTML to the container // railPdfThumbMain.append(railPdfThumb); // // console.log('This is the page number: ',page.pageNumber); // }); // }); // } // }); var pdfUrl = $('#document_path').val(); var railPdfThumbMain = $('.rail-pdf-thumb-main'); try { const pdf = await pdfjsLib.getDocument(pdfUrl).promise; const totalPages = pdf.numPages; $('#total_page_count').html(totalPages); // Loop through all pages for (let pageNumber = 1; pageNumber <= totalPages; pageNumber++) { // Fetch each page // console.log('This is the loop number: ', pageNumber); const page = await pdf.getPage(pageNumber); // console.log(page._pageIndex); const viewport = page.getViewport({ scale: 1.0 }); const canvas = document.createElement('canvas'); const context = canvas.getContext('2d'); canvas.height = viewport.height; canvas.width = viewport.width; const renderContext = { canvasContext: context, viewport: viewport }; const renderTask = page.render(renderContext); await renderTask.promise; // Create and append HTML for each page const railPdfThumb = $('<div class="rail-pdf-thumb">'); const pdfCount = $('<div class="pdf-count">').html('<p>' + (page._pageIndex + 1) + ' of ' + totalPages + '</p>'); const pdfLink = $('<a>').attr('href', pdfUrl + '#page=' + (page._pageIndex + 1)).attr('target', '_blank'); const pdfImage = $('<img>').addClass('w-100').attr('data-pdf-thumbnail-file', pdfUrl) .attr('data-pdf-thumbnail-width', '209').attr('width', '209') .attr('data-pdf-thumbnail-height', '152').attr('height', '152') .attr('src', canvas.toDataURL()); // Set the image source to the canvas content pdfLink.append(pdfImage); railPdfThumb.append(pdfLink).append(pdfCount); // Append the created HTML to the container railPdfThumbMain.append(railPdfThumb); } } catch (error) { console.error('Error loading PDF:', error); } $('#copy_email').on('click',function(){ var emailInput = document.getElementById('tenant_email'); emailInput.select(); // emailInput.setSelectionRange(0, 99999); /* For mobile devices */ // Copy the text to the clipboard navigator.clipboard.writeText(emailInput.value); document.execCommand('copy'); // Show an alert // alert('Email copied to clipboard!'); toastr.options = { "closeButton": true, "debug": false, "newestOnTop": false, "progressBar": false, "positionClass": "toast-top-right", "preventDuplicates": false, "onclick": null, "showDuration": "300", "hideDuration": "1000", "timeOut": "5000", "extendedTimeOut": "1000", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" } toastr.success('Email copied to clipboard!'); }); $('#print_pdf_btn').on('click',function(){ // Get the PDF path from the input field var pdfPath = document.getElementById('document_path').value; // Open the PDF in a new window var pdfWindow = window.open(pdfPath, '_blank'); // Check if the window is opened successfully if (pdfWindow) { // Wait for a short time before triggering the print dialog setTimeout(function() { pdfWindow.print(); }, 1000); } else { // Handle the case where the window couldn't be opened alert('Failed to open the PDF. Please check the path.'); } }); $('#download_pdf_btn').on('click',function(){ // Get the PDF path from the input field var pdfPath = document.getElementById('document_path').value; // Create a hidden link element var link = document.createElement('a'); link.href = pdfPath; link.download = 'downloaded_file.pdf'; // You can set the desired file name here link.style.display = 'none'; // Append the link to the document document.body.appendChild(link); // Trigger a click on the link to start the download link.click(); // Remove the link from the document document.body.removeChild(link); }); }); </script> <script src="{{asset('/js/lease.js')}}"></script> @if(\Session::has('success')) <script> toastr.options = { "closeButton": true, "debug": false, "newestOnTop": false, "progressBar": false, "positionClass": "toast-top-right", "preventDuplicates": false, "onclick": null, "showDuration": "300", "hideDuration": "1000", "timeOut": "5000", "extendedTimeOut": "1000", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" } toastr.success('{!! \Session::get("success") !!}'); </script> @endif @if(\Session::has('error')) <script> toastr.options = { "closeButton": true, "debug": false, "newestOnTop": false, "progressBar": false, "positionClass": "toast-top-right", "preventDuplicates": false, "onclick": null, "showDuration": "300", "hideDuration": "1000", "timeOut": "5000", "extendedTimeOut": "1000", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" } toastr.error('{!! \Session::get("error") !!}'); </script> @endif @endsection
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка