From b3635243053327d1cb2dd85095be3c3962c19dff Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 25 Jan 2023 15:58:44 -0500 Subject: [PATCH] vipuser label updated to vip --- app/Http/Controllers/Api/UsersController.php | 2 +- app/Http/Controllers/Users/UsersController.php | 2 +- app/Models/User.php | 4 ++-- app/Presenters/UserPresenter.php | 2 +- database/migrations/2023_01_23_232933_add_vip_to_users.php | 6 +++--- resources/views/users/edit.blade.php | 4 ++-- resources/views/users/view.blade.php | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index 8185583868..36ba063674 100644 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -246,7 +246,7 @@ class UsersController extends Controller 'two_factor_optin', 'two_factor_enrolled', 'remote', - 'vipuser', + 'vip', 'start_date', 'end_date', ]; diff --git a/app/Http/Controllers/Users/UsersController.php b/app/Http/Controllers/Users/UsersController.php index 9d322ca4d9..38afc66610 100755 --- a/app/Http/Controllers/Users/UsersController.php +++ b/app/Http/Controllers/Users/UsersController.php @@ -271,7 +271,7 @@ class UsersController extends Controller $user->activated = $request->input('activated', 0); $user->zip = $request->input('zip', null); $user->remote = $request->input('remote', 0); - $user->vipuser = $request->input('vipuser', 0); + $user->vipuser = $request->input('vip', 0); $user->website = $request->input('website', null); $user->start_date = $request->input('start_date', null); $user->end_date = $request->input('end_date', null); diff --git a/app/Models/User.php b/app/Models/User.php index b51d23626f..4e6566b2d6 100755 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -62,7 +62,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo 'start_date', 'end_date', 'scim_externalid', - 'vipuser', + 'vip', ]; protected $casts = [ @@ -70,7 +70,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo 'manager_id' => 'integer', 'location_id' => 'integer', 'company_id' => 'integer', - 'vipuser' => 'boolean', + 'vip' => 'boolean', ]; diff --git a/app/Presenters/UserPresenter.php b/app/Presenters/UserPresenter.php index dc41050f5b..0811fbc500 100644 --- a/app/Presenters/UserPresenter.php +++ b/app/Presenters/UserPresenter.php @@ -86,7 +86,7 @@ class UserPresenter extends Presenter 'formatter' => 'usersLinkFormatter', ], [ - 'field' => 'vipuser', + 'field' => 'vip', 'searchable' => false, 'sortable' => true, 'switchable' => true, diff --git a/database/migrations/2023_01_23_232933_add_vip_to_users.php b/database/migrations/2023_01_23_232933_add_vip_to_users.php index 40db001b17..344f35d240 100644 --- a/database/migrations/2023_01_23_232933_add_vip_to_users.php +++ b/database/migrations/2023_01_23_232933_add_vip_to_users.php @@ -14,7 +14,7 @@ class AddVipToUsers extends Migration public function up() { Schema::table('users', function (Blueprint $table) { - $table->boolean('vipuser')->nullable()->default(0); + $table->boolean('vip')->nullable()->default(0); }); } @@ -26,8 +26,8 @@ class AddVipToUsers extends Migration public function down() { Schema::table('users', function (Blueprint $table) { - if (Schema::hasColumn('users', 'vipuser')) { - $table->dropColumn('vipuser'); + if (Schema::hasColumn('users', 'vip')) { + $table->dropColumn('vip'); } }); } diff --git a/resources/views/users/edit.blade.php b/resources/views/users/edit.blade.php index b06dcad237..8250fe2a58 100755 --- a/resources/views/users/edit.blade.php +++ b/resources/views/users/edit.blade.php @@ -365,8 +365,8 @@
-
- {!! ($user->vipuser=='1') ? ' '.trans('general.yes') : ' '.trans('general.no') !!} + {!! ($user->vip=='1') ? ' '.trans('general.yes') : ' '.trans('general.no') !!}