mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #6536 from turbo124/v5-develop
Minor fixes for hosted platform.
This commit is contained in:
commit
a7f1203578
@ -13,6 +13,7 @@ namespace App\Http\Controllers\Auth;
|
|||||||
|
|
||||||
use App\Events\Contact\ContactLoggedIn;
|
use App\Events\Contact\ContactLoggedIn;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Libraries\MultiDB;
|
||||||
use App\Models\Account;
|
use App\Models\Account;
|
||||||
use App\Models\ClientContact;
|
use App\Models\ClientContact;
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
@ -40,8 +41,16 @@ class ContactLoginController extends Controller
|
|||||||
$company = null;
|
$company = null;
|
||||||
}elseif (strpos($request->getHost(), 'invoicing.co') !== false) {
|
}elseif (strpos($request->getHost(), 'invoicing.co') !== false) {
|
||||||
$subdomain = explode('.', $request->getHost())[0];
|
$subdomain = explode('.', $request->getHost())[0];
|
||||||
|
|
||||||
|
MultiDB::findAndSetDbByDomain(['subdomain' => $subdomain]);
|
||||||
|
|
||||||
$company = Company::where('subdomain', $subdomain)->first();
|
$company = Company::where('subdomain', $subdomain)->first();
|
||||||
} elseif(Ninja::isHosted() && $company = Company::where('portal_domain', $request->getSchemeAndHttpHost())->first()){
|
|
||||||
|
} elseif(Ninja::isHosted()){
|
||||||
|
|
||||||
|
MultiDB::findAndSetDbByDomain(['portal_domain' => $request->getSchemeAndHttpHost()]);
|
||||||
|
|
||||||
|
$company = Company::where('portal_domain', $request->getSchemeAndHttpHost())->first();
|
||||||
|
|
||||||
}
|
}
|
||||||
elseif (Ninja::isSelfHost()) {
|
elseif (Ninja::isSelfHost()) {
|
||||||
|
@ -79,7 +79,7 @@ class PortalComposer
|
|||||||
$data['currencies'] = TranslationHelper::getCurrencies();
|
$data['currencies'] = TranslationHelper::getCurrencies();
|
||||||
$data['contact'] = auth('contact')->user();
|
$data['contact'] = auth('contact')->user();
|
||||||
|
|
||||||
$data['multiple_contacts'] = session()->get('multiple_contacts');
|
$data['multiple_contacts'] = session()->get('multiple_contacts') ?: collect();
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,7 @@ input:checked ~ .dot {
|
|||||||
class="flex flex-col items-center justify-center w-full h-full py-6 rounded-b-lg bg-blue-700"
|
class="flex flex-col items-center justify-center w-full h-full py-6 rounded-b-lg bg-blue-700"
|
||||||
>
|
>
|
||||||
<p class="text-xl text-white">
|
<p class="text-xl text-white">
|
||||||
Buy 10 get 2 free!
|
Buy 10 months get 2 free!
|
||||||
</p>
|
</p>
|
||||||
<a type="button" class="w-5/6 py-2 mt-2 font-semibold text-center uppercase bg-white border border-transparent rounded text-blue-500" href="https://invoiceninja.invoicing.co/client/subscriptions/q9wdL9wejP/purchase">
|
<a type="button" class="w-5/6 py-2 mt-2 font-semibold text-center uppercase bg-white border border-transparent rounded text-blue-500" href="https://invoiceninja.invoicing.co/client/subscriptions/q9wdL9wejP/purchase">
|
||||||
Purchase
|
Purchase
|
||||||
@ -150,7 +150,7 @@ input:checked ~ .dot {
|
|||||||
class="flex flex-col items-center justify-center w-full h-full py-6 rounded-b-lg bg-blue-700"
|
class="flex flex-col items-center justify-center w-full h-full py-6 rounded-b-lg bg-blue-700"
|
||||||
>
|
>
|
||||||
<p class="text-xl text-white">
|
<p class="text-xl text-white">
|
||||||
Buy 10 get 2 free!
|
Buy 10 months get 2 free!
|
||||||
</p>
|
</p>
|
||||||
<a type="button" class="w-5/6 py-2 mt-2 font-semibold text-center uppercase bg-white border border-transparent rounded text-blue-500" href="https://invoiceninja.invoicing.co/client/subscriptions/LYqaQWldnj/purchase">
|
<a type="button" class="w-5/6 py-2 mt-2 font-semibold text-center uppercase bg-white border border-transparent rounded text-blue-500" href="https://invoiceninja.invoicing.co/client/subscriptions/LYqaQWldnj/purchase">
|
||||||
Purchase
|
Purchase
|
||||||
|
Loading…
x
Reference in New Issue
Block a user