1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 15:13:29 +01:00

Handle purchase order previews from designer

This commit is contained in:
David Bomba 2024-09-19 14:47:51 +10:00
parent 9977f2c47e
commit eebf72d042
2 changed files with 5 additions and 1 deletions

View File

@ -148,6 +148,9 @@ class PreviewController extends BaseController
! empty(request()->input('entity')) &&
! empty(request()->input('entity_id'))) {
if($request->input('entity') == 'purchase_order')
return $preview = app(\App\Http\Controllers\PreviewPurchaseOrderController::class)->show($request);
$design_object = json_decode(json_encode(request()->input('design')));
if (! is_object($design_object)) {

View File

@ -36,6 +36,7 @@ use App\Utils\Traits\Pdf\PageNumbering;
use App\Utils\VendorHtmlEngine;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\Facades\Response;
use Turbo124\Beacon\Facades\LightLogs;
@ -83,7 +84,7 @@ class PreviewPurchaseOrderController extends BaseController
* ),
* )
*/
public function show()
public function show($request)
{
if (request()->has('entity') &&
request()->has('entity_id') &&