mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 00:24:33 -04:00
Performance improvements for client portal
This commit is contained in:
parent
0c267131c4
commit
49ecf295a8
@ -25,7 +25,7 @@ class ContactHashLoginController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function login(string $contact_key)
|
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)
|
$recurring_invoice = RecurringInvoice::where('client_id', auth()->guard('contact')->client->id)
|
||||||
->whereNotNull('subscription_id')
|
->whereNotNull('subscription_id')
|
||||||
|
@ -82,6 +82,7 @@ class InvoicesTable extends Component
|
|||||||
|
|
||||||
return render('components.livewire.invoices-table', [
|
return render('components.livewire.invoices-table', [
|
||||||
'invoices' => $query,
|
'invoices' => $query,
|
||||||
|
'gateway_available' => !empty(auth()->user()->client->service()->getPaymentMethods(0)),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,10 +38,11 @@ class SetDomainNameDb
|
|||||||
if(!config('ninja.db.multi_db_enabled'))
|
if(!config('ninja.db.multi_db_enabled'))
|
||||||
return $next($request);
|
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 = [
|
$query = [
|
||||||
'subdomain' => $subdomain,
|
'subdomain' => $subdomain,
|
||||||
@ -86,8 +87,6 @@ class SetDomainNameDb
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// config(['app.url' => $request->getSchemeAndHttpHost()]);
|
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
public/vendor/livewire/livewire.js
vendored
2
public/vendor/livewire/livewire.js
vendored
File diff suppressed because one or more lines are too long
2
public/vendor/livewire/livewire.js.map
vendored
2
public/vendor/livewire/livewire.js.map
vendored
File diff suppressed because one or more lines are too long
2
public/vendor/livewire/manifest.json
vendored
2
public/vendor/livewire/manifest.json
vendored
@ -1 +1 @@
|
|||||||
{"/livewire.js":"/livewire.js?id=21fa1dd78491a49255cd"}
|
{"/livewire.js":"/livewire.js?id=ece4c4ab4b746f6f1739"}
|
@ -94,7 +94,7 @@
|
|||||||
{!! App\Models\Invoice::badgeForStatus($invoice->status) !!}
|
{!! App\Models\Invoice::badgeForStatus($invoice->status) !!}
|
||||||
</td>
|
</td>
|
||||||
<td class="flex items-center justify-end px-6 py-4 text-sm font-medium leading-5 whitespace-nowrap">
|
<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">
|
<form action="{{ route('client.invoices.bulk') }}" method="post">
|
||||||
@csrf
|
@csrf
|
||||||
<input type="hidden" name="invoices[]" value="{{ $invoice->hashed_id }}">
|
<input type="hidden" name="invoices[]" value="{{ $invoice->hashed_id }}">
|
||||||
@ -121,7 +121,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-center mt-6 mb-6 md:justify-between">
|
<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">
|
<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()]) }}
|
{{ ctrans('texts.showing_x_of', ['first' => $invoices->firstItem(), 'last' => $invoices->lastItem(), 'total' => $invoices->total()]) }}
|
||||||
</span>
|
</span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user