mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Quotes
This commit is contained in:
parent
bb8bee0304
commit
d5326f4873
@ -20,6 +20,7 @@ use App\Models\Expense;
|
|||||||
use App\Models\Invoice;
|
use App\Models\Invoice;
|
||||||
use App\Models\Payment;
|
use App\Models\Payment;
|
||||||
use App\Models\Project;
|
use App\Models\Project;
|
||||||
|
use App\Models\Quote;
|
||||||
use App\Utils\Traits\WithSorting;
|
use App\Utils\Traits\WithSorting;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
use Livewire\WithPagination;
|
use Livewire\WithPagination;
|
||||||
@ -83,6 +84,10 @@ class DocumentsTable extends Component
|
|||||||
$this->query = $this->projects();
|
$this->query = $this->projects();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'quotes':
|
||||||
|
$this->query = $this->quotes();
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$this->query = $this->documents();
|
$this->query = $this->documents();
|
||||||
break;
|
break;
|
||||||
@ -133,4 +138,12 @@ class DocumentsTable extends Component
|
|||||||
$query->where('client_id', $this->client->id);
|
$query->where('client_id', $this->client->id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function quotes()
|
||||||
|
{
|
||||||
|
return Document::query()
|
||||||
|
->whereHasMorph('documentable', [Quote::class], function ($query) {
|
||||||
|
$query->where('client_id', $this->client->id);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,12 @@
|
|||||||
wire:click="updateResources('projects')" />
|
wire:click="updateResources('projects')" />
|
||||||
{{ ctrans('texts.projects') }}
|
{{ ctrans('texts.projects') }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
class="button border border-transparent hover:border-gray-600 {{ $tab === 'quotes' ? 'border-gray-600' : '' }}"ž
|
||||||
|
wire:click="updateResources('quotes')" />
|
||||||
|
{{ ctrans('texts.quotes') }}
|
||||||
|
</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