feat: ✨ Added billing period to edit, create and show of products
This commit is contained in:
parent
9777e22eab
commit
7dab9d3c7e
|
@ -116,6 +116,20 @@
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="allocations">{{__('Allocations')}}</label>
|
||||||
|
<input value="{{$product->allocations ?? old('allocations') ?? 0}}"
|
||||||
|
id="allocations" name="allocations"
|
||||||
|
type="number"
|
||||||
|
class="form-control @error('allocations') is-invalid @enderror"
|
||||||
|
required="required">
|
||||||
|
@error('allocations')
|
||||||
|
<div class="invalid-feedback">
|
||||||
|
{{ $message }}
|
||||||
|
</div>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="description">{{__('Description')}} <i data-toggle="popover"
|
<label for="description">{{__('Description')}} <i data-toggle="popover"
|
||||||
data-trigger="hover"
|
data-trigger="hover"
|
||||||
|
@ -148,6 +162,34 @@
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="billing_period">{{__('Billing Period')}} <i
|
||||||
|
data-toggle="popover" data-trigger="hover"
|
||||||
|
data-content="{{__('Period when the user will be charged for the given price')}}"
|
||||||
|
class="fas fa-info-circle"></i></label>
|
||||||
|
|
||||||
|
<select id="billing_period" style="width:100%" class="custom-select" name="billing_period" required
|
||||||
|
autocomplete="off" @error('billing_period') is-invalid @enderror>
|
||||||
|
<option value="hourly" @if ($product->billing_period == 'hourly') selected
|
||||||
|
@endif>
|
||||||
|
{{__('Hourly')}}
|
||||||
|
</option>
|
||||||
|
<option value="daily" @if ($product->billing_period == 'daily') selected
|
||||||
|
@endif>
|
||||||
|
{{__('Daily')}}
|
||||||
|
</option>
|
||||||
|
<option value="monthly" @if ($product->billing_period == 'monthly') selected
|
||||||
|
@endif>
|
||||||
|
{{__('Monthly')}}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
@error('billing_period')
|
||||||
|
<div class="invalid-feedback">
|
||||||
|
{{ $message }}
|
||||||
|
</div>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="minimum_credits">{{__('Minimum')}} {{ CREDITS_DISPLAY_NAME }} <i
|
<label for="minimum_credits">{{__('Minimum')}} {{ CREDITS_DISPLAY_NAME }} <i
|
||||||
data-toggle="popover" data-trigger="hover"
|
data-toggle="popover" data-trigger="hover"
|
||||||
|
@ -205,19 +247,6 @@
|
||||||
</div>
|
</div>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label for="allocations">{{__('Allocations')}}</label>
|
|
||||||
<input value="{{$product->allocations ?? old('allocations') ?? 0}}"
|
|
||||||
id="allocations" name="allocations"
|
|
||||||
type="number"
|
|
||||||
class="form-control @error('allocations') is-invalid @enderror"
|
|
||||||
required="required">
|
|
||||||
@error('allocations')
|
|
||||||
<div class="invalid-feedback">
|
|
||||||
{{ $message }}
|
|
||||||
</div>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,18 @@
|
||||||
</div>
|
</div>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="allocations">{{__('Allocations')}}</label>
|
||||||
|
<input value="{{ $product->allocations }}" id="allocations"
|
||||||
|
name="allocations" type="number"
|
||||||
|
class="form-control @error('allocations') is-invalid @enderror"
|
||||||
|
required="required">
|
||||||
|
@error('allocations')
|
||||||
|
<div class="invalid-feedback">
|
||||||
|
{{ $message }}
|
||||||
|
</div>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="description">{{__('Description')}} <i data-toggle="popover"
|
<label for="description">{{__('Description')}} <i data-toggle="popover"
|
||||||
data-trigger="hover"
|
data-trigger="hover"
|
||||||
|
@ -152,6 +163,35 @@
|
||||||
</div>
|
</div>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="billing_period">{{__('Billing Period')}} <i
|
||||||
|
data-toggle="popover" data-trigger="hover"
|
||||||
|
data-content="{{__('Period when the user will be charged for the given price')}}"
|
||||||
|
class="fas fa-info-circle"></i></label>
|
||||||
|
|
||||||
|
<select id="billing_period" style="width:100%" class="custom-select" name="billing_period" required
|
||||||
|
autocomplete="off" @error('billing_period') is-invalid @enderror>
|
||||||
|
<option value="hourly" @if ($product->billing_period == 'hourly') selected
|
||||||
|
@endif>
|
||||||
|
{{__('Hourly')}}
|
||||||
|
</option>
|
||||||
|
<option value="daily" @if ($product->billing_period == 'daily') selected
|
||||||
|
@endif>
|
||||||
|
{{__('Daily')}}
|
||||||
|
</option>
|
||||||
|
<option value="monthly" @if ($product->billing_period == 'monthly') selected
|
||||||
|
@endif>
|
||||||
|
{{__('Monthly')}}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
@error('billing_period')
|
||||||
|
<div class="invalid-feedback">
|
||||||
|
{{ $message }}
|
||||||
|
</div>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="minimum_credits">{{__('Minimum')}} {{ CREDITS_DISPLAY_NAME }} <i
|
<label for="minimum_credits">{{__('Minimum')}} {{ CREDITS_DISPLAY_NAME }} <i
|
||||||
data-toggle="popover" data-trigger="hover"
|
data-toggle="popover" data-trigger="hover"
|
||||||
|
@ -202,18 +242,6 @@
|
||||||
</div>
|
</div>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label for="allocations">{{__('Allocations')}}</label>
|
|
||||||
<input value="{{ $product->allocations }}" id="allocations"
|
|
||||||
name="allocations" type="number"
|
|
||||||
class="form-control @error('allocations') is-invalid @enderror"
|
|
||||||
required="required">
|
|
||||||
@error('allocations')
|
|
||||||
<div class="invalid-feedback">
|
|
||||||
{{ $message }}
|
|
||||||
</div>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
<th>{{__('Active')}}</th>
|
<th>{{__('Active')}}</th>
|
||||||
<th>{{__('Name')}}</th>
|
<th>{{__('Name')}}</th>
|
||||||
<th>{{__('Price')}}</th>
|
<th>{{__('Price')}}</th>
|
||||||
|
<th>{{__('Billing period')}}</th>
|
||||||
<th>{{__('Memory')}}</th>
|
<th>{{__('Memory')}}</th>
|
||||||
<th>{{__('Cpu')}}</th>
|
<th>{{__('Cpu')}}</th>
|
||||||
<th>{{__('Swap')}}</th>
|
<th>{{__('Swap')}}</th>
|
||||||
|
@ -92,6 +93,7 @@
|
||||||
{data: "disabled"},
|
{data: "disabled"},
|
||||||
{data: "name"},
|
{data: "name"},
|
||||||
{data: "price"},
|
{data: "price"},
|
||||||
|
{data: "billing_period"},
|
||||||
{data: "memory"},
|
{data: "memory"},
|
||||||
{data: "cpu"},
|
{data: "cpu"},
|
||||||
{data: "swap"},
|
{data: "swap"},
|
||||||
|
|
Loading…
Reference in a new issue