From e727d45029584f70108ac2f135bfac33f467e693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Thu, 18 Jun 2020 12:48:31 +0200 Subject: [PATCH] Support for "Pay now" button with invoices --- .../ClientPortal/InvoiceController.php | 4 +++ .../portal/ninja2020/invoices/show.blade.php | 2 +- .../invoices/show/fullscreen.blade.php | 35 +++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 resources/views/portal/ninja2020/invoices/show/fullscreen.blade.php diff --git a/app/Http/Controllers/ClientPortal/InvoiceController.php b/app/Http/Controllers/ClientPortal/InvoiceController.php index 715816def901..ab632694febc 100644 --- a/app/Http/Controllers/ClientPortal/InvoiceController.php +++ b/app/Http/Controllers/ClientPortal/InvoiceController.php @@ -52,6 +52,10 @@ class InvoiceController extends Controller 'invoice' => $invoice, ]; + if ($request->query('mode') === 'fullscreen') { + return $this->render('invoices.show.fullscreen', $data); + } + return $this->render('invoices.show', $data); } diff --git a/resources/views/portal/ninja2020/invoices/show.blade.php b/resources/views/portal/ninja2020/invoices/show.blade.php index 6825a3cb5f2a..b7ea1b074103 100644 --- a/resources/views/portal/ninja2020/invoices/show.blade.php +++ b/resources/views/portal/ninja2020/invoices/show.blade.php @@ -97,7 +97,7 @@
diff --git a/resources/views/portal/ninja2020/invoices/show/fullscreen.blade.php b/resources/views/portal/ninja2020/invoices/show/fullscreen.blade.php new file mode 100644 index 000000000000..b68b08ea09b7 --- /dev/null +++ b/resources/views/portal/ninja2020/invoices/show/fullscreen.blade.php @@ -0,0 +1,35 @@ +@extends('portal.ninja2020.layout.clean') +@section('meta_title', ctrans('texts.view_invoice')) + +@section('body') +@if($invoice->isPayable()) +
+ @csrf +
+
+
+
+

+ {{ ctrans('texts.unpaid') }} +

+
+

+ {{ ctrans('texts.invoice_still_unpaid') }} + +

+
+
+
+
+ + + +
+
+
+
+
+
+@endif + +@endsection \ No newline at end of file