Merge pull request #8250 from snipe/features/adds_addr_city_state_to_importer
Added address, city, state and country to importer and city to bulk editor
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
@@ -63,6 +63,10 @@ abstract class Importer
|
||||
'full_name' => 'full name',
|
||||
'email' => 'email',
|
||||
'username' => 'username',
|
||||
'address' => 'address',
|
||||
'city' => 'city',
|
||||
'state' => 'state',
|
||||
'country' => 'country',
|
||||
'jobtitle' => 'job title',
|
||||
'employee_num' => 'employee number',
|
||||
'phone_number' => 'phone number',
|
||||
|
||||
@@ -47,6 +47,10 @@ class UserImporter extends ItemImporter
|
||||
$this->item['email'] = $this->findCsvMatch($row, 'email');
|
||||
$this->item['phone'] = $this->findCsvMatch($row, 'phone_number');
|
||||
$this->item['jobtitle'] = $this->findCsvMatch($row, 'jobtitle');
|
||||
$this->item['address'] = $this->findCsvMatch($row, 'address');
|
||||
$this->item['city'] = $this->findCsvMatch($row, 'city');
|
||||
$this->item['state'] = $this->findCsvMatch($row, 'state');
|
||||
$this->item['country'] = $this->findCsvMatch($row, 'country');
|
||||
$this->item['activated'] = ($this->fetchHumanBoolean($this->findCsvMatch($row, 'activated')) == 1) ? '1' : 0;
|
||||
|
||||
\Log::debug('UserImporter.php Activated: '.$this->findCsvMatch($row, 'activated'));
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
| licensed to email | license_email | License |
|
||||
| licensed to name | license_name | License |
|
||||
| maintained | maintained | License |
|
||||
| manager_id | | User |
|
||||
| manager_id | | User |
|
||||
| manufacturer | manufacturer | All |
|
||||
| model name | asset_model | Asset |
|
||||
| model number | model_number | Asset |
|
||||
@@ -34,4 +34,8 @@
|
||||
| User Related Fields | assigned_to | Asset |
|
||||
| name | | |
|
||||
| username | | |
|
||||
| address | address | User |
|
||||
| city | city | User |
|
||||
| state | state | User |
|
||||
| country | country | User |
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+27
-27
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"/js/build/vue.js": "/js/build/vue.js?id=461ae9803574a5a52d43",
|
||||
"/js/build/vue.js": "/js/build/vue.js?id=aff26ce7202625817ca1",
|
||||
"/css/AdminLTE.css": "/css/AdminLTE.css?id=56b8066cfbc70df10545",
|
||||
"/css/app.css": "/css/app.css?id=407edb63cc6b6dc62405",
|
||||
"/css/overrides.css": "/css/overrides.css?id=d1fe6296eb548247a5ad",
|
||||
@@ -18,7 +18,7 @@
|
||||
"/css/skins/skin-blue-dark.css": "/css/skins/skin-blue-dark.css?id=d25c77d9c6f4cfe2efd4",
|
||||
"/css/skins/skin-orange-dark.css": "/css/skins/skin-orange-dark.css?id=abc219c1fed59cecb860",
|
||||
"/css/skins/skin-orange.css": "/css/skins/skin-orange.css?id=59664dbd286988d2a438",
|
||||
"/js/build/vue.js.map": "/js/build/vue.js.map?id=1760ae00d44238e44172",
|
||||
"/js/build/vue.js.map": "/js/build/vue.js.map?id=41a870ef3b9b5c6688ca",
|
||||
"/css/AdminLTE.css.map": "/css/AdminLTE.css.map?id=5a2d6f3c59191ce716e2",
|
||||
"/css/app.css.map": "/css/app.css.map?id=96b5c985e860716e6a16",
|
||||
"/css/overrides.css.map": "/css/overrides.css.map?id=f3e3cf42859eb4a28a7b",
|
||||
@@ -38,7 +38,7 @@
|
||||
"/css/skins/skin-orange-dark.css.map": "/css/skins/skin-orange-dark.css.map?id=68b998638217fd08ef29",
|
||||
"/css/skins/skin-orange.css.map": "/css/skins/skin-orange.css.map?id=f90fda3cc0a48c048a9e",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=0491555899142b86167d",
|
||||
"/js/dist/all.js": "/js/dist/all.js?id=4513ccdd4533b52922a8",
|
||||
"/js/dist/all.js": "/js/dist/all.js?id=5ac062af7b26fb838213",
|
||||
"/css/build/all.css": "/css/build/all.css?id=0491555899142b86167d",
|
||||
"/js/build/all.js": "/js/build/all.js?id=4513ccdd4533b52922a8"
|
||||
"/js/build/all.js": "/js/build/all.js?id=5ac062af7b26fb838213"
|
||||
}
|
||||
|
||||
@@ -169,6 +169,10 @@
|
||||
{id: 'manager_first_name', text: 'Manager First Name' },
|
||||
{id: 'manager_last_name', text: 'Manager Last Name' },
|
||||
{id: 'activated', text: 'Activated' },
|
||||
{id: 'address', text: 'Address' },
|
||||
{id: 'city', text: 'City' },
|
||||
{id: 'state', text: 'State' },
|
||||
{id: 'country', text: 'Country' },
|
||||
|
||||
],
|
||||
customFields: this.customFields,
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -142,11 +142,31 @@
|
||||
<td class="text-nowrap">{{ trans('admin/users/table.name') }}</td>
|
||||
<td>{{ $user->present()->fullName() }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="text-nowrap">{{ trans('admin/users/table.username') }}</td>
|
||||
<td>{{ $user->username }}</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
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endif
|
||||
<tr>
|
||||
<td class="text-nowrap">{{ trans('general.groups') }}</td>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user