2017-11-30 08:01:07 +08:00
|
|
|
<div class="row">
|
2019-07-17 21:48:20 +08:00
|
|
|
{{ Form::hidden('id') }}
|
|
|
|
<div class="form-group col-sm-3">
|
|
|
|
{{ Form::label('pilot_id', 'Pilot ID:') }}
|
|
|
|
{{ Form::number('pilot_id', null, ['class' => 'form-control']) }}
|
|
|
|
<p class="text-danger">{{ $errors->first('pilot_id') }}</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group col-sm-3">
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::label('name', 'Name:') }}
|
|
|
|
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
2018-02-07 00:18:22 +08:00
|
|
|
<p class="text-danger">{{ $errors->first('name') }}</p>
|
2017-11-30 08:01:07 +08:00
|
|
|
</div>
|
|
|
|
|
2019-07-17 21:48:20 +08:00
|
|
|
<div class="form-group col-sm-3">
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::label('email', 'Email:') }}
|
|
|
|
{{ Form::text('email', null, ['class' => 'form-control']) }}
|
2018-02-07 00:18:22 +08:00
|
|
|
<p class="text-danger">{{ $errors->first('email') }}</p>
|
2017-11-30 08:01:07 +08:00
|
|
|
</div>
|
2017-12-07 06:07:25 +08:00
|
|
|
|
2019-07-17 21:48:20 +08:00
|
|
|
<div class="form-group col-sm-3">
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::label('password', 'Password:') }}
|
|
|
|
{{ Form::password('password', ['class' => 'form-control']) }}
|
2018-02-07 00:18:22 +08:00
|
|
|
<p class="text-danger">{{ $errors->first('password') }}</p>
|
2017-12-07 06:07:25 +08:00
|
|
|
</div>
|
2017-11-30 08:01:07 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="form-group col-sm-6">
|
2018-01-10 09:08:16 +08:00
|
|
|
<div class="form-group">
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::label('country', 'Country:') }} <br />
|
|
|
|
{{ Form::select('country', $countries, null, ['class' => 'select2' ]) }}
|
2018-02-07 00:18:22 +08:00
|
|
|
<p class="text-danger">{{ $errors->first('country') }}</p>
|
2018-01-10 09:08:16 +08:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::label('timezone', 'Timezone:') }} <br/>
|
|
|
|
{{ Form::select('timezone', $timezones, null, ['id' => 'timezone', 'class' => 'select2' ]) }}
|
2018-02-07 00:18:22 +08:00
|
|
|
<p class="text-danger">{{ $errors->first('timezone') }}</p>
|
2018-01-10 09:08:16 +08:00
|
|
|
</div>
|
2018-09-05 08:09:33 +08:00
|
|
|
<div class="form-group col-sm-4">
|
|
|
|
{{ Form::label('transfer_time', 'Transferred Hours:') }}
|
|
|
|
{{ Form::text('transfer_time', \App\Facades\Utils::minutesToHours($user->transfer_time), ['class' => 'form-control']) }}
|
|
|
|
<p class="text-danger">{{ $errors->first('transfer_time') }}</p>
|
|
|
|
</div>
|
2017-11-30 08:01:07 +08:00
|
|
|
</div>
|
|
|
|
<div class="form-group col-sm-6">
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::label('home_airport_id', 'Home Airport:') }}
|
|
|
|
{{ Form::select('home_airport_id', $airports, null , ['class' => 'form-control select2']) }}
|
2018-02-07 00:18:22 +08:00
|
|
|
<p class="text-danger">{{ $errors->first('home_airport_id') }}</p>
|
2017-11-30 08:01:07 +08:00
|
|
|
<br /><br />
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::label('curr_airport_id', 'Current Airport:') }}
|
|
|
|
{{ Form::select('curr_airport_id', $airports, null , ['class' => 'form-control select2']) }}
|
2018-02-07 00:18:22 +08:00
|
|
|
<p class="text-danger">{{ $errors->first('curr_airport_id') }}</p>
|
2017-11-30 08:01:07 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="form-group col-sm-4">
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::label('airline_id', 'Airline:') }}
|
|
|
|
{{ Form::select('airline_id', $airlines, null, ['class' => 'form-control select2', 'placeholder' => 'Select Airline']) }}
|
2017-11-30 08:01:07 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group col-sm-4">
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::label('rank_id', 'Rank:') }}
|
|
|
|
{{ Form::select('rank_id', $ranks, null, ['class' => 'form-control select2', 'placeholder' => 'Select Rank']) }}
|
2017-11-30 08:01:07 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group col-sm-4">
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::label('roles', 'Roles:') }}
|
|
|
|
{{ Form::select('roles[]', $roles, $user->roles->pluck('id'),
|
|
|
|
['class' => 'form-control select2', 'placeholder' => 'Select Roles', 'multiple']) }}
|
2017-11-30 08:01:07 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="form-group col-sm-6">
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::label('state', 'State:') }}
|
2017-11-30 08:01:07 +08:00
|
|
|
<label class="checkbox-inline">
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::select('state', UserState::labels(), null, ['class' => 'form-control select2']) }}
|
2017-11-30 08:01:07 +08:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Submit Field -->
|
2018-01-08 05:09:22 +08:00
|
|
|
<div class="form-group col-sm-6 text-right">
|
2018-03-13 06:58:12 +08:00
|
|
|
{{--<a href="{{ route('admin.users.regen_apikey', ['id' => $user->id]) }}" class="btn btn-warning"
|
2018-03-02 23:26:25 +08:00
|
|
|
onclick="return confirm('Are you sure? This will reset this user\'s API key.')">new api key</a>--}}
|
2018-01-08 05:09:22 +08:00
|
|
|
|
2018-03-13 06:58:12 +08:00
|
|
|
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
|
|
|
<a href="{{ route('admin.users.index') }}" class="btn btn-default">Cancel</a>
|
2018-01-08 05:09:22 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="form-group col-sm-12">
|
|
|
|
<table class="table table-hover">
|
2018-03-02 23:26:25 +08:00
|
|
|
{{--<tr>
|
2018-01-08 05:09:22 +08:00
|
|
|
<td>API Key</td>
|
2018-03-13 06:58:12 +08:00
|
|
|
<td>{{ $user->api_key }}</td>
|
2018-03-02 23:26:25 +08:00
|
|
|
</tr>--}}
|
2018-01-08 05:09:22 +08:00
|
|
|
<tr>
|
|
|
|
<td>Total Flights</td>
|
2018-03-13 06:58:12 +08:00
|
|
|
<td>{{ $user->flights }}</td>
|
2018-01-08 05:09:22 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Flight Time</td>
|
2018-03-13 06:58:12 +08:00
|
|
|
<td>{{ Utils::minutesToTimeString($user->flight_time) }}</td>
|
2018-01-08 05:09:22 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>IP Address</td>
|
2018-03-13 06:58:12 +08:00
|
|
|
<td>{{ $user->last_ip }}</td>
|
2018-01-08 05:09:22 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Registered On</td>
|
2018-03-13 06:58:12 +08:00
|
|
|
<td>{{ show_datetime($user->created_at) }}</td>
|
2018-01-08 05:09:22 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Last Login</td>
|
2018-03-13 06:58:12 +08:00
|
|
|
<td>{{ show_datetime($user->updated_at) }}</td>
|
2018-01-08 05:09:22 +08:00
|
|
|
</tr>
|
2018-09-21 00:14:18 +08:00
|
|
|
<tr>
|
|
|
|
<td>@lang('toc.title')</td>
|
|
|
|
<td>{{ $user->toc_accepted ? __('common.yes') : __('common.no') }}</td>
|
|
|
|
</tr>
|
2018-09-20 23:00:23 +08:00
|
|
|
<tr>
|
|
|
|
<td>@lang('profile.opt-in')</td>
|
|
|
|
<td>{{ $user->opt_in ? __('common.yes') : __('common.no') }}</td>
|
|
|
|
</tr>
|
2018-01-08 05:09:22 +08:00
|
|
|
</table>
|
2017-11-30 08:01:07 +08:00
|
|
|
</div>
|
|
|
|
</div>
|