diff --git a/app/Http/Controllers/ClientPortal/InvitationController.php b/app/Http/Controllers/ClientPortal/InvitationController.php index 7b5de6d26771..15efa85a4f4d 100644 --- a/app/Http/Controllers/ClientPortal/InvitationController.php +++ b/app/Http/Controllers/ClientPortal/InvitationController.php @@ -87,7 +87,7 @@ class InvitationController extends Controller ->firstOrFail(); if ($invitation->trashed() || $invitation->{$entity}->is_deleted) { - return $this->render('generic.not_available', ['account' => $invitation->company->account, 'company' => $invitation->company]); + return $this->render('generic.not_available', ['passed_account' => $invitation->company->account, 'passed_company' => $invitation->company]); } if ($invitation->contact->trashed()) { @@ -138,11 +138,10 @@ class InvitationController extends Controller return redirect()->route('client.'.$entity.'.show', [$entity => $this->encodePrimaryKey($invitation->{$key}), 'silent' => $is_silent]); - return redirect()->route('client.'.$entity.'.show', [$entity => $this->encodePrimaryKey($invitation->{$key}), 'silent' => $is_silent])->header('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0'); } + return redirect()->route('client.'.$entity.'.show', [$entity => $this->encodePrimaryKey($invitation->{$key})]); - return redirect()->route('client.'.$entity.'.show', [$entity => $this->encodePrimaryKey($invitation->{$key})])->header('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0'); } private function fireEntityViewedEvent($invitation, $entity_string) diff --git a/app/Http/Controllers/ClientPortal/SubscriptionPurchaseController.php b/app/Http/Controllers/ClientPortal/SubscriptionPurchaseController.php index ad0e0f212fb7..ffc5e517eeaf 100644 --- a/app/Http/Controllers/ClientPortal/SubscriptionPurchaseController.php +++ b/app/Http/Controllers/ClientPortal/SubscriptionPurchaseController.php @@ -26,7 +26,7 @@ class SubscriptionPurchaseController extends Controller App::setLocale($subscription->company->locale()); if ($subscription->trashed()) { - return $this->render('generic.not_available', ['account' => $subscription->company->account, 'company' => $subscription->company]); + return $this->render('generic.not_available', ['passed_account' => $subscription->company->account, 'passed_company' => $subscription->company]); } /* Make sure the contact is logged into the correct company for this subscription */ diff --git a/resources/views/portal/ninja2020/generic/not_available.blade.php b/resources/views/portal/ninja2020/generic/not_available.blade.php index 1deda7c06152..82170016538a 100644 --- a/resources/views/portal/ninja2020/generic/not_available.blade.php +++ b/resources/views/portal/ninja2020/generic/not_available.blade.php @@ -7,15 +7,15 @@
- @if($account && !$account->isPaid()) + @if($passed_account && !$passed_account->isPaid())
Invoice Ninja logo
- @elseif(isset($company) && !is_null($company)) + @elseif(isset($passed_company) && !is_null($passed_company))
- {{ $company->present()->name() }} logo + {{ $passed_company->present()->name() }} logo
@endif

{{ ctrans("texts.entity_removed_title") }}