Added city to bulk user importer

This commit is contained in:
snipe 2020-07-21 16:49:54 -07:00
parent c17a06792a
commit b750f4754f
No known key found for this signature in database
GPG key ID: 10BFFDA3ED34B5AC
3 changed files with 34 additions and 1 deletions

View file

@ -435,6 +435,10 @@ class UsersController extends Controller
if ($request->filled('department_id')) {
$update_array['department_id'] = $request->input('department_id');
}
if ($request->filled('city')) {
$update_array['city'] = $request->input('city');
}
if ($request->filled('company_id')) {
$update_array['company_id'] = $request->input('company_id');
}

View file

@ -55,6 +55,15 @@
</div>
</div>
<!-- City -->
<div class="form-group{{ $errors->has('city') ? ' has-error' : '' }}">
<label class="col-md-3 control-label" for="city">{{ trans('general.city') }}</label>
<div class="col-md-4">
<input class="form-control" type="text" name="city" id="city" aria-label="city" />
{!! $errors->first('city', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
<!-- activated -->
<div class="form-group">
<div class="col-sm-3 control-label">

View file

@ -142,6 +142,26 @@
<td class="text-nowrap">{{ trans('admin/users/table.name') }}</td>
<td>{{ $user->present()->fullName() }}</td>
</tr>
@if (($user->address) || ($user->city) || ($user->state) || ($user->country))
<tr>
<td class="text-nowrap">{{ trans('general.address') }}</td>
<td>
@if ($user->address)
{{ $user->address }} <br>
@endif
@if ($user->city)
{{ $user->city }}
@endif
@if ($user->state)
{{ $user->state }}
@endif
@if ($user->country)
{{ $user->country }}
@endif
@endif
<tr>
<td class="text-nowrap">{{ trans('admin/users/table.username') }}</td>
<td>{{ $user->username }}</td>
@ -304,7 +324,7 @@
<a href="{{ route('users.edit', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print">{{ trans('admin/users/general.edit') }}</a>
</div>
@endcan
@can('create', $user)
<div class="col-md-12" style="padding-top: 5px;">
<a href="{{ route('clone/user', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print">{{ trans('admin/users/general.clone') }}</a>