Change to Days/Hours and color changes
It now changes to x hours left when its less than 1 Day left. Also changes color ranging from more than 14 Days = Green Between 14 and 7 Days = Yellow less than 7 days = red Im sure theres a way better way to code this but it works
This commit is contained in:
parent
9fb8091ea5
commit
daf0bee8be
|
@ -38,7 +38,7 @@
|
|||
<!-- /.col -->
|
||||
<div class="col-12 col-sm-6 col-md-3">
|
||||
<div class="info-box mb-3">
|
||||
<span class="info-box-icon bg-danger elevation-1"><i class="fas fa-coins"></i></span>
|
||||
<span class="info-box-icon bg-secondary elevation-1"><i class="fas fa-coins"></i></span>
|
||||
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">{{CREDITS_DISPLAY_NAME}}</span>
|
||||
|
@ -66,21 +66,32 @@
|
|||
<!-- /.info-box -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
|
||||
|
||||
<div class="col-12 col-sm-6 col-md-3">
|
||||
<div class="info-box mb-3">
|
||||
<span class="info-box-icon bg-success elevation-1"><i class="fas fa-hourglass-half"></i></span>
|
||||
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">Time left</span>
|
||||
<span class="info-box-number">{{number_format((Auth::user()->Credits()*30)/$useage, 0, '.', '')}} <sup>days</sup></span>
|
||||
<div class="col-12 col-sm-6 col-md-3">
|
||||
<div class="info-box mb-3">
|
||||
@if(number_format((Auth::user()->Credits()*30)/$useage,0,'.','') >= 15)
|
||||
<span class="info-box-icon bg-success elevation-1">
|
||||
@elseif (number_format((Auth::user()->Credits()*30)/$useage,0,'.','') >= 8 && number_format((Auth::user()->Credits()*30)/$useage,0,'.','') <= 14)
|
||||
<span class="info-box-icon bg-warning elevation-1">
|
||||
@elseif (number_format((Auth::user()->Credits()*30)/$useage,0,'.','') <= 7)
|
||||
<span class="info-box-icon bg-danger elevation-1">
|
||||
@endif
|
||||
<i class="fas fa-hourglass-half"></i></span>
|
||||
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">Out of {{CREDITS_DISPLAY_NAME}} in </span>
|
||||
@if(number_format((Auth::user()->Credits()*30)/$useage,2,'.','') < "1")
|
||||
<span class="info-box-number">{{number_format(Auth::user()->Credits()/($useage/30/24),0,'.','')}} <sup> hours</sup></span>
|
||||
@else
|
||||
<span class="info-box-number">{{number_format((Auth::user()->Credits()*30)/$useage,0,'.','')}} <sup> days</sup></span>
|
||||
@endif
|
||||
</div>
|
||||
<!-- /.info-box-content -->
|
||||
</div>
|
||||
<!-- /.info-box-content -->
|
||||
<!-- /.info-box -->
|
||||
</div>
|
||||
<!-- /.info-box -->
|
||||
</div>
|
||||
<!-- /.col -->`
|
||||
<!-- /.col -->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue