mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 05:14:30 -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\Project;
|
||||||
use App\Models\Quote;
|
use App\Models\Quote;
|
||||||
use App\Models\RecurringInvoice;
|
use App\Models\RecurringInvoice;
|
||||||
|
use App\Models\Task;
|
||||||
use App\Utils\Traits\WithSorting;
|
use App\Utils\Traits\WithSorting;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
use Livewire\WithPagination;
|
use Livewire\WithPagination;
|
||||||
@ -93,6 +94,10 @@ class DocumentsTable extends Component
|
|||||||
$this->query = $this->recurringInvoices();
|
$this->query = $this->recurringInvoices();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'tasks':
|
||||||
|
$this->query = $this->tasks();
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$this->query = $this->documents();
|
$this->query = $this->documents();
|
||||||
break;
|
break;
|
||||||
@ -159,4 +164,12 @@ class DocumentsTable extends Component
|
|||||||
$query->where('client_id', $this->client->id);
|
$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')" />
|
wire:click="updateResources('recurringInvoices')" />
|
||||||
{{ ctrans('texts.recurring_invoices') }}
|
{{ ctrans('texts.recurring_invoices') }}
|
||||||
</button>
|
</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>
|
||||||
|
|
||||||
<div class="flex items-center justify-between mt-6">
|
<div class="flex items-center justify-between mt-6">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user