mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Refactor for PDF Slot
This commit is contained in:
parent
487ca15749
commit
909d9ed9df
@ -63,7 +63,11 @@ class PdfSlot extends Component
|
||||
|
||||
public function getPdf()
|
||||
{
|
||||
// $this->pdf = $this->entity->fullscreenPdfViewer($this->invitation);
|
||||
|
||||
if(!$this->invitation){
|
||||
$this->entity->service()->createInvitations();
|
||||
$this->invitation = $this->entity->invitations()->first();
|
||||
}
|
||||
|
||||
$blob = [
|
||||
'entity_type' => $this->resolveEntityType(),
|
||||
|
@ -25,7 +25,7 @@
|
||||
</div>
|
||||
|
||||
@include('portal.ninja2020.components.entity-documents', ['entity' => $credit])
|
||||
@livewire('pdf-slot', ['entity' => $credit, 'invitation' => $invitation, 'db' => $invitation->company->db])
|
||||
@livewire('pdf-slot', ['entity' => $credit, 'invitation' => $invitation, 'db' => $credit->company->db])
|
||||
|
||||
@endsection
|
||||
|
||||
|
@ -95,7 +95,7 @@
|
||||
@endif
|
||||
|
||||
@include('portal.ninja2020.components.entity-documents', ['entity' => $invoice])
|
||||
@livewire('pdf-slot', ['entity' => $invoice, 'invitation' => $invitation, 'db' => $invitation->company->db])
|
||||
@livewire('pdf-slot', ['entity' => $invoice, 'invitation' => $invitation, 'db' => $invoice->company->db])
|
||||
|
||||
@endsection
|
||||
|
||||
|
@ -46,7 +46,7 @@
|
||||
@endif
|
||||
|
||||
@include('portal.ninja2020.components.entity-documents', ['entity' => $purchase_order])
|
||||
@livewire('pdf-slot', ['entity' => $purchase_order, 'invitation' => $invitation, 'db' => $invitation->company->db])
|
||||
@livewire('pdf-slot', ['entity' => $purchase_order, 'invitation' => $invitation, 'db' => $purchase_order->company->db])
|
||||
|
||||
@endsection
|
||||
|
||||
|
@ -100,7 +100,7 @@
|
||||
@endif
|
||||
|
||||
@include('portal.ninja2020.components.entity-documents', ['entity' => $quote])
|
||||
@livewire('pdf-slot', ['entity' => $quote, 'invitation' => $invitation, 'db' => $invitation->company->db])
|
||||
@livewire('pdf-slot', ['entity' => $quote, 'invitation' => $invitation, 'db' => $quote->company->db])
|
||||
|
||||
@endsection
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user