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

Merge pull request #3797 from turbo124/v2

Fixes for Client Portal Datatables
This commit is contained in:
David Bomba 2020-06-10 23:36:37 +10:00 committed by GitHub
commit 7dfc396ffc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View File

@ -17,7 +17,7 @@ class CreditsTable extends Component
public function render()
{
$query = Credit::query()
->where('company_id', auth('contact')->user()->company->id)
->where('client_id', auth('contact')->user()->client->id)
->orderBy($this->sort_field, $this->sort_asc ? 'asc' : 'desc')
->paginate($this->per_page);

View File

@ -30,6 +30,7 @@ class InvoicesTable extends Component
public function render()
{
$query = Invoice::query()
->orderBy($this->sort_field, $this->sort_asc ? 'asc' : 'desc');
@ -48,7 +49,7 @@ class InvoicesTable extends Component
}
$query = $query
->where('company_id', auth('contact')->user()->company->id)
->where('client_id', auth('contact')->user()->client->id)
->paginate($this->per_page);
return render('components.livewire.invoices-table', [

View File

@ -24,7 +24,6 @@ class PaymentMethodsTable extends Component
{
$query = ClientGatewayToken::query()
->with('gateway_type')
->where('company_id', auth('contact')->user()->company->id)
->where('client_id', $this->client->id)
->orderBy($this->sort_field, $this->sort_asc ? 'asc' : 'desc')
->paginate($this->per_page);

View File

@ -24,7 +24,7 @@ class PaymentsTable extends Component
{
$query = Payment::query()
->with('type', 'client')
->where('company_id', auth('contact')->user()->company->id)
->where('client_id', auth('contact')->user()->client->id)
->orderBy($this->sort_field, $this->sort_asc ? 'asc' : 'desc')
->paginate($this->per_page);

View File

@ -46,7 +46,7 @@ class QuotesTable extends Component
}
$query = $query
->where('company_id', auth('contact')->user()->company->id)
->where('client_id', auth('contact')->user()->client->id)
->paginate($this->per_page);
return render('components.livewire.quotes-table', [

View File

@ -18,7 +18,7 @@ class RecurringInvoicesTable extends Component
$query = RecurringInvoice::query();
$query = $query
->where('company_id', auth('contact')->user()->company->id)
->where('client_id', auth('contact')->user()->client->id)
->whereIn('status_id', [RecurringInvoice::STATUS_PENDING, RecurringInvoice::STATUS_ACTIVE, RecurringInvoice::STATUS_COMPLETED])
->orderBy('status_id', 'asc')
->with('client')