Fixes for showing tasks in client portal

This commit is contained in:
David Bomba 2023-10-18 10:30:45 +11:00
parent d06f383a98
commit d62bdbedcb
2 changed files with 3 additions and 2 deletions

View File

@ -157,6 +157,7 @@ class RecurringInvoiceController extends BaseController
$user = auth()->user();
$recurring_invoice = RecurringInvoiceFactory::create($user->company()->id, $user->id);
$recurring_invoice->auto_bill = $user->company()->settings->auto_bill;
return $this->itemResponse($recurring_invoice);
}

View File

@ -39,11 +39,11 @@ class TasksTable extends Component
->where('is_deleted', false)
->where('client_id', auth()->guard('contact')->user()->client_id);
if ($this->company->getSetting('show_all_tasks_client_portal') === 'invoiced') {
if ( auth()->guard('contact')->user()->client->getSetting('show_all_tasks_client_portal') === 'invoiced') {
$query = $query->whereNotNull('invoice_id');
}
if ($this->company->getSetting('show_all_tasks_client_portal') === 'uninvoiced') {
if ( auth()->guard('contact')->user()->client->getSetting('show_all_tasks_client_portal') === 'uninvoiced') {
$query = $query->whereNull('invoice_id');
}