1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

Performance improvements for client portal

This commit is contained in:
David Bomba 2021-12-07 22:14:46 +11:00
parent 0c267131c4
commit 49ecf295a8
7 changed files with 10 additions and 10 deletions

View File

@ -25,7 +25,7 @@ class ContactHashLoginController extends Controller
*/
public function login(string $contact_key)
{
if(request()->has('subscription') && $request->subscription == 'true') {
if(request()->has('subscription') && request()->subscription == 'true') {
$recurring_invoice = RecurringInvoice::where('client_id', auth()->guard('contact')->client->id)
->whereNotNull('subscription_id')

View File

@ -82,6 +82,7 @@ class InvoicesTable extends Component
return render('components.livewire.invoices-table', [
'invoices' => $query,
'gateway_available' => !empty(auth()->user()->client->service()->getPaymentMethods(0)),
]);
}
}

View File

@ -38,10 +38,11 @@ class SetDomainNameDb
if(!config('ninja.db.multi_db_enabled'))
return $next($request);
$domain_name = $request->getHost();
if (strpos($request->getHost(), 'invoicing.co') !== false)
if (strpos($domain_name, 'invoicing.co') !== false)
{
$subdomain = explode('.', $request->getHost())[0];
$subdomain = explode('.', $domain_name)[0];
$query = [
'subdomain' => $subdomain,
@ -86,8 +87,6 @@ class SetDomainNameDb
}
// config(['app.url' => $request->getSchemeAndHttpHost()]);
return $next($request);
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"/livewire.js":"/livewire.js?id=21fa1dd78491a49255cd"}
{"/livewire.js":"/livewire.js?id=ece4c4ab4b746f6f1739"}

View File

@ -94,7 +94,7 @@
{!! App\Models\Invoice::badgeForStatus($invoice->status) !!}
</td>
<td class="flex items-center justify-end px-6 py-4 text-sm font-medium leading-5 whitespace-nowrap">
@if($invoice->isPayable() && $invoice->balance > 0 && !empty(auth()->user()->client->service()->getPaymentMethods(0)))
@if($invoice->isPayable() && $invoice->balance > 0 && $gateway_available)
<form action="{{ route('client.invoices.bulk') }}" method="post">
@csrf
<input type="hidden" name="invoices[]" value="{{ $invoice->hashed_id }}">
@ -121,7 +121,7 @@
</div>
</div>
<div class="flex justify-center mt-6 mb-6 md:justify-between">
@if($invoices->total() > 0)
@if($invoices && $invoices->total() > 0)
<span class="hidden text-sm text-gray-700 md:block mr-2">
{{ ctrans('texts.showing_x_of', ['first' => $invoices->firstItem(), 'last' => $invoices->lastItem(), 'total' => $invoices->total()]) }}
</span>