Buy more button, if user does not have enough credits
This commit is contained in:
parent
159ba02c84
commit
920279cc37
|
@ -122,7 +122,8 @@ class ServerController extends Controller
|
||||||
'user' => Auth::user(),
|
'user' => Auth::user(),
|
||||||
'server_creation_enabled' => $server_settings->creation_enabled,
|
'server_creation_enabled' => $server_settings->creation_enabled,
|
||||||
'min_credits_to_make_server' => $user_settings->min_credits_to_make_server,
|
'min_credits_to_make_server' => $user_settings->min_credits_to_make_server,
|
||||||
'credits_display_name' => $general_settings->credits_display_name
|
'credits_display_name' => $general_settings->credits_display_name,
|
||||||
|
'store_enabled' => $general_settings->store_enabled
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -655,5 +655,6 @@
|
||||||
"You can not see your Referral Code": "You can not see your Referral Code",
|
"You can not see your Referral Code": "You can not see your Referral Code",
|
||||||
"SERVER NAME": "SERVER NAME",
|
"SERVER NAME": "SERVER NAME",
|
||||||
"STORAGE": "STORAGE",
|
"STORAGE": "STORAGE",
|
||||||
"Cancel": "Cancel"
|
"Cancel": "Cancel",
|
||||||
|
"Buy more": "Buy more"
|
||||||
}
|
}
|
||||||
|
|
|
@ -250,6 +250,15 @@
|
||||||
class="btn btn-primary btn-block mt-2" @click="setProduct(product.id);"
|
class="btn btn-primary btn-block mt-2" @click="setProduct(product.id);"
|
||||||
x-text="product.doesNotFit == true ? '{{ __('Server cant fit on this Node') }}' : (product.minimum_credits > user.credits || product.price > user.credits ? '{{ __('Not enough') }} {{ $credits_display_name }}!' : '{{ __('Create server') }}')">
|
x-text="product.doesNotFit == true ? '{{ __('Server cant fit on this Node') }}' : (product.minimum_credits > user.credits || product.price > user.credits ? '{{ __('Not enough') }} {{ $credits_display_name }}!' : '{{ __('Create server') }}')">
|
||||||
</button>
|
</button>
|
||||||
|
@if (env('APP_ENV') == 'local' || $store_enabled)
|
||||||
|
<template x-if="product.price > user.credits">
|
||||||
|
<a href="{{ route('store.index') }}">
|
||||||
|
<button type="button" class="btn btn-warning btn-block mt-2">
|
||||||
|
{{ __('Buy more') }} {{ $credits_display_name }}
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</template>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue