From 92770d855a010151bed13f79ddea915d39353b1b Mon Sep 17 00:00:00 2001 From: Luca Longo Date: Thu, 16 May 2024 13:14:43 +0200 Subject: [PATCH] Update quantity.blade.php --- resources/views/quantity.blade.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/views/quantity.blade.php b/resources/views/quantity.blade.php index 3cd1380..c8b054c 100644 --- a/resources/views/quantity.blade.php +++ b/resources/views/quantity.blade.php @@ -52,8 +52,9 @@ minValue: {{ $getMinValue ?? 0 }}, isDecrementAllowed: true, isIncrementAllowed: true, + isDisabled: {{ $isDisabled ? 'true' : 'false' }} increment() { - if(this.state < this.maxValue && this.state >= this.minValue){ + if(! this.isDisabled && this.state < this.maxValue && this.state >= this.minValue){ this.state++ $wire.$refresh() if(this.state == this.maxValue){ @@ -65,7 +66,7 @@ } }, decrement() { - if(this.state > 0 && this.state <= this.maxValue && this.state > this.minValue) { + if(! this.isDisabled && this.state > 0 && this.state <= this.maxValue && this.state > this.minValue) { this.state-- $wire.$refresh() if(this.state == this.minValue){