feat: Added different billing periods to servers overview page

This commit is contained in:
IceToast 2022-06-18 23:41:40 +02:00
parent 570b0b014f
commit 609041a967

View file

@ -127,22 +127,21 @@
({{ CREDITS_DISPLAY_NAME }}) ({{ CREDITS_DISPLAY_NAME }})
</span> </span>
</div> </div>
<div class="col-8"> <div class="col-8 text-center">
<div class="row"> <div class="text-muted">
<div class="col-6 text-center"> @if($server->product->billing_period == 'monthly')
<div class="text-muted">{{ __('per Hour') }}</div> {{ __('per Month') }}
<span> @elseif($server->product->billing_period == 'weekly')
{{ number_format($server->product->getHourlyPrice(), 2, '.', '') }} {{ __('per Week') }}
</span> @elseif($server->product->billing_period == 'daily')
{{ __('per Day') }}
@elseif($server->product->billing_period == 'hourly')
{{ __('per Hour') }}
@endif
</div> </div>
<div class="col-6 text-center"> <span>
<div class="text-muted">{{ __('per Month') }} {{ $server->product->price }}
</div> </span>
<span>
{{ $server->product->getHourlyPrice() * 24 * 30 }}
</span>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>