diff --git a/app/Models/User.php b/app/Models/User.php index 5bf378f05a..c3f7f80b94 100755 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -338,23 +338,23 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo return $this->belongsToMany(\App\Models\License::class, 'license_seats', 'assigned_to', 'license_id')->withPivot('id'); } - /** + /** * Establishes a count of all items assigned * * @author J. Vinsmoke * @since [v6.1] * @return \Illuminate\Database\Eloquent\Relations\Relation */ - Public function allassignedcount() { + Public function allAssignedCount() { $assetsCount = $this->assets()->count(); $licensesCount = $this->licenses()->count(); $accessoriesCount = $this->accessories()->count(); $consumablesCount = $this->consumables()->count(); - $totalcount = $assetsCount + $licensesCount + $accessoriesCount + $consumablesCount; + $totalCount = $assetsCount + $licensesCount + $accessoriesCount + $consumablesCount; - return (int) $totalcount; - } + return (int) $totalCount; + } /** * Establishes the user -> actionlogs relationship diff --git a/resources/lang/en/admin/users/message.php b/resources/lang/en/admin/users/message.php index 11292a0697..247a1b321e 100644 --- a/resources/lang/en/admin/users/message.php +++ b/resources/lang/en/admin/users/message.php @@ -15,6 +15,7 @@ return array( 'password_resets_sent' => 'The selected users who are activated and have a valid email addresses have been sent a password reset link.', 'password_reset_sent' => 'A password reset link has been sent to :email!', 'user_has_no_email' => 'This user does not have an email address in their profile.', + 'user_has_no_assets_assigned' => 'This user does not have any assets assigned', 'success' => array( diff --git a/resources/views/users/view.blade.php b/resources/views/users/view.blade.php index 7c9788ec3f..17bc7bdf18 100755 --- a/resources/views/users/view.blade.php +++ b/resources/views/users/view.blade.php @@ -179,19 +179,22 @@ @can('view', $user)