mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 12:42:36 +01:00
Fix client overview portal link w/iframe
This commit is contained in:
parent
94296e6642
commit
2b7b9f83e4
@ -183,6 +183,7 @@ class Contact extends EntityModel implements AuthenticatableContract, CanResetPa
|
||||
}
|
||||
|
||||
$account = $this->account;
|
||||
$iframe_url = $account->iframe_url;
|
||||
$url = trim(SITE_URL, '/');
|
||||
|
||||
if ($account->hasFeature(FEATURE_CUSTOM_URL)) {
|
||||
@ -190,7 +191,13 @@ class Contact extends EntityModel implements AuthenticatableContract, CanResetPa
|
||||
$url = $account->present()->clientPortalLink();
|
||||
}
|
||||
|
||||
if ($this->account->subdomain) {
|
||||
if ($iframe_url) {
|
||||
if ($account->is_custom_domain) {
|
||||
$url = $iframe_url;
|
||||
} else {
|
||||
return "{$iframe_url}?{$this->contact_key}/client";
|
||||
}
|
||||
} elseif ($this->account->subdomain) {
|
||||
$url = Utils::replaceSubdomain($url, $account->subdomain);
|
||||
}
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ Route::group(['middleware' => ['lookup:contact', 'auth:client']], function () {
|
||||
Route::get('client/documents/js/{documents}/{filename}', 'ClientPortalController@getDocumentVFSJS');
|
||||
Route::get('client/documents/{invitation_key}/{documents}/{filename?}', 'ClientPortalController@getDocument');
|
||||
Route::get('client/documents/{invitation_key}/{filename?}', 'ClientPortalController@getInvoiceDocumentsZip');
|
||||
Route::get('client/{contact_key?}', 'ClientPortalController@dashboard');
|
||||
|
||||
Route::get('api/client.quotes', ['as' => 'api.client.quotes', 'uses' => 'ClientPortalController@quoteDatatable']);
|
||||
Route::get('api/client.credits', ['as' => 'api.client.credits', 'uses' => 'ClientPortalController@creditDatatable']);
|
||||
|
Loading…
Reference in New Issue
Block a user