From f8e57f57a56e677afaec4877b06a1996cfd172bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Thu, 14 Jan 2021 14:17:39 +0100 Subject: [PATCH 1/3] Remove drafts from the quotes-table --- app/Http/Livewire/QuotesTable.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Livewire/QuotesTable.php b/app/Http/Livewire/QuotesTable.php index 44a131496e09..c14847eccd98 100644 --- a/app/Http/Livewire/QuotesTable.php +++ b/app/Http/Livewire/QuotesTable.php @@ -36,6 +36,7 @@ class QuotesTable extends Component $query = $query ->where('client_id', auth('contact')->user()->client->id) + ->where('status_id', '<>', Quote::STATUS_DRAFT) ->paginate($this->per_page); return render('components.livewire.quotes-table', [ From ab4ed1f2b0b38bb4980bc724bda9e1dd43ea21a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Thu, 14 Jan 2021 14:22:01 +0100 Subject: [PATCH 2/3] add status converted --- app/Models/Quote.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Models/Quote.php b/app/Models/Quote.php index 8421a3e02c74..4fc097bd0e81 100644 --- a/app/Models/Quote.php +++ b/app/Models/Quote.php @@ -226,6 +226,8 @@ class Quote extends BaseModel case self::STATUS_EXPIRED: return '
'.ctrans('texts.expired').'
'; break; + case self::STATUS_CONVERTED: + return '
'.ctrans('texts.converted').'
'; default: // code... break; From a43d7560683634afd7c3bde237aaae520811848e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Thu, 14 Jan 2021 14:24:43 +0100 Subject: [PATCH 3/3] missing break --- app/Models/Quote.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Models/Quote.php b/app/Models/Quote.php index 4fc097bd0e81..8f7520c81aae 100644 --- a/app/Models/Quote.php +++ b/app/Models/Quote.php @@ -228,6 +228,7 @@ class Quote extends BaseModel break; case self::STATUS_CONVERTED: return '
'.ctrans('texts.converted').'
'; + break; default: // code... break;