{!! Form::select('role_id', Auth::user()->available_roles( true ), $edit ? $user->role_id : '', ['class' => 'form-control', 'id' => 'role_id', 'disabled' => true]) !!}
{!! Form::select('shops[]', $shops, ($edit && $user->hasRole(['admin', 'agent', 'distributor'])) ? $user->shops(true) : Auth::user()->shop_id, ['class' => 'form-control', 'id' => 'shops', ($edit) ? 'disabled' : '', ($edit && $user->hasRole(['agent','distributor'])) ? 'multiple' : '']) !!}
{!! Form::select('status', $statuses, $edit ? $user->status : '' , ['class' => 'form-control', 'id' => 'status', 'disabled' => ($user->hasRole(['admin']) || $user->id == auth()->user()->id) ? true: false]) !!}
@if(auth()->user()->hasRole('admin') && $user->hasRole(['agent', 'distributor']))
{!! Form::select('is_blocked', ['0' => __('app.unblock'), '1' => __('app.block')], $edit ? $user->is_blocked : old('is_blocked'), ['class' => 'form-control']) !!}
@endif
@if( $user->email != '' )
@endif
+ user()->hasRole('admin') && ($user->phone_token || $user->phone)) disabled @endif>
@if( $user->sms_token && !$user->phone_verified) @php $now = \Carbon\Carbon::now(); $timer_text = 'Time is up'; $show_code = false; $times = $now->diffInSeconds(\Carbon\Carbon::parse($user->sms_token_date), false); if( $times > 0 ){ $minutes = floor($times/60); $seconds = $times - floor($times/60)*60; $show_code = true; $timer_text = ($minutes < 10 ? "0" . $minutes : $minutes) . ':' . ($seconds < 10 ? "0" . $seconds : $seconds); } @endphp @if($show_code)
@endif @endif
{!! Form::select('language', $langs, $edit ? $user->language : '', ['class' => 'form-control']) !!}
@if(auth()->user()->hasRole('admin') && !$user->hasRole('admin') && $user->auth_token != '' )
@endif