mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 14:44:46 -04:00
Show tasks based on setting in the client portal
This commit is contained in:
parent
1ac4aa61a9
commit
1c96b358bf
@ -35,8 +35,17 @@ class TasksTable extends Component
|
|||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
$query = Task::query()
|
$query = Task::query()
|
||||||
->where('client_id', auth('contact')->user()->client->id)
|
->where('client_id', auth('contact')->user()->client->id);
|
||||||
->whereNotNull('invoice_id')
|
|
||||||
|
if ($this->company->getSetting('show_all_tasks_client_portal') === 'invoiced') {
|
||||||
|
$query = $query->whereNotNull('invoice_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->company->getSetting('show_all_tasks_client_portal') === 'uninvoiced') {
|
||||||
|
$query = $query->whereNull('invoice_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = $query
|
||||||
->orderBy($this->sort_field, $this->sort_asc ? 'asc' : 'desc')
|
->orderBy($this->sort_field, $this->sort_asc ? 'asc' : 'desc')
|
||||||
->paginate($this->per_page);
|
->paginate($this->per_page);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user