Buy more button, if user does not have enough credits
This commit is contained in:
parent
159ba02c84
commit
920279cc37
3 changed files with 13 additions and 2 deletions
|
@ -122,7 +122,8 @@ class ServerController extends Controller
|
|||
'user' => Auth::user(),
|
||||
'server_creation_enabled' => $server_settings->creation_enabled,
|
||||
'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",
|
||||
"SERVER NAME": "SERVER NAME",
|
||||
"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);"
|
||||
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>
|
||||
@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>
|
||||
|
|
Loading…
Add table
Reference in a new issue