diff --git a/app/Http/Controllers/ClientPortal/PaymentMethodController.php b/app/Http/Controllers/ClientPortal/PaymentMethodController.php index 3432732b98a6..8503afd95d86 100644 --- a/app/Http/Controllers/ClientPortal/PaymentMethodController.php +++ b/app/Http/Controllers/ClientPortal/PaymentMethodController.php @@ -13,6 +13,7 @@ namespace App\Http\Controllers\ClientPortal; use App\Events\Payment\Methods\MethodDeleted; use App\Http\Controllers\Controller; +use App\Http\Requests\ClientPortal\CreatePaymentMethodRequest; use App\Models\ClientGatewayToken; use App\Utils\Traits\MakesDates; use Illuminate\Http\Request; @@ -45,7 +46,7 @@ class PaymentMethodController extends Controller * * @return \Illuminate\Http\Response */ - public function create() + public function create(CreatePaymentMethodRequest $request) { $gateway = auth()->user()->client->getCreditCardGateway(); diff --git a/app/Http/Requests/ClientPortal/CreatePaymentMethodRequest.php b/app/Http/Requests/ClientPortal/CreatePaymentMethodRequest.php new file mode 100644 index 000000000000..8af355a95f79 --- /dev/null +++ b/app/Http/Requests/ClientPortal/CreatePaymentMethodRequest.php @@ -0,0 +1,30 @@ +user()->client->getCreditCardGateway() ? true : false; + } + + /** + * Get the validation rules that apply to the request. + * + * @return array + */ + public function rules() + { + return [ + // + ]; + } +} diff --git a/public/images/invoiceninja-white-logo.png b/public/images/invoiceninja-white-logo.png new file mode 100644 index 000000000000..5add6d9ccb59 Binary files /dev/null and b/public/images/invoiceninja-white-logo.png differ diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index f3097930291e..e2762695157a 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -3194,4 +3194,5 @@ return [ 'open_in_new_tab' => 'Open in new tab', 'complete_your_payment' => 'Complete payment', + 'authorize_for_future_use' => 'Authorize payment method for future use', ]; diff --git a/resources/views/portal/ninja2020/components/general/sidebar/desktop.blade.php b/resources/views/portal/ninja2020/components/general/sidebar/desktop.blade.php index ef6183732bd4..3ed585d916e0 100644 --- a/resources/views/portal/ninja2020/components/general/sidebar/desktop.blade.php +++ b/resources/views/portal/ninja2020/components/general/sidebar/desktop.blade.php @@ -3,7 +3,7 @@
{{ config('app.name') }}
diff --git a/resources/views/portal/ninja2020/components/general/sidebar/mobile.blade.php b/resources/views/portal/ninja2020/components/general/sidebar/mobile.blade.php index fde52895ca43..0a03a200023a 100644 --- a/resources/views/portal/ninja2020/components/general/sidebar/mobile.blade.php +++ b/resources/views/portal/ninja2020/components/general/sidebar/mobile.blade.php @@ -15,7 +15,7 @@
{{ config('app.name') }}
+
+
+ {{ ctrans('texts.amount') }} +
+
+ {{ App\Utils\Number::formatMoney($invoice->amount, $invoice->client) }} +
+
diff --git a/resources/views/portal/ninja2020/payment_methods/index.blade.php b/resources/views/portal/ninja2020/payment_methods/index.blade.php index e91c932a2232..f3654984b5ae 100644 --- a/resources/views/portal/ninja2020/payment_methods/index.blade.php +++ b/resources/views/portal/ninja2020/payment_methods/index.blade.php @@ -21,7 +21,9 @@
- @lang('texts.add_payment_method') + @if(auth()->user()->client->getCreditCardGateway()) + @lang('texts.add_payment_method') + @endif
diff --git a/routes/breadcrumbs.php b/routes/breadcrumbs.php index 8b22d20c290c..10435ff2799d 100644 --- a/routes/breadcrumbs.php +++ b/routes/breadcrumbs.php @@ -89,6 +89,12 @@ Breadcrumbs::for('credits.show', function ($trail, $credit) { $trail->push(sprintf('%s: %s', ctrans('texts.credits'), $credit->hashed_id), route('client.credits.index', $credit->hashed_id)); }); +// Invoices > Payment +Breadcrumbs::for('invoices.pay_now', function ($trail) { + $trail->parent('invoices'); + $trail->push(ctrans('texts.pay_now')); +}); + // Dashboard > Client Breadcrumbs::for('clients', function ($trail) { $trail->parent('dashboard'); @@ -107,4 +113,4 @@ Breadcrumbs::for('clients.edit', function ($trail, $client) { Breadcrumbs::for('clients.create', function ($trail) { $trail->parent('clients'); -}); +}); \ No newline at end of file