removed out of credits info
This commit is contained in:
parent
77729992ef
commit
47c251e48d
|
@ -250,9 +250,6 @@ class UserController extends Controller
|
|||
->addColumn('credits', function (User $user) {
|
||||
return '<i class="fas fa-coins mr-2"></i> ' . $user->credits();
|
||||
})
|
||||
->addColumn('usage', function (User $user) {
|
||||
return '<i class="fas fa-coins mr-2"></i> ' . $user->creditUsage(). ' ('.$user->outOfCredits().')';
|
||||
})
|
||||
->addColumn('verified', function (User $user) {
|
||||
return $user->getVerifiedStatus();
|
||||
})
|
||||
|
|
|
@ -242,26 +242,6 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||
return number_format($usage, 2, '.', '');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description Returns the Users "out of Credits" time
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function outOfCredits()
|
||||
{
|
||||
$usage = $this->creditUsage();
|
||||
$credits = $this->credits;
|
||||
$timeLeft = number_format(($credits * 30) / $usage);
|
||||
$unit = "days";
|
||||
|
||||
if ($timeLeft < 1) {
|
||||
$timeLeft = number_format(($credits * 30) / $usage * 24, 2);
|
||||
$unit = "hours";
|
||||
}
|
||||
return $timeLeft . " " . $unit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array|string|string[]
|
||||
*/
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
<th>Role</th>
|
||||
<th>Email</th>
|
||||
<th>{{CREDITS_DISPLAY_NAME}}</th>
|
||||
<th>Usage (Out of Credits in..)</th>
|
||||
<th>Servers</th>
|
||||
<th>Verified</th>
|
||||
<th>Last seen</th>
|
||||
|
@ -87,7 +86,6 @@
|
|||
{data: 'role'},
|
||||
{data: 'email', name: 'users.email'},
|
||||
{data: 'credits' , name : 'users.credits'},
|
||||
{data: 'usage' , sortable : false},
|
||||
{data: 'servers' , sortable : false},
|
||||
{data: 'verified' , sortable : false},
|
||||
{data: 'last_seen'},
|
||||
|
|
|
@ -198,19 +198,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<label>Out of Credits in</label>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<span style="max-width: 250px;" class="d-inline-block text-truncate">
|
||||
<i class="fas fa-clock mr-2"></i>{{$user->OutOfCredits()}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
|
|
Loading…
Reference in a new issue