Browse Source

removed out of credits info

AVMG20 3 years ago
parent
commit
47c251e48d

+ 0 - 3
app/Http/Controllers/Admin/UserController.php

@@ -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();
             })

+ 0 - 20
app/Models/User.php

@@ -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[]
      */

+ 0 - 2
resources/views/admin/users/index.blade.php

@@ -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'},

+ 0 - 13
resources/views/admin/users/show.blade.php

@@ -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">