vipuser label updated to vip

This commit is contained in:
akemidx 2023-01-25 15:58:44 -05:00
parent 19cf170dd9
commit b363524305
7 changed files with 11 additions and 11 deletions

View file

@ -246,7 +246,7 @@ class UsersController extends Controller
'two_factor_optin',
'two_factor_enrolled',
'remote',
'vipuser',
'vip',
'start_date',
'end_date',
];

View file

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

View file

@ -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',
];

View file

@ -86,7 +86,7 @@ class UserPresenter extends Presenter
'formatter' => 'usersLinkFormatter',
],
[
'field' => 'vipuser',
'field' => 'vip',
'searchable' => false,
'sortable' => true,
'switchable' => true,

View file

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

View file

@ -365,8 +365,8 @@
<!-- VIP checkbox -->
<div class="form-group">
<div class="col-md-7 col-md-offset-3">
<label for="vipuser">
<input type="checkbox" value="1" name="vipuser" class="minimal" {{ (old('vipuser', $user->vipuser)) == '1' ? ' checked="checked"' : '' }} aria-label="vipuser">
<label for="vip">
<input type="checkbox" value="1" name="vip" class="minimal" {{ (old('vip', $user->vip)) == '1' ? ' checked="checked"' : '' }} aria-label="vip">
{{ trans('admin/users/general.vip_label') }}
</label>

View file

@ -525,7 +525,7 @@
{{ trans('admin/users/general.vip_label') }}
</div>
<div class="col-md-9">
{!! ($user->vipuser=='1') ? '<i class="fas fa-check text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
{!! ($user->vip=='1') ? '<i class="fas fa-check text-success" aria-hidden="true"></i> '.trans('general.yes') : '<i class="fas fa-times text-danger" aria-hidden="true"></i> '.trans('general.no') !!}
</div>
</div>