1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Redirect client to dashboard at login if enabled

This commit is contained in:
Carrnell Technical Solutions 2024-05-05 15:05:46 -05:00 committed by GitHub
parent ac7d8b40fa
commit ba0eec48a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 3 deletions

View File

@ -165,7 +165,9 @@ class ContactLoginController extends Controller
private function setRedirectPath()
{
if (auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_INVOICES) {
if (auth()->guard('contact')->user()->client->getSetting('enable_client_portal_dashboard') === true) {
$this->redirectTo = '/client/dashboard';
} elseif (auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_INVOICES) {
$this->redirectTo = '/client/invoices';
} elseif (auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_RECURRING_INVOICES) {
$this->redirectTo = '/client/recurring_invoices';

View File

@ -64,7 +64,9 @@ class ContactHashLoginController extends Controller
private function setRedirectPath()
{
if (auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_INVOICES) {
if (auth()->guard('contact')->user()->client->getSetting('enable_client_portal_dashboard') === true) {
return '/client/dashboard';
} elseif (auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_INVOICES) {
return '/client/invoices';
} elseif (auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_RECURRING_INVOICES) {
return '/client/recurring_invoices';

View File

@ -161,7 +161,9 @@ class ContactKeyLogin
private function setRedirectPath()
{
if (auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_INVOICES) {
if (auth()->guard('contact')->user()->client->getSetting('enable_client_portal_dashboard') === true) {
return '/client/dashboard';
} elseif (auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_INVOICES) {
return '/client/invoices';
} elseif (auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_RECURRING_INVOICES) {
return '/client/recurring_invoices';