mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Ensure correct PDF is displayed to the contact
This commit is contained in:
parent
496da291d8
commit
a2b8d57313
@ -1 +1 @@
|
||||
5.5.15
|
||||
6
|
@ -35,6 +35,7 @@ class CreditController extends Controller
|
||||
$data = [
|
||||
'credit' => $credit,
|
||||
'key' => $invitation ? $invitation->key : false,
|
||||
'invitation' => $invitation
|
||||
];
|
||||
|
||||
if ($invitation && auth()->guard('contact') && ! request()->has('silent') && ! $invitation->viewed_date) {
|
||||
|
@ -69,6 +69,7 @@ class InvoiceController extends Controller
|
||||
|
||||
$data = [
|
||||
'invoice' => $invoice,
|
||||
'invitation' => $invitation,
|
||||
'key' => $invitation ? $invitation->key : false,
|
||||
];
|
||||
|
||||
|
@ -61,6 +61,7 @@ class QuoteController extends Controller
|
||||
$data = [
|
||||
'quote' => $quote,
|
||||
'key' => $invitation ? $invitation->key : false,
|
||||
'invitation' => $invitation
|
||||
];
|
||||
|
||||
if ($invitation && auth()->guard('contact') && ! request()->has('silent') && ! $invitation->viewed_date) {
|
||||
|
@ -99,6 +99,7 @@ class PurchaseOrderController extends Controller
|
||||
'settings' => $purchase_order->company->settings,
|
||||
'sidebar' => $this->sidebarMenu(),
|
||||
'company' => $purchase_order->company,
|
||||
'invitation' => $invitation
|
||||
];
|
||||
|
||||
if ($request->query('mode') === 'fullscreen') {
|
||||
|
@ -28,17 +28,17 @@ class QuotesTable extends Component
|
||||
|
||||
public $company;
|
||||
|
||||
public $sort_field = 'status_id'; // Default sortBy. Feel free to change or pull from client/company settings.
|
||||
public $sort = 'status_id'; // Default sortBy. Feel free to change or pull from client/company settings.
|
||||
|
||||
public $sort_asc = true;
|
||||
|
||||
public function sortBy($field)
|
||||
{
|
||||
$this->sort_field === $field
|
||||
$this->sort === $field
|
||||
? $this->sort_asc = ! $this->sort_asc
|
||||
: $this->sort_asc = true;
|
||||
|
||||
$this->sort_field = $field;
|
||||
$this->sort = $field;
|
||||
}
|
||||
|
||||
public function mount()
|
||||
@ -51,7 +51,7 @@ class QuotesTable extends Component
|
||||
|
||||
$query = Quote::query()
|
||||
->with('client.gateway_tokens', 'company', 'client.contacts')
|
||||
->orderBy($this->sort_field, $this->sort_asc ? 'asc' : 'desc');
|
||||
->orderBy($this->sort, $this->sort_asc ? 'asc' : 'desc');
|
||||
|
||||
if (count($this->status) > 0) {
|
||||
|
||||
|
@ -14,8 +14,8 @@ return [
|
||||
'require_https' => env('REQUIRE_HTTPS', true),
|
||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
||||
'app_version' => '5.5.15',
|
||||
'app_tag' => '5.5.15',
|
||||
'app_version' => '5.5.16',
|
||||
'app_tag' => '5.5.16',
|
||||
'minimum_client_version' => '5.0.16',
|
||||
'terms_version' => '1.0.1',
|
||||
'api_secret' => env('API_SECRET', ''),
|
||||
|
@ -3,7 +3,7 @@
|
||||
@endphp
|
||||
|
||||
@push('head')
|
||||
<meta name="pdf-url" content="{{ $url ?? $entity->pdf_file_path(null, 'url', true) }}?cache_buster={{time()}}">
|
||||
<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
|
||||
|
||||
@ -86,7 +86,7 @@
|
||||
<canvas id="pdf-placeholder" class="shadow rounded-lg bg-white"></canvas>
|
||||
</div>
|
||||
@else
|
||||
<iframe id="pdf-iframe" src="{{ $url ?? $entity->pdf_file_path(null, 'url', true) }}?cache_buster={{time()}}" class="h-screen w-full border-0 mt-4"></iframe>
|
||||
<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
|
||||
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
@include('portal.ninja2020.components.entity-documents', ['entity' => $credit])
|
||||
|
||||
@include('portal.ninja2020.components.pdf-viewer', ['entity' => $credit])
|
||||
@include('portal.ninja2020.components.pdf-viewer', ['entity' => $credit, 'invitation' => $invitation])
|
||||
|
||||
|
||||
@endsection
|
||||
|
@ -1,2 +1,2 @@
|
||||
<iframe src="{{ $invoice->pdf_file_path(null, 'url', true) }}"
|
||||
<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>
|
||||
|
@ -96,7 +96,7 @@
|
||||
@endif
|
||||
|
||||
@include('portal.ninja2020.components.entity-documents', ['entity' => $invoice])
|
||||
@include('portal.ninja2020.components.pdf-viewer', ['entity' => $invoice])
|
||||
@include('portal.ninja2020.components.pdf-viewer', ['entity' => $invoice, 'invitation' => $invitation])
|
||||
@include('portal.ninja2020.invoices.includes.terms', ['entities' => [$invoice], 'entity_type' => ctrans('texts.invoice')])
|
||||
@include('portal.ninja2020.invoices.includes.signature')
|
||||
@endsection
|
||||
|
@ -46,7 +46,7 @@
|
||||
@endif
|
||||
|
||||
@include('portal.ninja2020.components.entity-documents', ['entity' => $purchase_order])
|
||||
@include('portal.ninja2020.components.pdf-viewer', ['entity' => $purchase_order])
|
||||
@include('portal.ninja2020.components.pdf-viewer', ['entity' => $purchase_order, 'invitation' => $invitation])
|
||||
@include('portal.ninja2020.invoices.includes.terms', ['entities' => [$purchase_order], 'entity_type' => ctrans('texts.purchase_order')])
|
||||
@include('portal.ninja2020.invoices.includes.signature')
|
||||
@endsection
|
||||
|
@ -105,7 +105,7 @@
|
||||
@endif
|
||||
|
||||
@include('portal.ninja2020.components.entity-documents', ['entity' => $quote])
|
||||
@include('portal.ninja2020.components.pdf-viewer', ['entity' => $quote])
|
||||
@include('portal.ninja2020.components.pdf-viewer', ['entity' => $quote, 'invitation' => $invitation])
|
||||
@include('portal.ninja2020.invoices.includes.terms', ['entities' => [$quote], 'entity_type' => ctrans('texts.quote')])
|
||||
@include('portal.ninja2020.invoices.includes.signature')
|
||||
@endsection
|
||||
|
Loading…
x
Reference in New Issue
Block a user