mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 14:54:31 -04:00
Working on the portal
This commit is contained in:
parent
78da1246ae
commit
4fb50f75cf
@ -269,6 +269,7 @@ class ClientPortalController extends BaseController
|
||||
if (! $account->enable_client_portal) {
|
||||
return $this->returnError();
|
||||
} elseif (! $account->enable_client_portal_dashboard) {
|
||||
session()->reflash();
|
||||
return redirect()->to('/client/invoices/');
|
||||
}
|
||||
|
||||
@ -987,7 +988,7 @@ class ClientPortalController extends BaseController
|
||||
$client = $contact->client;
|
||||
$account = $contact->account;
|
||||
|
||||
if (! $account->enable_client_portal || ! $account->enable_client_portal_dashboard) {
|
||||
if (! $account->enable_client_portal) {
|
||||
return $this->returnError();
|
||||
}
|
||||
|
||||
@ -1022,6 +1023,7 @@ class ClientPortalController extends BaseController
|
||||
|
||||
event(new \App\Events\ClientWasUpdated($client));
|
||||
|
||||
return redirect('/client/dashboard')->withMessage(trans('texts.updated_client_details'));
|
||||
return redirect($account->enable_client_portal_dashboard ? '/client/dashboard' : '/client/payment_methods')
|
||||
->withMessage(trans('texts.updated_client_details'));
|
||||
}
|
||||
}
|
||||
|
@ -133,7 +133,7 @@
|
||||
<p> </p>
|
||||
|
||||
<center>
|
||||
{!! Button::normal(strtoupper(trans('texts.cancel') ))->asLinkTo('/client/dashboard')->large() !!}
|
||||
{!! Button::normal(strtoupper(trans('texts.cancel') ))->asLinkTo($account->enable_client_portal_dashboard ? '/client/dashboard' : '/client/payment_methods')->large() !!}
|
||||
{!! Button::success(strtoupper(trans('texts.save') ))->submit()->large() !!}
|
||||
</center>
|
||||
|
||||
|
@ -3,8 +3,19 @@
|
||||
@section('content')
|
||||
<div class="container main-container">
|
||||
|
||||
@include('payments.paymentmethods_list')
|
||||
<p> </p>
|
||||
|
||||
<p></p>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="pull-left">
|
||||
@include('payments.paymentmethods_list')
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
{!! Button::success(strtoupper(trans("texts.edit_details")))->asLinkTo(URL::to('/client/details'))->withAttributes(['id' => 'editDetailsButton']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p> </p>
|
||||
</div>
|
||||
@stop
|
||||
|
@ -106,11 +106,6 @@
|
||||
{!! link_to('/client/documents', trans('texts.documents') ) !!}
|
||||
</li>
|
||||
@endif
|
||||
@if (isset($hasPaymentMethods) && $hasPaymentMethods)
|
||||
<li {!! Request::is('*client/payment_methods') ? 'class="active"' : '' !!}>
|
||||
{!! link_to('/client/payment_methods', trans('texts.payment_methods') ) !!}
|
||||
</li>
|
||||
@endif
|
||||
<li {!! Request::is('*client/payments') ? 'class="active"' : '' !!}>
|
||||
{!! link_to('/client/payments', trans('texts.payments') ) !!}
|
||||
</li>
|
||||
@ -119,6 +114,11 @@
|
||||
{!! link_to('/client/credits', trans('texts.credits') ) !!}
|
||||
</li>
|
||||
@endif
|
||||
@if (isset($hasPaymentMethods) && $hasPaymentMethods)
|
||||
<li {!! Request::is('*client/payment_methods') ? 'class="active"' : '' !!}>
|
||||
{!! link_to('/client/payment_methods', trans('texts.payment_methods') ) !!}
|
||||
</li>
|
||||
@endif
|
||||
@if ($account->enable_portal_password && request()->contact->password)
|
||||
<li>
|
||||
{!! link_to('/client/logout', trans('texts.logout')) !!}
|
||||
|
Loading…
x
Reference in New Issue
Block a user