2016-03-25 01:18:05 -07:00
|
|
|
@extends('layouts/default')
|
|
|
|
|
|
|
|
{{-- Page title --}}
|
|
|
|
@section('title')
|
2016-12-23 17:52:00 -08:00
|
|
|
{{ trans('admin/users/general.view_user', array('name' => $user->present()->fullName())) }}
|
2016-03-25 01:18:05 -07:00
|
|
|
@parent
|
|
|
|
@stop
|
|
|
|
|
|
|
|
{{-- Page content --}}
|
|
|
|
@section('content')
|
|
|
|
|
|
|
|
<div class="row">
|
2016-12-27 12:03:47 -08:00
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="nav-tabs-custom">
|
2017-01-26 06:20:53 -08:00
|
|
|
<ul class="nav nav-tabs hidden-print">
|
2016-12-27 12:03:47 -08:00
|
|
|
|
|
|
|
<li class="active">
|
2018-02-16 13:22:55 -08:00
|
|
|
<a href="#details" data-toggle="tab">
|
2016-12-27 12:03:47 -08:00
|
|
|
<span class="hidden-lg hidden-md">
|
|
|
|
<i class="fa fa-info-circle"></i>
|
|
|
|
</span>
|
2017-03-10 16:58:29 -08:00
|
|
|
<span class="hidden-xs hidden-sm">{{ trans('admin/users/general.info') }}</span>
|
2016-12-27 12:03:47 -08:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
2020-03-31 22:52:21 -07:00
|
|
|
<a href="#asset" data-toggle="tab">
|
2016-12-27 12:03:47 -08:00
|
|
|
<span class="hidden-lg hidden-md">
|
2020-04-02 18:17:21 -07:00
|
|
|
<i class="fa fa-barcode" aria-hidden="true"></i>
|
2016-12-27 12:03:47 -08:00
|
|
|
</span>
|
|
|
|
<span class="hidden-xs hidden-sm">{{ trans('general.assets') }}</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
2020-03-31 22:52:21 -07:00
|
|
|
<a href="#licenses" data-toggle="tab">
|
2016-12-27 12:03:47 -08:00
|
|
|
<span class="hidden-lg hidden-md">
|
|
|
|
<i class="fa fa-floppy-o"></i>
|
|
|
|
</span>
|
|
|
|
<span class="hidden-xs hidden-sm">{{ trans('general.licenses') }}</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
2020-03-31 22:52:21 -07:00
|
|
|
<a href="#accessories" data-toggle="tab">
|
2016-12-27 12:03:47 -08:00
|
|
|
<span class="hidden-lg hidden-md">
|
|
|
|
<i class="fa fa-keyboard-o"></i>
|
|
|
|
</span> <span class="hidden-xs hidden-sm">{{ trans('general.accessories') }}</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
2020-03-31 22:52:21 -07:00
|
|
|
<a href="#consumables" data-toggle="tab">
|
2016-12-27 12:03:47 -08:00
|
|
|
<span class="hidden-lg hidden-md">
|
|
|
|
<i class="fa fa-tint"></i></span>
|
|
|
|
<span class="hidden-xs hidden-sm">{{ trans('general.consumables') }}</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
2020-03-31 22:52:21 -07:00
|
|
|
<a href="#files" data-toggle="tab">
|
2016-12-27 12:03:47 -08:00
|
|
|
<span class="hidden-lg hidden-md">
|
|
|
|
<i class="fa fa-paperclip"></i></span>
|
|
|
|
<span class="hidden-xs hidden-sm">{{ trans('general.file_uploads') }}</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
2020-03-31 22:52:21 -07:00
|
|
|
<a href="#history" data-toggle="tab">
|
2016-12-27 12:03:47 -08:00
|
|
|
<span class="hidden-lg hidden-md">
|
|
|
|
<i class="fa fa-clock-o"></i></span>
|
|
|
|
<span class="hidden-xs hidden-sm">{{ trans('general.history') }}</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
2017-05-22 17:27:00 -07:00
|
|
|
@if ($user->managedLocations()->count() >= 0 )
|
|
|
|
<li>
|
2020-03-31 22:52:21 -07:00
|
|
|
<a href="#managed" data-toggle="tab">
|
2017-05-22 17:27:00 -07:00
|
|
|
<span class="hidden-lg hidden-md">
|
|
|
|
<i class="fa fa-clock-o"></i></span>
|
|
|
|
<span class="hidden-xs hidden-sm">{{ trans('admin/users/table.managed_locations') }}</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
@endif
|
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
@can('update', $user)
|
|
|
|
<li class="dropdown pull-right">
|
|
|
|
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
|
|
|
<i class="fa fa-gear"></i> {{ trans('button.actions') }}
|
|
|
|
<span class="caret"></span>
|
|
|
|
</a>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
<li><a href="{{ route('users.edit', $user->id) }}">{{ trans('admin/users/general.edit') }}</a></li>
|
|
|
|
<li><a href="{{ route('clone/user', $user->id) }}">{{ trans('admin/users/general.clone') }}</a></li>
|
|
|
|
@if ((Auth::user()->id !== $user->id) && (!config('app.lock_passwords')) && ($user->deleted_at==''))
|
|
|
|
<li><a href="{{ route('users.destroy', $user->id) }}">{{ trans('button.delete') }}</a></li>
|
|
|
|
@endif
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
@endcan
|
2020-03-31 22:50:07 -07:00
|
|
|
|
|
|
|
@can('update', \App\Models\User::class)
|
|
|
|
<li class="pull-right"><a href="#" data-toggle="modal" data-target="#uploadFileModal">
|
|
|
|
<i class="fa fa-paperclip" aria-hidden="true"></i> {{ trans('button.upload') }}</a>
|
|
|
|
</li>
|
|
|
|
@endcan
|
2016-12-27 12:03:47 -08:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div class="tab-content">
|
2018-02-16 13:22:55 -08:00
|
|
|
<div class="tab-pane active" id="details">
|
2016-12-27 12:03:47 -08:00
|
|
|
<div class="row">
|
|
|
|
@if ($user->deleted_at!='')
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="callout callout-warning">
|
|
|
|
<i class="icon fa fa-warning"></i>
|
2017-09-06 17:11:23 -07:00
|
|
|
{{ trans('admin/users/message.user_deleted_warning') }}
|
2016-12-27 12:03:47 -08:00
|
|
|
@can('update', $user)
|
2017-09-06 17:11:23 -07:00
|
|
|
<a href="{{ route('restore/user', $user->id) }}">{{ trans('admin/users/general.restore_user') }}</a>
|
2016-12-27 12:03:47 -08:00
|
|
|
@endcan
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
2018-02-16 13:22:55 -08:00
|
|
|
<div class="col-md-2 text-center">
|
2016-03-25 01:18:05 -07:00
|
|
|
@if ($user->avatar)
|
2020-03-27 15:35:29 -07:00
|
|
|
<img src="/uploads/avatars/{{ $user->avatar }}" class="avatar img-thumbnail hidden-print" alt="{{ $user->present()->fullName() }}">
|
2016-03-25 01:18:05 -07:00
|
|
|
@else
|
2020-03-27 15:35:29 -07:00
|
|
|
<img src="{{ $user->present()->gravatar() }}" class="avatar img-circle hidden-print" alt="{{ $user->present()->fullName() }}">
|
2016-03-25 01:18:05 -07:00
|
|
|
@endif
|
|
|
|
</div>
|
2016-04-21 20:26:56 -07:00
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
<div class="col-md-8">
|
|
|
|
<div class="table table-responsive">
|
|
|
|
<table class="table table-striped">
|
|
|
|
@if (!is_null($user->company))
|
2016-04-21 20:26:56 -07:00
|
|
|
<tr>
|
2019-03-18 11:59:02 -07:00
|
|
|
<td class="text-nowrap">{{ trans('general.company') }}</td>
|
2016-12-27 12:03:47 -08:00
|
|
|
<td>{{ $user->company->name }}</td>
|
2016-04-21 20:26:56 -07:00
|
|
|
</tr>
|
2016-12-27 12:03:47 -08:00
|
|
|
@endif
|
2016-04-21 20:26:56 -07:00
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
<tr>
|
2019-03-18 11:59:02 -07:00
|
|
|
<td class="text-nowrap">{{ trans('admin/users/table.name') }}</td>
|
2016-12-27 12:03:47 -08:00
|
|
|
<td>{{ $user->present()->fullName() }}</td>
|
|
|
|
</tr>
|
2017-12-19 13:42:34 -08:00
|
|
|
<tr>
|
2019-03-18 11:59:02 -07:00
|
|
|
<td class="text-nowrap">{{ trans('admin/users/table.username') }}</td>
|
2017-12-19 13:42:34 -08:00
|
|
|
<td>{{ $user->username }}</td>
|
|
|
|
</tr>
|
2017-03-03 18:41:13 -08:00
|
|
|
|
2018-01-15 20:31:10 -08:00
|
|
|
<tr>
|
2019-03-18 11:59:02 -07:00
|
|
|
<td class="text-nowrap">{{ trans('general.groups') }}</td>
|
2018-01-15 20:31:10 -08:00
|
|
|
<td>
|
|
|
|
@if ($user->groups->count() > 0)
|
|
|
|
@foreach ($user->groups as $group)
|
|
|
|
|
|
|
|
@can('superadmin')
|
|
|
|
<a href="{{ route('groups.show', $group->id) }}" class="label label-default">{{ $group->name }}</a>
|
|
|
|
@else
|
|
|
|
{{ $group->name }}
|
|
|
|
@endcan
|
|
|
|
|
|
|
|
@endforeach
|
|
|
|
@else
|
|
|
|
--
|
|
|
|
@endif
|
|
|
|
|
|
|
|
</td>
|
|
|
|
</tr>
|
2017-03-03 18:41:13 -08:00
|
|
|
|
2017-05-31 01:17:30 -07:00
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
@if ($user->jobtitle)
|
|
|
|
<tr>
|
2019-03-18 11:59:02 -07:00
|
|
|
<td class="text-nowrap">{{ trans('admin/users/table.job') }}</td>
|
2016-12-27 12:03:47 -08:00
|
|
|
<td>{{ $user->jobtitle }}</td>
|
|
|
|
</tr>
|
|
|
|
@endif
|
2016-04-21 20:26:56 -07:00
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
@if ($user->employee_num)
|
|
|
|
<tr>
|
2019-03-18 11:59:02 -07:00
|
|
|
<td class="text-nowrap">{{ trans('admin/users/table.employee_num') }}</td>
|
2016-12-27 12:03:47 -08:00
|
|
|
<td>{{ $user->employee_num }}</td>
|
|
|
|
</tr>
|
|
|
|
@endif
|
2016-04-21 20:26:56 -07:00
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
@if ($user->manager)
|
|
|
|
<tr>
|
2019-03-18 11:59:02 -07:00
|
|
|
<td class="text-nowrap">{{ trans('admin/users/table.manager') }}</td>
|
2017-05-31 09:39:30 -07:00
|
|
|
<td>
|
|
|
|
<a href="{{ route('users.show', $user->manager->id) }}">{{ $user->manager->getFullNameAttribute() }}</a>
|
|
|
|
|
|
|
|
</td>
|
2016-12-27 12:03:47 -08:00
|
|
|
</tr>
|
|
|
|
@endif
|
2016-04-21 20:26:56 -07:00
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
@if ($user->email)
|
|
|
|
<tr>
|
2019-03-18 11:59:02 -07:00
|
|
|
<td class="text-nowrap">{{ trans('admin/users/table.email') }}</td>
|
2016-12-27 12:03:47 -08:00
|
|
|
<td><a href="mailto:{{ $user->email }}">{{ $user->email }}</a></td>
|
|
|
|
</tr>
|
|
|
|
@endif
|
2016-04-21 20:26:56 -07:00
|
|
|
|
2019-05-21 18:55:12 -07:00
|
|
|
@if ($user->website)
|
|
|
|
<tr>
|
|
|
|
<td class="text-nowrap">{{ trans('general.website') }}</td>
|
|
|
|
<td><a href="{{ $user->website }}" target="_blank">{{ $user->website }}</a></td>
|
|
|
|
</tr>
|
|
|
|
@endif
|
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
@if ($user->phone)
|
|
|
|
<tr>
|
2019-03-18 11:59:02 -07:00
|
|
|
<td class="text-nowrap">{{ trans('admin/users/table.phone') }}</td>
|
2018-01-20 00:20:45 -08:00
|
|
|
<td><a href="tel:{{ $user->phone }}">{{ $user->phone }}</a></td>
|
2016-12-27 12:03:47 -08:00
|
|
|
</tr>
|
|
|
|
@endif
|
2016-04-21 20:26:56 -07:00
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
@if ($user->userloc)
|
|
|
|
<tr>
|
2019-03-18 11:59:02 -07:00
|
|
|
<td class="text-nowrap">{{ trans('admin/users/table.location') }}</td>
|
2017-08-25 05:48:32 -07:00
|
|
|
<td>{{ link_to_route('locations.show', $user->userloc->name, [$user->userloc->id]) }}</td>
|
|
|
|
|
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
</tr>
|
|
|
|
@endif
|
2017-12-19 13:42:34 -08:00
|
|
|
@if ($user->last_login)
|
|
|
|
<tr>
|
2019-03-18 11:59:02 -07:00
|
|
|
<td class="text-nowrap">{{ trans('general.last_login') }}</td>
|
2017-12-19 13:42:34 -08:00
|
|
|
<td>{{ \App\Helpers\Helper::getFormattedDateObject($user->last_login, 'datetime', false) }}</td>
|
|
|
|
</tr>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if (!is_null($user->department))
|
|
|
|
<tr>
|
2019-03-18 11:59:02 -07:00
|
|
|
<td class="text-nowrap">{{ trans('general.department') }}</td>
|
2017-12-19 13:42:34 -08:00
|
|
|
<td><a href="{{ route('departments.show', $user->department) }}">{{ $user->department->name }}</a></td>
|
|
|
|
</tr>
|
|
|
|
@endif
|
2016-12-27 12:03:47 -08:00
|
|
|
@if ($user->created_at)
|
|
|
|
<tr>
|
|
|
|
<td>{{ trans('general.created_at') }}</td>
|
|
|
|
<td>{{ $user->created_at->format('F j, Y h:iA') }}</td>
|
|
|
|
</tr>
|
|
|
|
@endif
|
2019-03-18 11:59:02 -07:00
|
|
|
<tr>
|
|
|
|
<td class="text-nowrap">{{ trans('general.login_enabled') }}</td>
|
|
|
|
<td>{{ ($user->activated=='1') ? trans('general.yes') : trans('general.no') }}</td>
|
|
|
|
</tr>
|
2020-07-10 16:21:27 -07:00
|
|
|
@if ($user->ldap_import!='1')
|
|
|
|
<tr>
|
|
|
|
<td class="text-nowrap">LDAP</td>
|
|
|
|
<td>{{ trans('general.yes') }}</td>
|
|
|
|
</tr>
|
|
|
|
@endif
|
|
|
|
|
2019-03-18 11:59:02 -07:00
|
|
|
|
|
|
|
@if ($user->activated=='1')
|
|
|
|
<tr>
|
|
|
|
<td class="text-nowrap">{{ trans('admin/users/general.two_factor_active') }}</td>
|
|
|
|
<td>{{ ($user->two_factor_active()) ? trans('general.yes') : trans('general.no') }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="text-nowrap">{{ trans('admin/users/general.two_factor_enrolled') }}</td>
|
|
|
|
<td class="two_factor_resetrow">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-1" id="two_factor_reset_toggle">
|
|
|
|
{{ ($user->two_factor_active_and_enrolled()) ? trans('general.yes') : trans('general.no') }}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@if ((Auth::user()->isSuperUser()) && ($snipeSettings->two_factor_enabled!='0'))
|
|
|
|
<div class="col-md-11">
|
|
|
|
<a class="btn btn-default btn-sm pull-left" id="two_factor_reset" style="margin-right: 10px;"> {{ trans('admin/settings/general.two_factor_reset') }}</a>
|
|
|
|
<span id="two_factor_reseticon">
|
|
|
|
</span>
|
|
|
|
<span id="two_factor_resetresult">
|
|
|
|
</span>
|
|
|
|
<span id="two_factor_resetstatus">
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<br><br><p class="help-block">{{ trans('admin/settings/general.two_factor_reset_help') }}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
@endif
|
|
|
|
|
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
</table>
|
2016-04-21 20:26:56 -07:00
|
|
|
</div>
|
2016-12-27 12:03:47 -08:00
|
|
|
</div> <!--/col-md-8-->
|
2016-04-21 20:26:56 -07:00
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
<!-- Start button column -->
|
|
|
|
<div class="col-md-2">
|
|
|
|
@can('update', $user)
|
|
|
|
<div class="col-md-12">
|
2020-04-02 18:33:26 -07:00
|
|
|
<a href="{{ route('users.edit', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print">{{ trans('admin/users/general.edit') }}</a>
|
2016-12-27 12:03:47 -08:00
|
|
|
</div>
|
2018-10-19 16:43:28 -07:00
|
|
|
@endcan
|
|
|
|
|
|
|
|
@can('create', $user)
|
2016-12-27 12:03:47 -08:00
|
|
|
<div class="col-md-12" style="padding-top: 5px;">
|
2020-04-02 18:33:26 -07:00
|
|
|
<a href="{{ route('clone/user', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print">{{ trans('admin/users/general.clone') }}</a>
|
2016-12-27 12:03:47 -08:00
|
|
|
</div>
|
2018-10-19 16:43:28 -07:00
|
|
|
@endcan
|
|
|
|
|
|
|
|
@can('view', $user)
|
2017-12-05 01:55:24 -08:00
|
|
|
<div class="col-md-12" style="padding-top: 5px;">
|
2020-04-02 18:33:26 -07:00
|
|
|
<a href="{{ route('users.print', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print" target="_blank" rel="noopener">{{ trans('admin/users/general.print_assigned') }}</a>
|
2017-12-05 01:55:24 -08:00
|
|
|
</div>
|
2018-10-19 16:43:28 -07:00
|
|
|
@endcan
|
2017-12-05 01:55:24 -08:00
|
|
|
|
2018-10-19 16:43:28 -07:00
|
|
|
@can('delete', $user)
|
|
|
|
@if ($user->deleted_at=='')
|
|
|
|
<div class="col-md-12" style="padding-top: 5px;">
|
|
|
|
<form action="{{route('users.destroy',$user->id)}}" method="POST">
|
|
|
|
{{csrf_field()}}
|
|
|
|
{{ method_field("DELETE")}}
|
|
|
|
<button style="width: 100%;" class="btn btn-sm btn-warning hidden-print">{{ trans('button.delete')}}</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-12" style="padding-top: 5px;">
|
|
|
|
<form action="{{ route('users/bulkedit') }}" method="POST">
|
|
|
|
<!-- CSRF Token -->
|
|
|
|
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
|
|
|
<input type="hidden" name="ids[{{ $user->id }}]" value="{{ $user->id }}" />
|
|
|
|
<button style="width: 100%;" class="btn btn-sm btn-danger hidden-print">{{ trans('button.checkin_and_delete') }}</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
@else
|
|
|
|
<div class="col-md-12" style="padding-top: 5px;">
|
|
|
|
<a href="{{ route('restore/user', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-warning hidden-print">{{ trans('button.restore') }}</a>
|
|
|
|
</div>
|
|
|
|
@endif
|
2016-12-27 12:03:47 -08:00
|
|
|
@endcan
|
2018-10-19 16:43:28 -07:00
|
|
|
|
|
|
|
|
2016-03-25 01:18:05 -07:00
|
|
|
</div>
|
2016-12-27 12:03:47 -08:00
|
|
|
<!-- End button column -->
|
|
|
|
</div> <!--/.row-->
|
|
|
|
</div><!-- /.tab-pane -->
|
|
|
|
|
2020-03-31 22:52:21 -07:00
|
|
|
<div class="tab-pane" id="asset">
|
2016-12-27 12:03:47 -08:00
|
|
|
<!-- checked out assets table -->
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="display table table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="col-md-3">{{ trans('admin/hardware/table.asset_model') }}</th>
|
|
|
|
<th class="col-md-2">{{ trans('admin/hardware/table.asset_tag') }}</th>
|
|
|
|
<th class="col-md-2">{{ trans('general.name') }}</th>
|
|
|
|
<th class="col-md-1 hidden-print">{{ trans('general.action') }}</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2019-07-17 17:51:35 -07:00
|
|
|
@if ($user->assets)
|
2017-02-03 22:20:11 -08:00
|
|
|
@foreach ($user->assets as $asset)
|
2016-12-27 12:03:47 -08:00
|
|
|
<tr>
|
|
|
|
<td>
|
2019-07-17 17:51:35 -07:00
|
|
|
@if (($asset->model) && ($asset->physical=='1'))
|
2017-03-03 18:41:13 -08:00
|
|
|
<a href="{{ route('models.show', $asset->model->id) }}">{{ $asset->model->name }}</a>
|
2016-12-27 12:03:47 -08:00
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@can('view', $asset)
|
2017-03-03 18:41:13 -08:00
|
|
|
<a href="{{ route('hardware.show', $asset->id) }}">{{ $asset->asset_tag }}</a>
|
2016-12-27 12:03:47 -08:00
|
|
|
@endcan
|
|
|
|
</td>
|
|
|
|
<td>{!! $asset->present()->nameUrl() !!}</td>
|
|
|
|
<td class="hidden-print">
|
|
|
|
@can('checkin', $asset)
|
2017-03-10 16:58:29 -08:00
|
|
|
<a href="{{ route('checkin/hardware', array('assetId'=> $asset->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
|
2016-12-27 12:03:47 -08:00
|
|
|
@endcan
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
2019-07-17 17:51:35 -07:00
|
|
|
@endif
|
2016-12-27 12:03:47 -08:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2020-03-31 22:52:21 -07:00
|
|
|
</div><!-- /asset -->
|
2016-03-25 01:18:05 -07:00
|
|
|
|
2020-03-31 22:52:21 -07:00
|
|
|
<div class="tab-pane" id="licenses">
|
2016-12-27 12:03:47 -08:00
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="display table table-hover">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="col-md-5">{{ trans('general.name') }}</th>
|
|
|
|
<th class="col-md-6">{{ trans('admin/hardware/form.serial') }}</th>
|
|
|
|
<th class="col-md-1 hidden-print">{{ trans('general.action') }}</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach ($user->licenses as $license)
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
{!! $license->present()->nameUrl() !!}
|
|
|
|
</td>
|
|
|
|
<td>
|
2019-05-08 05:14:49 -07:00
|
|
|
@can('viewKeys', $license)
|
2016-12-27 12:03:47 -08:00
|
|
|
{!! $license->present()->serialUrl() !!}
|
2019-05-08 05:14:49 -07:00
|
|
|
@else
|
|
|
|
------------
|
|
|
|
@endcan
|
2016-12-27 12:03:47 -08:00
|
|
|
</td>
|
|
|
|
<td class="hidden-print">
|
|
|
|
@can('update', $license)
|
2017-03-10 16:58:29 -08:00
|
|
|
<a href="{{ route('licenses.checkin', array('licenseseat_id'=> $license->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
|
2016-12-27 12:03:47 -08:00
|
|
|
@endcan
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div><!-- /licenses-tab -->
|
|
|
|
|
2020-03-31 22:52:21 -07:00
|
|
|
<div class="tab-pane" id="accessories">
|
2016-12-27 12:03:47 -08:00
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="display table table-hover">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2017-03-10 16:58:29 -08:00
|
|
|
<th class="col-md-5">{{ trans('general.name') }}</th>
|
|
|
|
<th class="col-md-1 hidden-print">{{ trans('general.action') }}</th>
|
2016-12-27 12:03:47 -08:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach ($user->accessories as $accessory)
|
2016-03-25 01:18:05 -07:00
|
|
|
<tr>
|
2016-12-27 12:03:47 -08:00
|
|
|
<td>{!!$accessory->present()->nameUrl()!!}</td>
|
2016-07-28 08:39:28 -07:00
|
|
|
<td class="hidden-print">
|
2016-12-27 12:03:47 -08:00
|
|
|
@can('checkin', $accessory)
|
2017-03-10 16:58:29 -08:00
|
|
|
<a href="{{ route('checkin/accessory', array('accessory_id'=> $accessory->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
|
2016-12-27 12:03:47 -08:00
|
|
|
@endcan
|
2016-03-25 01:18:05 -07:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
2016-12-27 12:03:47 -08:00
|
|
|
</tbody>
|
2016-03-25 01:18:05 -07:00
|
|
|
</table>
|
2016-12-27 12:03:47 -08:00
|
|
|
</div>
|
|
|
|
</div><!-- /accessories-tab -->
|
2016-03-25 01:18:05 -07:00
|
|
|
|
2020-03-31 22:52:21 -07:00
|
|
|
<div class="tab-pane" id="consumables">
|
2016-12-27 12:03:47 -08:00
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="display table table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="col-md-8">{{ trans('general.name') }}</th>
|
|
|
|
<th class="col-md-4">{{ trans('general.date') }}</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach ($user->consumables as $consumable)
|
|
|
|
<tr>
|
|
|
|
<td>{!! $consumable->present()->nameUrl() !!}</a></td>
|
|
|
|
<td>{{ $consumable->created_at }}</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div><!-- /consumables-tab -->
|
|
|
|
|
2020-03-31 22:52:21 -07:00
|
|
|
<div class="tab-pane" id="files">
|
2016-12-27 12:03:47 -08:00
|
|
|
<div class="row">
|
2016-03-25 01:18:05 -07:00
|
|
|
|
|
|
|
<div class="col-md-12 col-sm-12">
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="display table table-striped">
|
2016-12-27 12:03:47 -08:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="col-md-5">{{ trans('general.notes') }}</th>
|
|
|
|
<th class="col-md-5"><span class="line"></span>{{ trans('general.file_name') }}</th>
|
2020-03-31 23:02:24 -07:00
|
|
|
<th class="col-md-2">{{ trans('general.download') }}</th>
|
|
|
|
<th class="col-md-2">{{ trans('general.delete') }}</th>
|
2016-12-27 12:03:47 -08:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach ($user->uploads as $file)
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
@if ($file->note)
|
|
|
|
{{ $file->note }}
|
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{ $file->filename }}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@if ($file->filename)
|
2017-03-10 16:58:29 -08:00
|
|
|
<a href="{{ route('show/userfile', [$user->id, $file->id]) }}" class="btn btn-default">{{ trans('general.download') }}</a>
|
2016-12-27 12:03:47 -08:00
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@can('update', $user)
|
2020-03-31 23:02:24 -07:00
|
|
|
<a class="btn delete-asset btn-danger btn-sm hidden-print" href="{{ route('userfile.destroy', [$user->id, $file->id]) }}" data-content="Are you sure you wish to delete this file?" data-title="Delete {{ $file->filename }}?"><i class="fa fa-trash icon-white" aria-hidden="true"></i><span class="sr-only">Delete</span></a>
|
2016-12-27 12:03:47 -08:00
|
|
|
@endcan
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2016-03-25 01:18:05 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-12-27 12:03:47 -08:00
|
|
|
</div> <!--/ROW-->
|
2020-03-31 22:52:21 -07:00
|
|
|
</div><!--/FILES-->
|
2016-03-25 01:18:05 -07:00
|
|
|
|
2020-03-31 22:52:21 -07:00
|
|
|
<div class="tab-pane" id="history">
|
2016-12-27 12:03:47 -08:00
|
|
|
<div class="table-responsive">
|
2017-05-31 09:39:52 -07:00
|
|
|
|
|
|
|
<table
|
2018-02-16 13:22:55 -08:00
|
|
|
data-click-to-select="true"
|
|
|
|
data-cookie-id-table="usersHistoryTable"
|
|
|
|
data-pagination="true"
|
|
|
|
data-id-table="usersHistoryTable"
|
|
|
|
data-search="true"
|
|
|
|
data-side-pagination="server"
|
|
|
|
data-show-columns="true"
|
|
|
|
data-show-export="true"
|
|
|
|
data-show-refresh="true"
|
2017-05-31 09:39:52 -07:00
|
|
|
data-sort-order="desc"
|
2018-02-16 13:22:55 -08:00
|
|
|
data-toolbar="#toolbar"
|
|
|
|
id="usersHistoryTable"
|
|
|
|
class="table table-striped snipe-table"
|
|
|
|
data-url="{{ route('api.activity.index', ['target_id' => $user->id, 'target_type' => 'user']) }}"
|
|
|
|
data-export-options='{
|
|
|
|
"fileName": "export-{{ str_slug($user->present()->fullName ) }}-history-{{ date('Y-m-d') }}",
|
|
|
|
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
|
|
|
}'>
|
2016-03-25 01:18:05 -07:00
|
|
|
<thead>
|
2017-05-31 09:39:52 -07:00
|
|
|
<tr>
|
2020-07-10 11:30:01 -07:00
|
|
|
<th data-field="icon" style="width: 40px;" class="hidden-xs" data-formatter="iconFormatter">Icon</th>
|
2018-01-24 04:48:00 -08:00
|
|
|
<th class="col-sm-3" data-field="created_at" data-formatter="dateDisplayFormatter" data-sortable="true">{{ trans('general.date') }}</th>
|
2017-05-31 09:39:52 -07:00
|
|
|
<th class="col-sm-2" data-field="admin" data-formatter="usersLinkObjFormatter">{{ trans('general.admin') }}</th>
|
|
|
|
<th class="col-sm-2" data-field="action_type">{{ trans('general.action') }}</th>
|
|
|
|
<th class="col-sm-3" data-field="item" data-formatter="polymorphicItemFormatter">{{ trans('general.item') }}</th>
|
|
|
|
<th class="col-sm-2" data-field="target" data-formatter="polymorphicItemFormatter">{{ trans('general.target') }}</th>
|
|
|
|
</tr>
|
2016-12-27 12:03:47 -08:00
|
|
|
</thead>
|
2016-03-25 01:18:05 -07:00
|
|
|
</table>
|
2017-05-31 09:39:52 -07:00
|
|
|
|
2016-12-27 12:03:47 -08:00
|
|
|
</div>
|
|
|
|
</div><!-- /.tab-pane -->
|
2017-05-22 17:27:00 -07:00
|
|
|
|
2020-03-31 22:52:21 -07:00
|
|
|
<div class="tab-pane" id="managed">
|
2017-05-22 17:27:00 -07:00
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="display table table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="col-md-8">{{ trans('general.name') }}</th>
|
|
|
|
<th class="col-md-4">{{ trans('general.date') }}</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach ($user->managedLocations as $location)
|
|
|
|
<tr>
|
|
|
|
<td>{!! $location->present()->nameUrl() !!}</a></td>
|
|
|
|
<td>{{ $location->created_at }}</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div><!-- /consumables-tab -->
|
2016-12-27 12:03:47 -08:00
|
|
|
</div><!-- /.tab-content -->
|
|
|
|
</div><!-- nav-tabs-custom -->
|
2016-03-25 01:18:05 -07:00
|
|
|
</div>
|
2016-12-27 12:03:47 -08:00
|
|
|
</div>
|
|
|
|
|
2020-03-31 22:50:07 -07:00
|
|
|
@can('update', \App\Models\User::class)
|
|
|
|
@include ('modals.upload-file', ['item_type' => 'user', 'item_id' => $user->id])
|
|
|
|
@endcan
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@stop
|
2016-03-25 01:18:05 -07:00
|
|
|
|
|
|
|
@section('moar_scripts')
|
2017-06-08 19:09:42 -07:00
|
|
|
@include ('partials.bootstrap-table', ['simple_view' => true])
|
2017-09-28 19:45:15 -07:00
|
|
|
<script nonce="{{ csrf_token() }}">
|
2016-03-25 01:18:05 -07:00
|
|
|
$(function () {
|
2019-03-18 11:59:02 -07:00
|
|
|
|
|
|
|
$("#two_factor_reset").click(function(){
|
|
|
|
$("#two_factor_resetrow").removeClass('success');
|
|
|
|
$("#two_factor_resetrow").removeClass('danger');
|
|
|
|
$("#two_factor_resetstatus").html('');
|
|
|
|
$("#two_factor_reseticon").html('<i class="fa fa-spinner spin"></i>');
|
|
|
|
$.ajax({
|
|
|
|
url: '{{ route('api.users.two_factor_reset', ['id'=> $user->id]) }}',
|
|
|
|
type: 'POST',
|
|
|
|
data: {},
|
|
|
|
headers: {
|
|
|
|
"X-Requested-With": 'XMLHttpRequest',
|
|
|
|
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content')
|
|
|
|
},
|
|
|
|
dataType: 'json',
|
|
|
|
|
|
|
|
success: function (data) {
|
|
|
|
$("#two_factor_reset_toggle").html('').html('{{ trans('general.no') }}');
|
|
|
|
$("#two_factor_reseticon").html('');
|
|
|
|
$("#two_factor_resetstatus").html('<i class="fa fa-check text-success"></i>' + data.message);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
error: function (data) {
|
|
|
|
$("#two_factor_reseticon").html('');
|
|
|
|
$("#two_factor_reseticon").html('<i class="fa fa-exclamation-triangle text-danger"></i>');
|
|
|
|
$('#two_factor_resetstatus').text(data.message);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
2016-03-25 01:18:05 -07:00
|
|
|
//binds to onchange event of your input field
|
|
|
|
var uploadedFileSize = 0;
|
|
|
|
$('#fileupload').bind('change', function() {
|
|
|
|
uploadedFileSize = this.files[0].size;
|
|
|
|
$('#progress-container').css('visibility', 'visible');
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#fileupload').fileupload({
|
|
|
|
//maxChunkSize: 100000,
|
|
|
|
dataType: 'json',
|
|
|
|
formData:{
|
|
|
|
_token:'{{ csrf_token() }}',
|
|
|
|
notes: $('#notes').val(),
|
|
|
|
},
|
|
|
|
|
|
|
|
progress: function (e, data) {
|
|
|
|
//var overallProgress = $('#fileupload').fileupload('progress');
|
|
|
|
//var activeUploads = $('#fileupload').fileupload('active');
|
|
|
|
var progress = parseInt((data.loaded / uploadedFileSize) * 100, 10);
|
|
|
|
$('.progress-bar').addClass('progress-bar-warning').css('width',progress + '%');
|
|
|
|
$('#progress-bar-text').html(progress + '%');
|
|
|
|
//console.dir(overallProgress);
|
|
|
|
},
|
|
|
|
|
|
|
|
done: function (e, data) {
|
|
|
|
console.dir(data);
|
|
|
|
|
|
|
|
// We use this instead of the fail option, since our API
|
|
|
|
// returns a 200 OK status which always shows as "success"
|
|
|
|
|
|
|
|
if (data && data.jqXHR.responseJSON.error && data.jqXHR.responseJSON && data.jqXHR.responseJSON.error) {
|
|
|
|
$('#progress-bar-text').html(data.jqXHR.responseJSON.error);
|
|
|
|
$('.progress-bar').removeClass('progress-bar-warning').addClass('progress-bar-danger').css('width','100%');
|
|
|
|
$('.progress-checkmark').fadeIn('fast').html('<i class="fa fa-times fa-3x icon-white" style="color: #d9534f"></i>');
|
|
|
|
console.log(data.jqXHR.responseJSON.error);
|
|
|
|
} else {
|
|
|
|
$('.progress-bar').removeClass('progress-bar-warning').addClass('progress-bar-success').css('width','100%');
|
|
|
|
$('.progress-checkmark').fadeIn('fast');
|
|
|
|
$('#progress-container').delay(950).css('visibility', 'visible');
|
|
|
|
$('.progress-bar-text').html('Finished!');
|
|
|
|
$('.progress-checkmark').fadeIn('fast').html('<i class="fa fa-check fa-3x icon-white" style="color: green"></i>');
|
|
|
|
$.each(data.result.file, function (index, file) {
|
2017-01-26 06:20:53 -08:00
|
|
|
$('<tr><td>' + file.notes + '</td><<td>' + file.name + '</td><td>Just now</td><td>' + file.filesize + '</td><td><a class="btn btn-info btn-sm hidden-print" href="import/process/' + file.name + '"><i class="fa fa-spinner process"></i> Process</a></td></tr>').prependTo("#upload-table > tbody");
|
2016-03-25 01:18:05 -07:00
|
|
|
});
|
|
|
|
}
|
|
|
|
$('#progress').removeClass('active');
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2017-05-31 09:39:52 -07:00
|
|
|
|
|
|
|
@stop
|