Browse Source

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

IceToast 2 năm trước cách đây
mục cha
commit
bacab7bb18
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      resources/views/servers/create.blade.php

+ 2 - 2
resources/views/servers/create.blade.php

@@ -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>