fix: 🐛 Fix cpgg bad code bug -> doesNotFit can be undefined...

This commit is contained in:
IceToast 2022-11-16 18:10:00 +01:00
parent 549b2830f9
commit bacab7bb18

View file

@ -228,8 +228,8 @@
</div>
</div>
<button type="submit" x-model="selectedProduct" name="product"
:disabled="product.minimum_credits > user.credits || product.price > user.credits || product.doesNotFit"
:class="product.minimum_credits > user.credits || product.price > user.credits ? 'disabled' : ''"
:disabled="product.doesNotFit || product.minimum_credits > user.credits || product.price > user.credits"
:class="product.doesNotFit || product.minimum_credits > user.credits || product.price > user.credits ? 'disabled' : ''"
class="btn btn-primary btn-block mt-2" @click="setProduct(product.id)"
x-text="product.doesNotFit ? '{{ __('Server cannot fit on this node') }}' : product.minimum_credits > user.credits || product.price > user.credits ? '{{ __('Not enough') }} {{ CREDITS_DISPLAY_NAME }}!' : '{{ __('Create server') }}'">
</button>