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 1/2] 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 From 8efc453c4516b4bcf1d0d6057206ae96c8a4aac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Thu, 18 Jun 2020 12:51:47 +0200 Subject: [PATCH 2/2] Support for "Approve" button with fullscreen quotes --- .../ClientPortal/QuoteController.php | 10 +++- .../invoices/show/fullscreen.blade.php | 51 ++++++++++--------- .../portal/ninja2020/quotes/show.blade.php | 2 +- .../quotes/show/fullscreen.blade.php | 36 +++++++++++++ 4 files changed, 71 insertions(+), 28 deletions(-) create mode 100644 resources/views/portal/ninja2020/quotes/show/fullscreen.blade.php diff --git a/app/Http/Controllers/ClientPortal/QuoteController.php b/app/Http/Controllers/ClientPortal/QuoteController.php index 751b359ae893..8421ea3310b0 100644 --- a/app/Http/Controllers/ClientPortal/QuoteController.php +++ b/app/Http/Controllers/ClientPortal/QuoteController.php @@ -37,9 +37,15 @@ class QuoteController extends Controller */ public function show(ShowQuoteRequest $request, Quote $quote) { - return $this->render('quotes.show', [ + $data = [ 'quote' => $quote, - ]); + ]; + + if ($request->query('mode') === 'fullscreen') { + return $this->render('quotes.show.fullscreen', $data); + } + + return $this->render('quotes.show', $data); } public function bulk(ProcessQuotesInBulkRequest $request) diff --git a/resources/views/portal/ninja2020/invoices/show/fullscreen.blade.php b/resources/views/portal/ninja2020/invoices/show/fullscreen.blade.php index b68b08ea09b7..4597fa5a8f10 100644 --- a/resources/views/portal/ninja2020/invoices/show/fullscreen.blade.php +++ b/resources/views/portal/ninja2020/invoices/show/fullscreen.blade.php @@ -2,34 +2,35 @@ @section('meta_title', ctrans('texts.view_invoice')) @section('body') -@if($invoice->isPayable()) -
- @csrf -
-
-
-
-

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

-
-

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

+ @if($invoice->isPayable()) + + @csrf +
+
+
+
+

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

+
+

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

+
-
-
-
- - - +
+
+ + + +
-
- -@endif - + + @endif + + @endsection \ No newline at end of file diff --git a/resources/views/portal/ninja2020/quotes/show.blade.php b/resources/views/portal/ninja2020/quotes/show.blade.php index ba2873ed8dc2..c7ad111ba703 100644 --- a/resources/views/portal/ninja2020/quotes/show.blade.php +++ b/resources/views/portal/ninja2020/quotes/show.blade.php @@ -88,7 +88,7 @@ diff --git a/resources/views/portal/ninja2020/quotes/show/fullscreen.blade.php b/resources/views/portal/ninja2020/quotes/show/fullscreen.blade.php new file mode 100644 index 000000000000..be74d59f60f3 --- /dev/null +++ b/resources/views/portal/ninja2020/quotes/show/fullscreen.blade.php @@ -0,0 +1,36 @@ +@extends('portal.ninja2020.layout.clean') +@section('meta_title', ctrans('texts.view_quote')) + +@section('body') + @if(!$quote->isApproved()) +
+ @csrf + + +
+
+
+
+

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

+
+

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

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