mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 19:54:36 -04:00
Tasks
This commit is contained in:
parent
f179831e06
commit
6ee51e87bc
@ -22,6 +22,7 @@ use App\Models\Payment;
|
||||
use App\Models\Project;
|
||||
use App\Models\Quote;
|
||||
use App\Models\RecurringInvoice;
|
||||
use App\Models\Task;
|
||||
use App\Utils\Traits\WithSorting;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
@ -93,6 +94,10 @@ class DocumentsTable extends Component
|
||||
$this->query = $this->recurringInvoices();
|
||||
break;
|
||||
|
||||
case 'tasks':
|
||||
$this->query = $this->tasks();
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->query = $this->documents();
|
||||
break;
|
||||
@ -159,4 +164,12 @@ class DocumentsTable extends Component
|
||||
$query->where('client_id', $this->client->id);
|
||||
});
|
||||
}
|
||||
|
||||
protected function tasks()
|
||||
{
|
||||
return Document::query()
|
||||
->whereHasMorph('documentable', [Task::class], function ($query) {
|
||||
$query->where('client_id', $this->client->id);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -47,6 +47,12 @@
|
||||
wire:click="updateResources('recurringInvoices')" />
|
||||
{{ ctrans('texts.recurring_invoices') }}
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="button border border-transparent hover:border-gray-600 {{ $tab === 'tasks' ? 'border-gray-600' : '' }}"ž
|
||||
wire:click="updateResources('tasks')" />
|
||||
{{ ctrans('texts.tasks') }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between mt-6">
|
||||
|
Loading…
x
Reference in New Issue
Block a user