mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Improve the performance of PDF viewing when PDF file size is very large
This commit is contained in:
parent
a4a03cc3ed
commit
b8bc92deb0
@ -11,22 +11,29 @@
|
||||
|
||||
namespace App\Http\Controllers\ClientPortal;
|
||||
|
||||
use App\Events\Invoice\InvoiceWasViewed;
|
||||
use App\Events\Misc\InvitationWasViewed;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\ClientPortal\Invoices\ProcessInvoicesInBulkRequest;
|
||||
use App\Http\Requests\ClientPortal\Invoices\ShowInvoiceRequest;
|
||||
use App\Http\Requests\ClientPortal\Invoices\ShowInvoicesRequest;
|
||||
use App\Models\Invoice;
|
||||
use App\Utils\Ninja;
|
||||
use App\Utils\Number;
|
||||
use App\Utils\Traits\MakesDates;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use App\Models\Invoice;
|
||||
use Illuminate\View\View;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\QuoteInvitation;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use App\Models\CreditInvitation;
|
||||
use App\Utils\Traits\MakesDates;
|
||||
use App\Models\InvoiceInvitation;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use App\Models\PurchaseOrderInvitation;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use App\Events\Invoice\InvoiceWasViewed;
|
||||
use App\Events\Misc\InvitationWasViewed;
|
||||
use App\Models\RecurringInvoiceInvitation;
|
||||
use App\Jobs\Vendor\CreatePurchaseOrderPdf;
|
||||
use App\Http\Requests\ClientPortal\Invoices\ShowInvoiceRequest;
|
||||
use App\Http\Requests\ClientPortal\Invoices\ShowInvoicesRequest;
|
||||
use App\Http\Requests\ClientPortal\Invoices\ProcessInvoicesInBulkRequest;
|
||||
|
||||
class InvoiceController extends Controller
|
||||
{
|
||||
@ -77,6 +84,31 @@ class InvoiceController extends Controller
|
||||
return $this->render('invoices.show', $data);
|
||||
}
|
||||
|
||||
public function showBlob($hash)
|
||||
{
|
||||
$data = Cache::pull($hash);
|
||||
|
||||
match($data['entity_type']){
|
||||
'invoice' => $invitation = InvoiceInvitation::withTrashed()->find($data['invitation_id']),
|
||||
'quote' => $invitation = QuoteInvitation::withTrashed()->find($data['invitation_id']),
|
||||
'credit' => $invitation = CreditInvitation::withTrashed()->find($data['invitation_id']),
|
||||
'recurring_invoice' => $invitation = RecurringInvoiceInvitation::withTrashed()->find($data['invitation_id']),
|
||||
};
|
||||
|
||||
$file = (new \App\Jobs\Entity\CreateRawPdf($invitation, $invitation->company->db))->handle();
|
||||
|
||||
// $headers = ['Content-Type' => 'application/pdf'];
|
||||
// $entity_string = $data['entity_type'];
|
||||
// $file_name = $invitation->{$entity_string}->numberFormatter().'.pdf';
|
||||
// return response()->streamDownload(function () use ($file) {
|
||||
// echo $file;
|
||||
// }, $file_name, $headers);
|
||||
|
||||
$headers = ['Content-Type' => 'application/pdf'];
|
||||
return response()->make($file, 200, $headers);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Pay one or more invoices.
|
||||
*
|
||||
|
@ -11,21 +11,24 @@
|
||||
|
||||
namespace App\Http\Controllers\VendorPortal;
|
||||
|
||||
use App\Events\Misc\InvitationWasViewed;
|
||||
use App\Events\PurchaseOrder\PurchaseOrderWasAccepted;
|
||||
use App\Events\PurchaseOrder\PurchaseOrderWasViewed;
|
||||
use App\Utils\Ninja;
|
||||
use Illuminate\View\View;
|
||||
use App\Models\PurchaseOrder;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use App\Utils\Traits\MakesDates;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\VendorPortal\PurchaseOrders\ProcessPurchaseOrdersInBulkRequest;
|
||||
use App\Jobs\Invoice\InjectSignature;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use App\Models\PurchaseOrderInvitation;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use App\Events\Misc\InvitationWasViewed;
|
||||
use App\Jobs\Vendor\CreatePurchaseOrderPdf;
|
||||
use App\Events\PurchaseOrder\PurchaseOrderWasViewed;
|
||||
use App\Events\PurchaseOrder\PurchaseOrderWasAccepted;
|
||||
use App\Http\Requests\VendorPortal\PurchaseOrders\ShowPurchaseOrderRequest;
|
||||
use App\Http\Requests\VendorPortal\PurchaseOrders\ShowPurchaseOrdersRequest;
|
||||
use App\Jobs\Invoice\InjectSignature;
|
||||
use App\Models\PurchaseOrder;
|
||||
use App\Utils\Ninja;
|
||||
use App\Utils\Traits\MakesDates;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\View\View;
|
||||
use App\Http\Requests\VendorPortal\PurchaseOrders\ProcessPurchaseOrdersInBulkRequest;
|
||||
|
||||
class PurchaseOrderController extends Controller
|
||||
{
|
||||
@ -108,6 +111,28 @@ class PurchaseOrderController extends Controller
|
||||
return $this->render('purchase_orders.show', $data);
|
||||
}
|
||||
|
||||
public function showBlob($hash)
|
||||
{
|
||||
$data = Cache::pull($hash);
|
||||
|
||||
$invitation = PurchaseOrderInvitation::withTrashed()->find($data['invitation_id']);
|
||||
|
||||
$file = (new CreatePurchaseOrderPdf($invitation, $invitation->company->db))->rawPdf();
|
||||
|
||||
// $headers = ['Content-Type' => 'application/pdf'];
|
||||
// $entity_string = $data['entity_type'];
|
||||
// $file_name = $invitation->{$entity_string}->numberFormatter().'.pdf';
|
||||
// return response()->streamDownload(function () use ($file) {
|
||||
// echo $file;
|
||||
// }, $file_name, $headers);
|
||||
|
||||
$headers = ['Content-Type' => 'application/pdf'];
|
||||
return response()->make($file, 200, $headers);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private function sidebarMenu() :array
|
||||
{
|
||||
$enabled_modules = auth()->guard('vendor')->user()->company->enabled_modules;
|
||||
|
@ -16,6 +16,7 @@ use App\Utils\Number;
|
||||
use Livewire\Component;
|
||||
use App\Utils\HtmlEngine;
|
||||
use App\Libraries\MultiDB;
|
||||
use Illuminate\Support\Str;
|
||||
use App\Models\QuoteInvitation;
|
||||
use App\Utils\VendorHtmlEngine;
|
||||
use App\Models\CreditInvitation;
|
||||
@ -23,6 +24,7 @@ use App\Services\Pdf\PdfBuilder;
|
||||
use App\Services\Pdf\PdfService;
|
||||
use App\Models\InvoiceInvitation;
|
||||
use App\Services\Pdf\PdfDesigner;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use App\Services\Pdf\PdfConfiguration;
|
||||
use App\Models\PurchaseOrderInvitation;
|
||||
use App\Models\RecurringInvoiceInvitation;
|
||||
@ -52,6 +54,8 @@ class PdfSlot extends Component
|
||||
|
||||
public $show_quantity = true;
|
||||
|
||||
public $route_entity = 'client';
|
||||
|
||||
public function mount()
|
||||
{
|
||||
MultiDB::setDb($this->db);
|
||||
@ -59,7 +63,21 @@ class PdfSlot extends Component
|
||||
|
||||
public function getPdf()
|
||||
{
|
||||
$this->pdf = $this->entity->fullscreenPdfViewer($this->invitation);
|
||||
// $this->pdf = $this->entity->fullscreenPdfViewer($this->invitation);
|
||||
|
||||
$blob = [
|
||||
'entity_type' => $this->resolveEntityType(),
|
||||
'entity_id' => $this->entity->id,
|
||||
'invitation_id' => $this->invitation->id,
|
||||
'download' => false,
|
||||
];
|
||||
|
||||
$hash = Str::random(64);
|
||||
|
||||
Cache::put($hash, $blob, now()->addMinutes(2));
|
||||
|
||||
$this->pdf = $hash;
|
||||
|
||||
}
|
||||
|
||||
public function downloadPdf()
|
||||
@ -82,6 +100,7 @@ class PdfSlot extends Component
|
||||
|
||||
public function render()
|
||||
{
|
||||
|
||||
$this->entity_type = $this->resolveEntityType();
|
||||
|
||||
$this->settings = $this->entity->client ? $this->entity->client->getMergedSettings() : $this->entity->company->settings;
|
||||
@ -254,6 +273,7 @@ class PdfSlot extends Component
|
||||
} elseif ($this->invitation instanceof RecurringInvoiceInvitation) {
|
||||
return 'recurring_invoice';
|
||||
} elseif ($this->invitation instanceof PurchaseOrderInvitation) {
|
||||
$this->route_entity = 'vendor';
|
||||
return 'purchase_order';
|
||||
}
|
||||
|
||||
|
2
app/Jobs/Vendor/CreatePurchaseOrderPdf.php
vendored
2
app/Jobs/Vendor/CreatePurchaseOrderPdf.php
vendored
@ -188,7 +188,7 @@ class CreatePurchaseOrderPdf implements ShouldQueue
|
||||
}
|
||||
|
||||
if (config('ninja.log_pdf_html')) {
|
||||
info($maker->getCompiledHTML());
|
||||
nlog($maker->getCompiledHTML());
|
||||
}
|
||||
|
||||
$maker = null;
|
||||
|
@ -274,6 +274,10 @@ trait DesignHelpers
|
||||
// Some variables don't map 1:1 to table columns. This gives us support for such cases.
|
||||
$aliases = [
|
||||
'$quote.balance_due' => 'partial',
|
||||
'$purchase_order.po_number' => 'number',
|
||||
'$purchase_order.total' => 'amount',
|
||||
'$purchase_order.due_date' => 'due_date',
|
||||
'$purchase_order.balance_due' => 'balance_due',
|
||||
];
|
||||
|
||||
try {
|
||||
|
@ -133,16 +133,18 @@ class VendorHtmlEngine
|
||||
$data['$partial_due_date'] = ['value' => $this->translateDate($this->entity->partial_due_date, $this->company->date_format(), $this->company->locale()) ?: ' ', 'label' => ctrans('texts.'.$this->entity_string.'_due_date')];
|
||||
|
||||
$data['$dueDate'] = &$data['$due_date'];
|
||||
$data['$purchase_order.due_date'] = &$data['$due_date'];
|
||||
|
||||
$data['$payment_due'] = ['value' => $this->translateDate($this->entity->due_date, $this->company->date_format(), $this->company->locale()) ?: ' ', 'label' => ctrans('texts.payment_due')];
|
||||
$data['$poNumber'] = ['value' => $this->entity->po_number, 'label' => ctrans('texts.po_number')];
|
||||
$data['$purchase_order.po_number'] = ['value' => $this->entity->number ?: ' ', 'label' => ctrans('texts.po_number')];
|
||||
|
||||
$data['$poNumber'] = &$data['$purchase_order.po_number'];
|
||||
|
||||
$data['$entity.datetime'] = ['value' => $this->formatDatetime($this->entity->created_at, $this->company->date_format()), 'label' => ctrans('texts.date')];
|
||||
|
||||
$data['$po_number'] = &$data['$poNumber'];
|
||||
$data['$status_logo'] = ['value' => ' ', 'label' => ' '];
|
||||
$data['$entity'] = ['value' => '', 'label' => ctrans('texts.purchase_order')];
|
||||
$data['$number'] = ['value' => $this->entity->number ?: ' ', 'label' => ctrans('texts.purchase_order_number')];
|
||||
$data['$number'] = ['value' => $this->entity->number ?: ' ', 'label' => ctrans('texts.number')];
|
||||
$data['$number_short'] = ['value' => $this->entity->number ?: ' ', 'label' => ctrans('texts.purchase_order_number_short')];
|
||||
$data['$entity.terms'] = ['value' => Helpers::processReservedKeywords(\nl2br($this->entity->terms), $this->company) ?: '', 'label' => ctrans('texts.invoice_terms')];
|
||||
$data['$terms'] = &$data['$entity.terms'];
|
||||
@ -155,7 +157,6 @@ class VendorHtmlEngine
|
||||
|
||||
$data['$purchase_order.number'] = &$data['$number'];
|
||||
$data['$purchase_order.date'] = &$data['$date'];
|
||||
$data['$purchase_order.po_number'] = &$data['$poNumber'];
|
||||
$data['$purchase_order.due_date'] = &$data['$due_date'];
|
||||
$data['$entity_issued_to'] = ['value' => '', 'label' => ctrans("texts.purchase_order_issued_to")];
|
||||
|
||||
@ -189,8 +190,9 @@ class VendorHtmlEngine
|
||||
}
|
||||
}
|
||||
|
||||
// $data['$balance_due'] = $data['$balance_due'];
|
||||
$data['$outstanding'] = &$data['$balance_due'];
|
||||
$data['$purchase_order.balance_due'] = &$data['$balance_due'];
|
||||
|
||||
$data['$partial_due'] = ['value' => Number::formatMoney($this->entity->partial, $this->vendor) ?: ' ', 'label' => ctrans('texts.partial_due')];
|
||||
$data['$partial'] = &$data['$partial_due'];
|
||||
|
||||
|
@ -95,7 +95,8 @@
|
||||
"turbo124/predis": "1.1.11",
|
||||
"twilio/sdk": "^6.40",
|
||||
"webpatser/laravel-countries": "dev-master#75992ad",
|
||||
"wepay/php-sdk": "^0.3"
|
||||
"wepay/php-sdk": "^0.3",
|
||||
"psr/http-message": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"php": "^8.1",
|
||||
|
255
composer.lock
generated
255
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "135eec9ab7a1e8c0ab3820ff27cf1488",
|
||||
"content-hash": "be16996524279f340c44e2f6c9a0ba53",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adrienrn/php-mimetyper",
|
||||
@ -424,16 +424,16 @@
|
||||
},
|
||||
{
|
||||
"name": "aws/aws-sdk-php",
|
||||
"version": "3.269.0",
|
||||
"version": "3.275.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||
"reference": "6d759ef9f24f0c7f271baf8014f41fc0cfdfbf78"
|
||||
"reference": "54dcef3349c81b46c0f5f6e54b5f9bfb5db19903"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/6d759ef9f24f0c7f271baf8014f41fc0cfdfbf78",
|
||||
"reference": "6d759ef9f24f0c7f271baf8014f41fc0cfdfbf78",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/54dcef3349c81b46c0f5f6e54b5f9bfb5db19903",
|
||||
"reference": "54dcef3349c81b46c0f5f6e54b5f9bfb5db19903",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -445,7 +445,8 @@
|
||||
"guzzlehttp/promises": "^1.4.0",
|
||||
"guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
|
||||
"mtdowling/jmespath.php": "^2.6",
|
||||
"php": ">=5.5"
|
||||
"php": ">=5.5",
|
||||
"psr/http-message": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"andrewsville/php-token-reflection": "^1.4",
|
||||
@ -462,7 +463,6 @@
|
||||
"paragonie/random_compat": ">= 2",
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.6.3 || ^9.5",
|
||||
"psr/cache": "^1.0",
|
||||
"psr/http-message": "^1.0",
|
||||
"psr/simple-cache": "^1.0",
|
||||
"sebastian/comparator": "^1.2.3 || ^4.0",
|
||||
"yoast/phpunit-polyfills": "^1.0"
|
||||
@ -513,9 +513,9 @@
|
||||
"support": {
|
||||
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
|
||||
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.269.0"
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.275.7"
|
||||
},
|
||||
"time": "2023-04-26T18:21:04+00:00"
|
||||
"time": "2023-07-13T18:21:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "bacon/bacon-qr-code",
|
||||
@ -2485,16 +2485,16 @@
|
||||
},
|
||||
{
|
||||
"name": "google/apiclient-services",
|
||||
"version": "v0.307.0",
|
||||
"version": "v0.308.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/googleapis/google-api-php-client-services.git",
|
||||
"reference": "5f7d451aa912355dda61aa29ac3a4afa8b252467"
|
||||
"reference": "85cf00383e6bf6eca131bd3261b7859ea418a578"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/5f7d451aa912355dda61aa29ac3a4afa8b252467",
|
||||
"reference": "5f7d451aa912355dda61aa29ac3a4afa8b252467",
|
||||
"url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/85cf00383e6bf6eca131bd3261b7859ea418a578",
|
||||
"reference": "85cf00383e6bf6eca131bd3261b7859ea418a578",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2523,9 +2523,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/googleapis/google-api-php-client-services/issues",
|
||||
"source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.307.0"
|
||||
"source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.308.0"
|
||||
},
|
||||
"time": "2023-07-01T01:02:13+00:00"
|
||||
"time": "2023-07-09T01:06:13+00:00"
|
||||
},
|
||||
{
|
||||
"name": "google/auth",
|
||||
@ -4554,16 +4554,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/socialite",
|
||||
"version": "v5.6.3",
|
||||
"version": "v5.7.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/socialite.git",
|
||||
"reference": "00ea7f8630673ea49304fc8a9fca5a64eb838c7e"
|
||||
"reference": "f5996f499e14db15407201a6bfbaba3ce6ce736c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/socialite/zipball/00ea7f8630673ea49304fc8a9fca5a64eb838c7e",
|
||||
"reference": "00ea7f8630673ea49304fc8a9fca5a64eb838c7e",
|
||||
"url": "https://api.github.com/repos/laravel/socialite/zipball/f5996f499e14db15407201a6bfbaba3ce6ce736c",
|
||||
"reference": "f5996f499e14db15407201a6bfbaba3ce6ce736c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -4620,7 +4620,7 @@
|
||||
"issues": "https://github.com/laravel/socialite/issues",
|
||||
"source": "https://github.com/laravel/socialite"
|
||||
},
|
||||
"time": "2023-06-06T13:42:43+00:00"
|
||||
"time": "2023-07-08T20:51:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/tinker",
|
||||
@ -5768,16 +5768,16 @@
|
||||
},
|
||||
{
|
||||
"name": "mollie/mollie-api-php",
|
||||
"version": "v2.57.0",
|
||||
"version": "v2.58.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mollie/mollie-api-php.git",
|
||||
"reference": "be201657b00a197e5238bbec81fad2a0fc0b83e4"
|
||||
"reference": "5120e5b3e4622a290b64acf87266ea47d10d7301"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/mollie/mollie-api-php/zipball/be201657b00a197e5238bbec81fad2a0fc0b83e4",
|
||||
"reference": "be201657b00a197e5238bbec81fad2a0fc0b83e4",
|
||||
"url": "https://api.github.com/repos/mollie/mollie-api-php/zipball/5120e5b3e4622a290b64acf87266ea47d10d7301",
|
||||
"reference": "5120e5b3e4622a290b64acf87266ea47d10d7301",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -5854,9 +5854,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/mollie/mollie-api-php/issues",
|
||||
"source": "https://github.com/mollie/mollie-api-php/tree/v2.57.0"
|
||||
"source": "https://github.com/mollie/mollie-api-php/tree/v2.58.0"
|
||||
},
|
||||
"time": "2023-06-23T09:09:15+00:00"
|
||||
"time": "2023-07-11T12:01:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "moneyphp/money",
|
||||
@ -7280,16 +7280,16 @@
|
||||
},
|
||||
{
|
||||
"name": "php-http/discovery",
|
||||
"version": "1.19.0",
|
||||
"version": "1.19.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-http/discovery.git",
|
||||
"reference": "1856a119a0b0ba8da8b5c33c080aa7af8fac25b4"
|
||||
"reference": "57f3de01d32085fea20865f9b16fb0e69347c39e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-http/discovery/zipball/1856a119a0b0ba8da8b5c33c080aa7af8fac25b4",
|
||||
"reference": "1856a119a0b0ba8da8b5c33c080aa7af8fac25b4",
|
||||
"url": "https://api.github.com/repos/php-http/discovery/zipball/57f3de01d32085fea20865f9b16fb0e69347c39e",
|
||||
"reference": "57f3de01d32085fea20865f9b16fb0e69347c39e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -7352,9 +7352,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/php-http/discovery/issues",
|
||||
"source": "https://github.com/php-http/discovery/tree/1.19.0"
|
||||
"source": "https://github.com/php-http/discovery/tree/1.19.1"
|
||||
},
|
||||
"time": "2023-06-19T08:45:36+00:00"
|
||||
"time": "2023-07-11T07:02:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "php-http/guzzle7-adapter",
|
||||
@ -7844,16 +7844,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpseclib/phpseclib",
|
||||
"version": "3.0.20",
|
||||
"version": "3.0.21",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpseclib/phpseclib.git",
|
||||
"reference": "543a1da81111a0bfd6ae7bbc2865c5e89ed3fc67"
|
||||
"reference": "4580645d3fc05c189024eb3b834c6c1e4f0f30a1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/543a1da81111a0bfd6ae7bbc2865c5e89ed3fc67",
|
||||
"reference": "543a1da81111a0bfd6ae7bbc2865c5e89ed3fc67",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/4580645d3fc05c189024eb3b834c6c1e4f0f30a1",
|
||||
"reference": "4580645d3fc05c189024eb3b834c6c1e4f0f30a1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -7934,7 +7934,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/phpseclib/phpseclib/issues",
|
||||
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.20"
|
||||
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.21"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -7950,7 +7950,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-06-13T06:30:34+00:00"
|
||||
"time": "2023-07-09T15:24:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpdoc-parser",
|
||||
@ -8360,16 +8360,16 @@
|
||||
},
|
||||
{
|
||||
"name": "psr/http-message",
|
||||
"version": "2.0",
|
||||
"version": "1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/http-message.git",
|
||||
"reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
|
||||
"reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
|
||||
"reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
|
||||
"url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
|
||||
"reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -8378,7 +8378,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
"dev-master": "1.1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@ -8393,7 +8393,7 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "https://www.php-fig.org/"
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interface for HTTP messages",
|
||||
@ -8407,9 +8407,9 @@
|
||||
"response"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/php-fig/http-message/tree/2.0"
|
||||
"source": "https://github.com/php-fig/http-message/tree/1.1"
|
||||
},
|
||||
"time": "2023-04-04T09:54:51+00:00"
|
||||
"time": "2023-04-04T09:50:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
@ -15117,16 +15117,16 @@
|
||||
},
|
||||
{
|
||||
"name": "filp/whoops",
|
||||
"version": "2.15.2",
|
||||
"version": "2.15.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filp/whoops.git",
|
||||
"reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73"
|
||||
"reference": "c83e88a30524f9360b11f585f71e6b17313b7187"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filp/whoops/zipball/aac9304c5ed61bf7b1b7a6064bf9806ab842ce73",
|
||||
"reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73",
|
||||
"url": "https://api.github.com/repos/filp/whoops/zipball/c83e88a30524f9360b11f585f71e6b17313b7187",
|
||||
"reference": "c83e88a30524f9360b11f585f71e6b17313b7187",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -15176,7 +15176,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/filp/whoops/issues",
|
||||
"source": "https://github.com/filp/whoops/tree/2.15.2"
|
||||
"source": "https://github.com/filp/whoops/tree/2.15.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -15184,7 +15184,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-04-12T12:00:00+00:00"
|
||||
"time": "2023-07-13T12:00:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "friendsofphp/php-cs-fixer",
|
||||
@ -15392,79 +15392,6 @@
|
||||
},
|
||||
"time": "2023-02-16T20:00:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/dusk",
|
||||
"version": "v6.25.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/dusk.git",
|
||||
"reference": "25a595ac3dc82089a91af10dd23b0d58fd3f6d0b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/dusk/zipball/25a595ac3dc82089a91af10dd23b0d58fd3f6d0b",
|
||||
"reference": "25a595ac3dc82089a91af10dd23b0d58fd3f6d0b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"ext-zip": "*",
|
||||
"illuminate/console": "^6.0|^7.0|^8.0|^9.0",
|
||||
"illuminate/support": "^6.0|^7.0|^8.0|^9.0",
|
||||
"nesbot/carbon": "^2.0",
|
||||
"php": "^7.2|^8.0",
|
||||
"php-webdriver/webdriver": "^1.9.0",
|
||||
"symfony/console": "^4.3|^5.0|^6.0",
|
||||
"symfony/finder": "^4.3|^5.0|^6.0",
|
||||
"symfony/process": "^4.3|^5.0|^6.0",
|
||||
"vlucas/phpdotenv": "^3.0|^4.0|^5.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.0",
|
||||
"orchestra/testbench": "^4.16|^5.17.1|^6.12.1|^7.0",
|
||||
"phpunit/phpunit": "^7.5.15|^8.4|^9.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-pcntl": "Used to gracefully terminate Dusk when tests are running."
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "6.x-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Laravel\\Dusk\\DuskServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Laravel\\Dusk\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Taylor Otwell",
|
||||
"email": "taylor@laravel.com"
|
||||
}
|
||||
],
|
||||
"description": "Laravel Dusk provides simple end-to-end testing and browser automation.",
|
||||
"keywords": [
|
||||
"laravel",
|
||||
"testing",
|
||||
"webdriver"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/laravel/dusk/issues",
|
||||
"source": "https://github.com/laravel/dusk/tree/v6.25.2"
|
||||
},
|
||||
"time": "2022-09-29T09:37:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "maximebf/debugbar",
|
||||
"version": "v1.18.2",
|
||||
@ -16067,72 +15994,6 @@
|
||||
},
|
||||
"time": "2022-02-21T01:04:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "php-webdriver/webdriver",
|
||||
"version": "1.14.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-webdriver/php-webdriver.git",
|
||||
"reference": "3ea4f924afb43056bf9c630509e657d951608563"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/3ea4f924afb43056bf9c630509e657d951608563",
|
||||
"reference": "3ea4f924afb43056bf9c630509e657d951608563",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-curl": "*",
|
||||
"ext-json": "*",
|
||||
"ext-zip": "*",
|
||||
"php": "^7.3 || ^8.0",
|
||||
"symfony/polyfill-mbstring": "^1.12",
|
||||
"symfony/process": "^5.0 || ^6.0"
|
||||
},
|
||||
"replace": {
|
||||
"facebook/webdriver": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"ergebnis/composer-normalize": "^2.20.0",
|
||||
"ondram/ci-detector": "^4.0",
|
||||
"php-coveralls/php-coveralls": "^2.4",
|
||||
"php-mock/php-mock-phpunit": "^2.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.2",
|
||||
"phpunit/phpunit": "^9.3",
|
||||
"squizlabs/php_codesniffer": "^3.5",
|
||||
"symfony/var-dumper": "^5.0 || ^6.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-SimpleXML": "For Firefox profile creation"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"lib/Exception/TimeoutException.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Facebook\\WebDriver\\": "lib/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"description": "A PHP client for Selenium WebDriver. Previously facebook/webdriver.",
|
||||
"homepage": "https://github.com/php-webdriver/php-webdriver",
|
||||
"keywords": [
|
||||
"Chromedriver",
|
||||
"geckodriver",
|
||||
"php",
|
||||
"selenium",
|
||||
"webdriver"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/php-webdriver/php-webdriver/issues",
|
||||
"source": "https://github.com/php-webdriver/php-webdriver/tree/1.14.0"
|
||||
},
|
||||
"time": "2023-02-09T12:12:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-docblock",
|
||||
"version": "5.3.0",
|
||||
@ -16659,16 +16520,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "9.6.9",
|
||||
"version": "9.6.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "a9aceaf20a682aeacf28d582654a1670d8826778"
|
||||
"reference": "a6d351645c3fe5a30f5e86be6577d946af65a328"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a9aceaf20a682aeacf28d582654a1670d8826778",
|
||||
"reference": "a9aceaf20a682aeacf28d582654a1670d8826778",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a6d351645c3fe5a30f5e86be6577d946af65a328",
|
||||
"reference": "a6d351645c3fe5a30f5e86be6577d946af65a328",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -16742,7 +16603,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.9"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.10"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -16758,7 +16619,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-06-11T06:13:56+00:00"
|
||||
"time": "2023-07-10T04:04:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/cli-parser",
|
||||
|
@ -14,7 +14,8 @@
|
||||
<div class="hidden lg:block">
|
||||
<div wire:init="getPdf()">
|
||||
@if($pdf)
|
||||
<iframe id="pdf-iframe" src="{!! $pdf !!}" class="h-screen w-full border-0 mt-4"></iframe>
|
||||
<!-- <iframe id="pdf-iframe" src="{!! $pdf !!}" class="h-screen w-full border-0 mt-4"></iframe> -->
|
||||
<iframe id="pdf-iframe" src="/{{ $route_entity }}/showBlob/{{ $pdf }}" class="h-screen w-full border-0 mt-4"></iframe>
|
||||
@else
|
||||
<div class="flex mt-4 place-items-center">
|
||||
<span class="loader m-auto"></span>
|
||||
|
@ -4,8 +4,8 @@
|
||||
@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>
|
||||
<!-- <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">
|
||||
@ -68,6 +68,6 @@
|
||||
|
||||
@if($mobile)
|
||||
@push('footer')
|
||||
<script src="{{ asset('js/clients/shared/pdf.js') }}" defer></script>
|
||||
<!-- <script src="{{ asset('js/clients/shared/pdf.js') }}" defer></script> -->
|
||||
@endpush
|
||||
@endif
|
||||
|
@ -50,7 +50,8 @@ Route::group(['middleware' => ['auth:contact', 'locale', 'domain_db','check_clie
|
||||
Route::get('dashboard', [App\Http\Controllers\ClientPortal\DashboardController::class, 'index'])->name('dashboard'); // name = (dashboard. index / create / show / update / destroy / edit
|
||||
|
||||
Route::get('plan', [App\Http\Controllers\ClientPortal\NinjaPlanController::class, 'plan'])->name('plan'); // name = (dashboard. index / create / show / update / destroy / edit
|
||||
|
||||
|
||||
Route::get('showBlob/{hash}', [App\Http\Controllers\ClientPortal\InvoiceController::class, 'showBlob'])->name('invoices.showBlob');
|
||||
Route::get('invoices', [App\Http\Controllers\ClientPortal\InvoiceController::class, 'index'])->name('invoices.index')->middleware('portal_enabled');
|
||||
Route::post('invoices/payment', [App\Http\Controllers\ClientPortal\InvoiceController::class, 'bulk'])->name('invoices.bulk');
|
||||
Route::get('invoices/payment', [App\Http\Controllers\ClientPortal\InvoiceController::class, 'catch_bulk'])->name('invoices.catch_bulk');
|
||||
|
@ -25,10 +25,6 @@ Route::group(['middleware' => ['invite_db'], 'prefix' => 'vendor', 'as' => 'vend
|
||||
/*Invitation catches*/
|
||||
Route::get('purchase_order/{invitation_key}', [InvitationController::class, 'purchaseOrder']);
|
||||
Route::get('purchase_order/{invitation_key}/download', [InvitationController::class, 'download']);
|
||||
|
||||
// Route::get('purchase_order/{invitation_key}/download_pdf', 'PurchaseOrderController@downloadPdf')->name('recurring_invoice.download_invitation_key');
|
||||
// Route::get('purchase_order/{invitation_key}/download', 'ClientPortal\InvitationController@routerForDownload');
|
||||
|
||||
});
|
||||
|
||||
Route::group(['middleware' => ['auth:vendor', 'vendor_locale', 'domain_db'], 'prefix' => 'vendor', 'as' => 'vendor.'], function () {
|
||||
@ -37,6 +33,8 @@ Route::group(['middleware' => ['auth:vendor', 'vendor_locale', 'domain_db'], 'pr
|
||||
Route::get('purchase_orders', [PurchaseOrderController::class, 'index'])->name('purchase_orders.index');
|
||||
Route::get('purchase_orders/{purchase_order}', [PurchaseOrderController::class, 'show'])->name('purchase_order.show');
|
||||
|
||||
Route::get('showBlob/{hash}', [PurchaseOrderController::class, 'showBlob'])->name('purchase_order.showBlob');
|
||||
|
||||
Route::get('profile/{vendor_contact}/edit', [VendorContactController::class, 'edit'])->name('profile.edit');
|
||||
Route::put('profile/{vendor_contact}/edit', [VendorContactController::class, 'update'])->name('profile.update');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user