1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Remove references to file paths

This commit is contained in:
David Bomba 2023-07-26 13:13:16 +10:00
parent 47ba507c1b
commit adc72af6ff
8 changed files with 6 additions and 47 deletions

View File

@ -49,10 +49,6 @@ class EntityViewController extends Controller
->with('contact.client')
->firstOrFail();
// $invitation = $invitation_entity::whereRaw('BINARY `key`= ?', [$invitation_key])
// ->with('contact.client')
// ->firstOrFail();
$contact = $invitation->contact;
$client = $contact->client;
$entity = $invitation->{$entity_type};

View File

@ -1,13 +1,3 @@
@php
//$mobile = stripos(request()->server('HTTP_USER_AGENT'), 'Android') || stripos(request()->server('HTTP_USER_AGENT'), 'iPhone') || stripos(request()->server('HTTP_USER_AGENT'), 'iPod') || stripos(request()->server('HTTP_USER_AGENT'), 'iPad');
$mobile = false;
@endphp
@push('head')
<!-- <meta name="pdf-url" content="{{ $url ?? $entity->pdf_file_path($invitation, 'url', true) }}?cache_buster={{time()}}">
<script src="{{ asset('js/vendor/pdf.js/pdf.min.js') }}"></script> -->
@endpush
<div class="flex items-center justify-between mt-4">
<section class="flex items-center">
<div class="items-center" style="{{ $mobile ? '' : 'display: none' }}" id="pagination-button-container">
@ -56,15 +46,7 @@
</section>
</div>
<!-- @if($mobile)
<div class="w-full h-full overflow-auto mt-4">
<canvas id="pdf-placeholder" class="shadow rounded-lg bg-white"></canvas>
</div>
@else -->
@livewire('pdf-slot', ['entity' => $entity, 'invitation' => $invitation, 'db' => $invitation->company->db])
<!-- <iframe id="pdf-iframe" src="{{ $url ?? $entity->pdf_file_path($invitation, 'url', true) }}?cache_buster={{time()}}" class="h-screen w-full border-0 mt-4"></iframe> -->
<!-- @endif -->
@if($mobile)
@push('footer')

View File

@ -1,3 +1 @@
<iframe src="{{ $credit->fullscreenPdfViewer($invitation) }}" style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"></iframe>
<!-- <iframe src="{{ $credit->pdf_file_path(null, 'url', true) }}" style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"></iframe> -->
<iframe src="{{ $credit->fullscreenPdfViewer($invitation) }}" style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"></iframe>

View File

@ -1,13 +1,6 @@
@extends('portal.ninja2020.layout.app')
@section('meta_title', ctrans('texts.view_credit'))
@push('head')
<meta name="pdf-url" content="{{ $credit->pdf_file_path(null, 'url', true) }}">
@include('portal.ninja2020.components.no-cache')
<script src="{{ asset('js/vendor/pdf.js/pdf.min.js') }}"></script>
@endpush
@section('body')
<div class="bg-white shadow sm:rounded-lg mb-4" translate>
<div class="px-4 py-5 sm:p-6">
@ -31,8 +24,8 @@
</div>
</div>
@include('portal.ninja2020.components.entity-documents', ['entity' => $credit])
@livewire('pdf-slot', ['entity' => $credit, 'invitation' => $invitation, 'db' => $invitation->company->db])
@include('portal.ninja2020.components.entity-documents', ['entity' => $credit])
@livewire('pdf-slot', ['entity' => $credit, 'invitation' => $invitation, 'db' => $invitation->company->db])
@endsection

View File

@ -1,2 +1 @@
<iframe src="{{ $invoice->fullscreenPdfViewer($invitation) }}" style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"></iframe>
<!-- <iframe src="{{ $invoice->pdf_file_path($invitation, 'url', true) }}" style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"></iframe> -->
<iframe src="{{ $invoice->fullscreenPdfViewer($invitation) }}" style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"></iframe>

View File

@ -1,2 +1 @@
<iframe src="{{ $purchase_order->fullscreenPdfViewer($invitation) }}" style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"></iframe>
<!-- <iframe src="{{ $purchase_order->pdf_file_path($invitation, 'url', true) }}" style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"></iframe> -->
<iframe src="{{ $purchase_order->fullscreenPdfViewer($invitation) }}" style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"></iframe>

View File

@ -1,3 +1 @@
<iframe src="{{ $quote->fullscreenPdfViewer($invitation) }}" style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"></iframe>
<!-- <iframe src="{{ $quote->pdf_file_path(null,'url',true) }}" style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"></iframe> -->
<iframe src="{{ $quote->fullscreenPdfViewer($invitation) }}" style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"></iframe>

View File

@ -2,15 +2,9 @@
@section('meta_title', ctrans('texts.entity_number_placeholder', ['entity' => ctrans('texts.quote'), 'entity_number' => $quote->number]))
@push('head')
<meta name="pdf-url" content="{{ asset($quote->pdf_file_path(null, 'url', true)) }}">
<script src="{{ asset('js/vendor/pdf.js/pdf.min.js') }}"></script>
<meta name="show-quote-terms" content="{{ $settings->show_accept_quote_terms ? true : false }}">
<meta name="require-quote-signature" content="{{ $client->company->account->hasFeature(\App\Models\Account::FEATURE_INVOICE_SETTINGS) && $settings->require_quote_signature }}">
<meta name="accept-user-input" content="{{ $client->getSetting('accept_client_input_quote_approval') }}">
@include('portal.ninja2020.components.no-cache')
<script src="{{ asset('vendor/signature_pad@2.3.2/signature_pad.min.js') }}"></script>
@endpush