From 8839bfabd3abc3cbd6fdb42c5a31cf80b8025d3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Mon, 22 Mar 2021 13:32:29 +0100 Subject: [PATCH] Hide quantity if max_seats_limit = 1 --- app/Http/Livewire/BillingPortalPurchase.php | 3 +-- .../components/livewire/billing-portal-purchase.blade.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Http/Livewire/BillingPortalPurchase.php b/app/Http/Livewire/BillingPortalPurchase.php index b3a5148c7fc4..9e198d4aaa0f 100644 --- a/app/Http/Livewire/BillingPortalPurchase.php +++ b/app/Http/Livewire/BillingPortalPurchase.php @@ -309,8 +309,7 @@ class BillingPortalPurchase extends Component return $this->quantity; } - // TODO: Dave review. - if ($this->quantity >= $this->billing_subscription->max_seats_limit) { + if ($this->quantity >= $this->billing_subscription->max_seats_limit && $option == 'increment') { return $this->quantity; } diff --git a/resources/views/portal/ninja2020/components/livewire/billing-portal-purchase.blade.php b/resources/views/portal/ninja2020/components/livewire/billing-portal-purchase.blade.php index e548b1a2c65c..9719bcc3376c 100644 --- a/resources/views/portal/ninja2020/components/livewire/billing-portal-purchase.blade.php +++ b/resources/views/portal/ninja2020/components/livewire/billing-portal-purchase.blade.php @@ -20,7 +20,7 @@ @endif - @if($billing_subscription->per_seat_enabled) + @if($billing_subscription->per_seat_enabled && $billing_subscription->max_seats_limit > 1)
{{ ctrans('texts.qty') }}