mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-12 16:44:08 -08:00
Merge branch 'develop'
This commit is contained in:
commit
5b15a2fc0a
|
@ -30,20 +30,21 @@ class AssetModelsController extends Controller
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$this->authorize('view', AssetModel::class);
|
$this->authorize('view', AssetModel::class);
|
||||||
$allowed_columns = ['id','image','name','model_number','eol','notes','created_at','manufacturer'];
|
$allowed_columns = ['id','image','name','model_number','eol','notes','created_at','manufacturer','assets_count'];
|
||||||
|
|
||||||
$assetmodels = AssetModel::select(['models.id','models.image','models.name','model_number','eol','models.notes','models.created_at','category_id','manufacturer_id','depreciation_id','fieldset_id', 'models.deleted_at'])
|
$assetmodels = AssetModel::select(['models.id','models.image','models.name','model_number','eol','models.notes','models.created_at','category_id','manufacturer_id','depreciation_id','fieldset_id', 'models.deleted_at'])
|
||||||
->with('category','depreciation', 'manufacturer','fieldset')
|
->with('category','depreciation', 'manufacturer','fieldset')
|
||||||
->withCount('assets');
|
->withCount('assets');
|
||||||
|
|
||||||
if ($request->has('search')) {
|
|
||||||
$assetmodels->TextSearch($request->input('search'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($request->has('status')) {
|
if ($request->has('status')) {
|
||||||
$assetmodels->onlyTrashed();
|
$assetmodels->onlyTrashed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($request->has('search')) {
|
||||||
|
$assetmodels->TextSearch($request->input('search'));
|
||||||
|
}
|
||||||
|
|
||||||
$offset = $request->input('offset', 0);
|
$offset = $request->input('offset', 0);
|
||||||
$limit = $request->input('limit', 50);
|
$limit = $request->input('limit', 50);
|
||||||
|
@ -60,6 +61,7 @@ class AssetModelsController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$total = $assetmodels->count();
|
$total = $assetmodels->count();
|
||||||
$assetmodels = $assetmodels->skip($offset)->take($limit)->get();
|
$assetmodels = $assetmodels->skip($offset)->take($limit)->get();
|
||||||
return (new AssetModelsTransformer)->transformAssetModels($assetmodels, $total);
|
return (new AssetModelsTransformer)->transformAssetModels($assetmodels, $total);
|
||||||
|
|
|
@ -54,6 +54,7 @@ class AssetsController extends Controller
|
||||||
*/
|
*/
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->authorize('index', Asset::class);
|
$this->authorize('index', Asset::class);
|
||||||
|
|
||||||
$allowed_columns = [
|
$allowed_columns = [
|
||||||
|
@ -78,30 +79,28 @@ class AssetsController extends Controller
|
||||||
];
|
];
|
||||||
|
|
||||||
$filter = array();
|
$filter = array();
|
||||||
|
|
||||||
if ($request->has('filter')) {
|
if ($request->has('filter')) {
|
||||||
$filter = json_decode($request->input('filter'));
|
$filter = json_decode($request->input('filter'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$all_custom_fields = CustomField::all(); //used as a 'cache' of custom fields throughout this page load
|
$all_custom_fields = CustomField::all(); //used as a 'cache' of custom fields throughout this page load
|
||||||
foreach ($all_custom_fields as $field) {
|
foreach ($all_custom_fields as $field) {
|
||||||
$allowed_columns[]=$field->db_column_name();
|
$allowed_columns[]=$field->db_column_name();
|
||||||
}
|
}
|
||||||
|
|
||||||
$assets = Company::scopeCompanyables(Asset::select('assets.*'),"company_id","assets")->with(
|
$assets = Company::scopeCompanyables(Asset::select('assets.*'),"company_id","assets")
|
||||||
'location', 'assetstatus', 'assetlog', 'company', 'defaultLoc','assignedTo',
|
->with('location', 'assetstatus', 'assetlog', 'company', 'defaultLoc','assignedTo',
|
||||||
'model.category', 'model.manufacturer', 'model.fieldset','supplier');
|
'model.category', 'model.manufacturer', 'model.fieldset','supplier');
|
||||||
|
|
||||||
|
|
||||||
if (count($filter) > 0) {
|
|
||||||
$assets->ByFilter($filter);
|
|
||||||
} elseif ($request->has('search')) {
|
|
||||||
$assets->TextSearch($request->input('search'));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// These are used by the API to query against specific ID numbers
|
|
||||||
|
// These are used by the API to query against specific ID numbers.
|
||||||
|
// They are also used by the individual searches on detail pages like
|
||||||
|
// locations, etc.
|
||||||
if ($request->has('status_id')) {
|
if ($request->has('status_id')) {
|
||||||
$assets->where('assets.status_id', '=', $request->input('status_id'));
|
$assets->where('assets.status_id', '=', $request->input('status_id'));
|
||||||
}
|
}
|
||||||
|
@ -116,6 +115,7 @@ class AssetsController extends Controller
|
||||||
|
|
||||||
if ($request->has('location_id')) {
|
if ($request->has('location_id')) {
|
||||||
$assets->where('assets.location_id', '=', $request->input('location_id'));
|
$assets->where('assets.location_id', '=', $request->input('location_id'));
|
||||||
|
// dd($assets->toSql());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->has('supplier_id')) {
|
if ($request->has('supplier_id')) {
|
||||||
|
@ -145,7 +145,6 @@ class AssetsController extends Controller
|
||||||
$limit = $request->input('limit', 50);
|
$limit = $request->input('limit', 50);
|
||||||
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
|
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
|
||||||
|
|
||||||
|
|
||||||
// This is used by the sidenav, mostly
|
// This is used by the sidenav, mostly
|
||||||
|
|
||||||
// We switched from using query scopes here because of a Laravel bug
|
// We switched from using query scopes here because of a Laravel bug
|
||||||
|
@ -205,6 +204,12 @@ class AssetsController extends Controller
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (count($filter) > 0) {
|
||||||
|
$assets->ByFilter($filter);
|
||||||
|
} elseif ($request->has('search')) {
|
||||||
|
$assets->TextSearch($request->input('search'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// This is kinda gross, but we need to do this because the Bootstrap Tables
|
// This is kinda gross, but we need to do this because the Bootstrap Tables
|
||||||
// API passes custom field ordering as custom_fields.fieldname, and we have to strip
|
// API passes custom field ordering as custom_fields.fieldname, and we have to strip
|
||||||
|
|
|
@ -25,9 +25,6 @@ class LicensesController extends Controller
|
||||||
$this->authorize('view', License::class);
|
$this->authorize('view', License::class);
|
||||||
$licenses = Company::scopeCompanyables(License::with('company', 'manufacturer', 'freeSeats', 'supplier')->withCount('freeSeats'));
|
$licenses = Company::scopeCompanyables(License::with('company', 'manufacturer', 'freeSeats', 'supplier')->withCount('freeSeats'));
|
||||||
|
|
||||||
if ($request->has('search')) {
|
|
||||||
$licenses = $licenses->TextSearch($request->input('search'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($request->has('company_id')) {
|
if ($request->has('company_id')) {
|
||||||
$licenses->where('company_id','=',$request->input('company_id'));
|
$licenses->where('company_id','=',$request->input('company_id'));
|
||||||
|
@ -73,6 +70,12 @@ class LicensesController extends Controller
|
||||||
$licenses->where('supplier_id','=',$request->input('supplier_id'));
|
$licenses->where('supplier_id','=',$request->input('supplier_id'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($request->has('search')) {
|
||||||
|
$licenses = $licenses->TextSearch($request->input('search'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$offset = request('offset', 0);
|
$offset = request('offset', 0);
|
||||||
$limit = request('limit', 50);
|
$limit = request('limit', 50);
|
||||||
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
|
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
|
||||||
|
@ -94,7 +97,8 @@ class LicensesController extends Controller
|
||||||
$licenses = $licenses->orderBy($sort, $order);
|
$licenses = $licenses->orderBy($sort, $order);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$total = $licenses->count();
|
$total = $licenses->count();
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ class ManufacturersController extends Controller
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$this->authorize('view', Manufacturer::class);
|
$this->authorize('view', Manufacturer::class);
|
||||||
$allowed_columns = ['id','name','url','support_url','support_email','support_phone','created_at','updated_at','image'];
|
$allowed_columns = ['id','name','url','support_url','support_email','support_phone','created_at','updated_at','image', 'assets_count', 'consumables_count', 'components_count', 'licenses_count'];
|
||||||
|
|
||||||
$manufacturers = Manufacturer::select(
|
$manufacturers = Manufacturer::select(
|
||||||
array('id','name','url','support_url','support_email','support_phone','created_at','updated_at','image')
|
array('id','name','url','support_url','support_email','support_phone','created_at','updated_at','image')
|
||||||
|
|
|
@ -58,11 +58,6 @@ class UsersController extends Controller
|
||||||
$users = Company::scopeCompanyables($users);
|
$users = Company::scopeCompanyables($users);
|
||||||
|
|
||||||
|
|
||||||
if ($request->has('search')) {
|
|
||||||
$users = $users->TextSearch($request->input('search'));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (($request->has('deleted')) && ($request->input('deleted')=='true')) {
|
if (($request->has('deleted')) && ($request->input('deleted')=='true')) {
|
||||||
$users = $users->GetDeleted();
|
$users = $users->GetDeleted();
|
||||||
}
|
}
|
||||||
|
@ -83,6 +78,10 @@ class UsersController extends Controller
|
||||||
$users = $users->where('users.department_id','=',$request->input('department_id'));
|
$users = $users->where('users.department_id','=',$request->input('department_id'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($request->has('search')) {
|
||||||
|
$users = $users->TextSearch($request->input('search'));
|
||||||
|
}
|
||||||
|
|
||||||
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
|
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
|
||||||
$offset = request('offset', 0);
|
$offset = request('offset', 0);
|
||||||
$limit = request('limit', 20);
|
$limit = request('limit', 20);
|
||||||
|
@ -111,6 +110,8 @@ class UsersController extends Controller
|
||||||
$users = $users->orderBy($sort, $order);
|
$users = $users->orderBy($sort, $order);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$total = $users->count();
|
$total = $users->count();
|
||||||
$users = $users->skip($offset)->take($limit)->get();
|
$users = $users->skip($offset)->take($limit)->get();
|
||||||
return (new UsersTransformer)->transformUsers($users, $total);
|
return (new UsersTransformer)->transformUsers($users, $total);
|
||||||
|
|
|
@ -85,7 +85,7 @@ class ManufacturerPresenter extends Presenter
|
||||||
[
|
[
|
||||||
"field" => "assets_count",
|
"field" => "assets_count",
|
||||||
"searchable" => false,
|
"searchable" => false,
|
||||||
"sortable" => false,
|
"sortable" => true,
|
||||||
"switchable" => true,
|
"switchable" => true,
|
||||||
"title" => ' <span class="hidden-md hidden-lg">Assets</span>'
|
"title" => ' <span class="hidden-md hidden-lg">Assets</span>'
|
||||||
.'<span class="hidden-xs"><i class="fa fa-barcode fa-lg"></i></span>',
|
.'<span class="hidden-xs"><i class="fa fa-barcode fa-lg"></i></span>',
|
||||||
|
@ -94,7 +94,7 @@ class ManufacturerPresenter extends Presenter
|
||||||
[
|
[
|
||||||
"field" => "licenses_count",
|
"field" => "licenses_count",
|
||||||
"searchable" => false,
|
"searchable" => false,
|
||||||
"sortable" => false,
|
"sortable" => true,
|
||||||
"switchable" => true,
|
"switchable" => true,
|
||||||
"title" => ' <span class="hidden-md hidden-lg">Licenses</span>'
|
"title" => ' <span class="hidden-md hidden-lg">Licenses</span>'
|
||||||
.'<span class="hidden-xs"><i class="fa fa-floppy-o fa-lg"></i></span>',
|
.'<span class="hidden-xs"><i class="fa fa-floppy-o fa-lg"></i></span>',
|
||||||
|
@ -103,7 +103,7 @@ class ManufacturerPresenter extends Presenter
|
||||||
[
|
[
|
||||||
"field" => "consumables_count",
|
"field" => "consumables_count",
|
||||||
"searchable" => false,
|
"searchable" => false,
|
||||||
"sortable" => false,
|
"sortable" => true,
|
||||||
"switchable" => true,
|
"switchable" => true,
|
||||||
"title" => ' <span class="hidden-md hidden-lg">Consumables</span>'
|
"title" => ' <span class="hidden-md hidden-lg">Consumables</span>'
|
||||||
.'<span class="hidden-xs"><i class="fa fa-tint fa-lg"></i></span>',
|
.'<span class="hidden-xs"><i class="fa fa-tint fa-lg"></i></span>',
|
||||||
|
@ -112,7 +112,7 @@ class ManufacturerPresenter extends Presenter
|
||||||
[
|
[
|
||||||
"field" => "accessories_count",
|
"field" => "accessories_count",
|
||||||
"searchable" => false,
|
"searchable" => false,
|
||||||
"sortable" => false,
|
"sortable" => true,
|
||||||
"switchable" => true,
|
"switchable" => true,
|
||||||
"title" => ' <span class="hidden-md hidden-lg">Accessories</span>'
|
"title" => ' <span class="hidden-md hidden-lg">Accessories</span>'
|
||||||
.'<span class="hidden-xs"><i class="fa fa-keyboard-o fa-lg"></i></span>',
|
.'<span class="hidden-xs"><i class="fa fa-keyboard-o fa-lg"></i></span>',
|
||||||
|
|
|
@ -60,12 +60,11 @@
|
||||||
data-url="{{ route('api.accessories.checkedout', $accessory->id) }}"
|
data-url="{{ route('api.accessories.checkedout', $accessory->id) }}"
|
||||||
data-cookie="true"
|
data-cookie="true"
|
||||||
data-click-to-select="true"
|
data-click-to-select="true"
|
||||||
data-cookie-id-table="accessoryUsersTable"
|
data-cookie-id-table="accessoryUsersTable">
|
||||||
>
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th data-switchable="false" data-searchable="false" data-formatter="usersLinkFormatter" data-sortable="false" data-field="name">{{ trans('general.user') }}</th>
|
<th data-searchable="false" data-formatter="usersLinkFormatter" data-sortable="false" data-field="name">{{ trans('general.user') }}</th>
|
||||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions" data-formatter="accessoriesInOutFormatter">{{ trans('table.actions') }}</th>
|
<th data-searchable="false" data-sortable="false" data-field="actions" data-formatter="accessoriesInOutFormatter">{{ trans('table.actions') }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
@ -91,5 +90,9 @@
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('moar_scripts')
|
@section('moar_scripts')
|
||||||
@include ('partials.bootstrap-table', ['exportFile' => 'accessory' . $accessory->name . '-export', 'search' => false])
|
@include ('partials.bootstrap-table', [
|
||||||
|
'exportFile' => 'accessory' .
|
||||||
|
$accessory->name . '-export',
|
||||||
|
'search' => 'false'
|
||||||
|
])
|
||||||
@stop
|
@stop
|
||||||
|
|
|
@ -38,13 +38,12 @@
|
||||||
data-url="{{route('api.consumables.showUsers', $consumable->id)}}"
|
data-url="{{route('api.consumables.showUsers', $consumable->id)}}"
|
||||||
data-cookie="true"
|
data-cookie="true"
|
||||||
data-click-to-select="true"
|
data-click-to-select="true"
|
||||||
data-cookie-id-table="consumableDetailTable-{{ config('version.hash_version') }}"
|
data-cookie-id-table="consumableDetailTable-{{ config('version.hash_version') }}">
|
||||||
>
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="name">{{ trans('general.user') }}</th>
|
<th data-searchable="false" data-sortable="false" data-field="name">{{ trans('general.user') }}</th>
|
||||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="created_at">{{ trans('general.date') }}</th>
|
<th data-searchable="false" data-sortable="false" data-field="created_at">{{ trans('general.date') }}</th>
|
||||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="admin">{{ trans('general.admin') }}</th>
|
<th data-searchable="false" data-sortable="false" data-field="admin">{{ trans('general.admin') }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -30,29 +30,14 @@
|
||||||
<div class="table table-responsive">
|
<div class="table table-responsive">
|
||||||
<table
|
<table
|
||||||
name="location_users"
|
name="location_users"
|
||||||
id="table-users"
|
id="location_usersDetailTable"
|
||||||
class="table table-striped snipe-table"
|
class="table table-striped snipe-table"
|
||||||
data-url="{{route('api.users.index', ['location_id' => $location->id])}}"
|
data-url="{{route('api.users.index', ['location_id' => $location->id])}}"
|
||||||
data-cookie="true"
|
data-cookie="true"
|
||||||
data-click-to-select="true"
|
data-click-to-select="true"
|
||||||
data-cookie-id-table="location_usersDetailTable">
|
data-cookie-id-table="location_usersDetailTable"
|
||||||
<thead>
|
data-columns="{{ \App\Presenters\UserPresenter::dataTableLayout() }}">
|
||||||
<tr>
|
|
||||||
<th data-searchable="false" data-visible="false" data-sortable="true" data-field="id">{{ trans('general.id') }}</th>
|
|
||||||
<th data-searchable="false" data-sortable="false" data-formatter="imageFormatter" data-field="avatar">Avatar</th>
|
|
||||||
<th data-searchable="true" data-sortable="true" data-formatter="usersLinkFormatter" data-field="name">{{ trans('general.user') }}</th>
|
|
||||||
<th data-searchable="true" data-sortable="true" data-formatter="usersLinkFormatter" data-field="jobtitle">{{ trans('admin/users/table.title') }}</th>
|
|
||||||
<th data-searchable="true" data-sortable="true" data-formatter="emailFormatter" data-field="email">{{ trans('admin/users/table.email') }}</th>
|
|
||||||
<th data-searchable="true" data-visible="false" data-sortable="true" data-field="phone">{{ trans('admin/users/table.phone') }}</th>
|
|
||||||
<th data-searchable="true" data-visible="false" data-sortable="true" data-formatter="usersLinkObjFormatter" data-field="manager">{{ trans('admin/users/table.manager') }}</th>
|
|
||||||
<th data-searchable="true" data-sortable="true" data-field="assets_count"><span class="hidden-md hidden-lg">Assets</span><span class="hidden-xs"><i class="fa fa-barcode fa-lg"></i></span></th>
|
|
||||||
<th data-searchable="true" data-sortable="true" data-field="licenses_count"><span class="hidden-md hidden-lg">Licenses</span><span class="hidden-xs"><i class="fa fa-floppy-o fa-lg"></i></span></th>
|
|
||||||
<th data-searchable="true" data-sortable="true" data-field="consumables_count"><span class="hidden-md hidden-lg">Consumables</span><span class="hidden-xs"><i class="fa fa-tint fa-lg"></i></span></th>
|
|
||||||
<th data-searchable="true" data-sortable="true" data-field="accessories_count"><span class="hidden-md hidden-lg">Accessories</span><span class="hidden-xs"><i class="fa fa-keyboard-o fa-lg"></i></span></th>
|
|
||||||
<th data-searchable="true" data-sortable="true" data-formatter="departmentsLinkObjFormatter" data-field="department">{{ trans('general.department') }}</th>
|
|
||||||
<th data-searchable="true" data-sortable="true" data-formatter="usersActionsFormatter" data-field="actions">{{ trans('table.actions') }}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
</table>
|
</table>
|
||||||
</div><!-- /.table-responsive -->
|
</div><!-- /.table-responsive -->
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
|
@ -68,27 +53,12 @@
|
||||||
<div class="table table-responsive">
|
<div class="table table-responsive">
|
||||||
<table
|
<table
|
||||||
name="location_assets"
|
name="location_assets"
|
||||||
id="table-assets"
|
id="location_assetsDetailTable"
|
||||||
data-url="{{route('api.assets.index', ['location_id' => $location->id]) }}"
|
data-url="{{route('api.assets.index', ['location_id' => $location->id]) }}"
|
||||||
class="table table-striped snipe-table"
|
class="table table-striped snipe-table"
|
||||||
data-cookie="true"
|
|
||||||
data-show-footer="true"
|
data-show-footer="true"
|
||||||
data-click-to-select="true"
|
data-cookie-id-table="location_assetsDetailTable"
|
||||||
data-cookie-id-table="location_assetsDetailTable">
|
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}">
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th data-searchable="false" data-visible="false" data-sortable="true" data-field="id">{{ trans('general.id') }}</th>
|
|
||||||
<th data-searchable="false" data-visible="true" data-sortable="false" data-formatter="imageFormatter" data-field="image">{{ trans('admin/hardware/table.image') }}</th>
|
|
||||||
<th data-searchable="true" data-sortable="true" data-formatter="hardwareLinkFormatter" data-field="name">{{ trans('general.name') }}</th>
|
|
||||||
<th data-searchable="true" data-formatter="modelsLinkObjFormatter" data-sortable="true" data-field="model">{{ trans('admin/hardware/form.model') }}</th>
|
|
||||||
<th data-searchable="true" data-sortable="true" data-field="asset_tag" data-formatter="hardwareLinkFormatter">{{ trans('admin/hardware/form.tag') }}</th>
|
|
||||||
<th data-searchable="true" data-sortable="true" data-field="serial">{{ trans('admin/hardware/form.serial') }}</th>
|
|
||||||
<th data-searchable="true" data-visible="false" data-sortable="true" data-field="category" data-formatter="categoriesLinkObjFormatter">{{ trans('general.category') }}</th>
|
|
||||||
<th data-field="purchase_cost" data-searchable="true" data-sortable="true" data-footer-formatter="sumFormatter">{{ trans('general.purchase_cost') }}</th>
|
|
||||||
<th data-searchable="false" data-sortable="false" data-field="checkincheckout" data-formatter="hardwareInOutFormatter">Checkin/Checkout</th>
|
|
||||||
<th data-searchable="false" data-sortable="false" data-field="actions" data-formatter="hardwareActionsFormatter">{{ trans('table.actions') }}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
</table>
|
</table>
|
||||||
</div><!-- /.table-responsive -->
|
</div><!-- /.table-responsive -->
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
|
@ -143,6 +113,9 @@
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('moar_scripts')
|
@section('moar_scripts')
|
||||||
@include ('partials.bootstrap-table', ['exportFile' => 'locations-export', 'search' => true])
|
@include ('partials.bootstrap-table', [
|
||||||
|
'exportFile' => 'locations-export',
|
||||||
|
'search' => true
|
||||||
|
])
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
|
|
@ -44,121 +44,55 @@
|
||||||
|
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div class="tab-pane fade in active" id="assets">
|
<div class="tab-pane fade in active" id="assets">
|
||||||
|
|
||||||
<table
|
<table
|
||||||
name="manufacturer_assets"
|
name="manufacturerDetail-assets"
|
||||||
class="table table-striped bootstrap-table snipe-table"
|
id="manufacturerDetail-assets"
|
||||||
id="assets-table"
|
class="table table-striped snipe-table"
|
||||||
data-url="{{ route('api.assets.index', ['manufacturer_id' => $manufacturer->id, 'itemtype' => 'assets']) }}"
|
data-search="true"
|
||||||
data-cookie="true"
|
data-url="{{ route('api.assets.index', ['manufacturer_id' => $manufacturer->id, 'itemtype' => 'assets']) }}"
|
||||||
data-click-to-select="true"
|
data-cookie-id-table="manufacturerDetail-assets"
|
||||||
data-cookie-id-table="maufacturerAssetsTable-{{config('version.hash_version') }}">
|
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}">
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th data-searchable="false" data-sortable="false" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
|
||||||
<th data-searchable="false" data-sortable="false" data-field="company" data-visible="false" data-formatter="companiesLinkObjFormatter">
|
|
||||||
{{ trans('admin/companies/table.title') }}
|
|
||||||
</th>
|
|
||||||
<th data-searchable="false" data-sortable="false" data-field="name" data-formatter="hardwareLinkFormatter">{{ trans('general.name') }}</th>
|
|
||||||
<th data-searchable="false" data-sortable="false" data-field="image" data-visible="false" data-formatter="imageFormatter">{{ trans('admin/hardware/table.image') }}</th>
|
|
||||||
<th data-searchable="false" data-sortable="false" data-field="model" data-formatter="modelsLinkObjFormatter">{{ trans('admin/hardware/form.model') }}</th>
|
|
||||||
<th data-searchable="false" data-sortable="false" data-field="asset_tag" data-formatter="hardwareLinkFormatter">{{ trans('general.asset_tag') }}</th>
|
|
||||||
<th data-searchable="false" data-sortable="false" data-field="serial" data-formatter="hardwareLinkFormatter">{{ trans('admin/hardware/form.serial') }}</th>
|
|
||||||
<th data-searchable="false" data-sortable="false" data-field="assigned_to" data-formatter="usersLinkObjFormatter">{{ trans('general.user') }}</th>
|
|
||||||
<th data-searchable="false" data-sortable="false" data-field="change" data-switchable="false" data-formatter="hardwareInOutFormatter">{{ trans('admin/hardware/table.change') }}</th>
|
|
||||||
<th data-searchable="false" data-sortable="false" data-field="actions" data-switchable="false" data-formatter="hardwareActionsFormatter">{{ trans('table.actions') }}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
</table>
|
</table>
|
||||||
</div> <!-- /.tab-pane assets -->
|
</div> <!-- /.tab-pane assets -->
|
||||||
|
|
||||||
<div class="tab-pane fade" id="licenses">
|
<div class="tab-pane fade" id="licenses">
|
||||||
<table
|
<table
|
||||||
name="manufacturer_licenses"
|
name="manufacturerDetail-licenses"
|
||||||
class="table table-striped bootstrap-table snipe-table"
|
id="manufacturerDetail-licenses"
|
||||||
id="licenses-table"
|
class="table table-striped snipe-table"
|
||||||
data-url="{{ route('api.licenses.index', ['manufacturer_id' => $manufacturer->id]) }}"
|
data-search="true"
|
||||||
data-cookie="true"
|
data-url="{{ route('api.licenses.index', ['manufacturer_id' => $manufacturer->id]) }}"
|
||||||
data-click-to-select="true"
|
data-cookie-id-table="manufacturerDetail-licenses"
|
||||||
data-cookie-id-table="maufacturerLicensesTable-{{config('version.hash_version') }}">
|
data-columns="{{ \App\Presenters\LicensePresenter::dataTableLayout() }}">
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
|
||||||
<th data-field="company" data-sortable="false" data-switchable="true" data-formatter="companiesLinkObjFormatter">{{ trans('general.company') }}</th>
|
|
||||||
<th data-field="name" data-sortable="true" data-formatter="licensesLinkFormatter">{{ trans('admin/licenses/table.title') }}</th>
|
|
||||||
<th data-field="manufacturer" data-sortable="true" data-formatter="manufacturersLinkObjFormatter">{{ trans('general.manufacturer') }}</th>
|
|
||||||
<th data-field="product_key" data-sortable="true" >{{ trans('admin/licenses/table.serial') }}</th>
|
|
||||||
<th data-field="license_name" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.to_name') }}</th>
|
|
||||||
<th data-field="license_email" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.to_email') }}</th>
|
|
||||||
<th data-field="total_seats" data-sortable="false">{{ trans('admin/licenses/form.seats') }}</th>
|
|
||||||
<th data-field="remaining_qty" data-sortable="false">{{ trans('admin/licenses/form.remaining_seats') }}</th>
|
|
||||||
<th data-field="purchase_date" data-sortable="true" data-formatter="dateDisplayFormatter">{{ trans('admin/licenses/table.purchase_date') }}</th>
|
|
||||||
<th data-field="purchase_cost" data-sortable="true">{{ trans('general.purchase_cost') }}</th>
|
|
||||||
<th data-field="purchase_order" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.purchase_order') }}</th>
|
|
||||||
<th data-field="expiration_date" data-sortable="true" data-visible="false" data-formatter="dateDisplayFormatter">{{ trans('admin/licenses/form.expiration') }}</th>
|
|
||||||
<th data-field="notes" data-sortable="true" data-visible="false">{{ trans('general.notes') }}</th>
|
|
||||||
<th data-field="actions" data-formatter="licensesActionsFormatter">{{ trans('table.actions') }}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
</table>
|
</table>
|
||||||
</div><!-- /.tab-pan licenses-->
|
</div><!-- /.tab-pan licenses-->
|
||||||
|
|
||||||
<div class="tab-pane fade" id="accessories">
|
<div class="tab-pane fade" id="accessories">
|
||||||
<table
|
<table
|
||||||
name="manufacturer_accessories"
|
name="manufacturerDetail-accessories"
|
||||||
class="table table-striped bootstrap-table snipe-table"
|
id="manufacturerDetail-accessories"
|
||||||
id="licenses-table"
|
class="table table-striped snipe-table"
|
||||||
data-url="{{ route('api.accessories.index', ['manufacturer_id' => $manufacturer->id]) }}"
|
data-search="true"
|
||||||
data-cookie="true"
|
data-url="{{ route('api.accessories.index', ['manufacturer_id' => $manufacturer->id]) }}"
|
||||||
data-click-to-select="true"
|
data-cookie-id-table="manufacturerDetail-accessories"
|
||||||
data-cookie-id-table="manufacturerAccessoriesTable-{{config('version.hash_version') }}">
|
data-columns="{{ \App\Presenters\AccessoryPresenter::dataTableLayout() }}">
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th data-switchable="true" data-searchable="true" data-sortable="true" data-field="company" data-visible="false" data-formatter="companiesLinkObjFormatter">{{ trans('admin/companies/table.title') }}</th>
|
|
||||||
<th data-sortable="true" data-searchable="true" data-field="name" data-formatter="accessoriesLinkFormatter">{{ trans('admin/accessories/table.title') }}</th>
|
|
||||||
<th data-searchable="true" data-sortable="true" data-field="category" data-formatter="categoriesLinkObjFormatter">{{ trans('admin/accessories/general.accessory_category') }}</th>
|
|
||||||
<th data-field="manufacturer" data-searchable="true" data-sortable="true" data-formatter="manufacturersLinkObjFormatter">{{ trans('general.manufacturer') }}</th>
|
|
||||||
<th data-searchable="true" data-sortable="true" data-field="location" data-formatter="locationsLinkObjFormatter">{{ trans('general.location') }}</th>
|
|
||||||
<th data-searchable="false" data-sortable="false" data-field="qty">{{ trans('admin/accessories/general.total') }}</th>
|
|
||||||
<th data-searchable="true" data-sortable="true" data-field="purchase_date" data-visible="false" data-formatter="dateDisplayFormatter">{{ trans('general.purchase_date') }}</th>
|
|
||||||
<th data-searchable="true" data-sortable="true" data-field="purchase_cost">{{ trans('general.purchase_cost') }}</th>
|
|
||||||
<th data-searchable="true" data-sortable="true" data-field="order_number" data-visible="false">{{ trans('general.order_number') }}</th>
|
|
||||||
<th data-searchable="false" data-sortable="true" data-field="min_qty">{{ trans('general.min_amt') }}</th>
|
|
||||||
<th data-searchable="false" data-sortable="false" data-field="remaining_qty">{{ trans('admin/accessories/general.remaining') }}</th>
|
|
||||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions" data-formatter="accessoriesActionsFormatter">{{ trans('table.actions') }}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
</table>
|
</table>
|
||||||
</div> <!-- /.tab-pan accessories-->
|
</div> <!-- /.tab-pan accessories-->
|
||||||
|
|
||||||
<div class="tab-pane fade" id="consumables">
|
<div class="tab-pane fade" id="consumables">
|
||||||
|
|
||||||
|
|
||||||
<table
|
<table
|
||||||
name="manufacturer_consumables"
|
name="manufacturerDetail-consumables"
|
||||||
class="table table-striped bootstrap-table snipe-table"
|
id="manufacturerDetail-consumables"
|
||||||
id="licenses-table"
|
class="table table-striped snipe-table"
|
||||||
data-url="{{ route('api.consumables.index', ['manufacturer_id' => $manufacturer->id]) }}"
|
data-search="true"
|
||||||
data-cookie="true"
|
data-url="{{ route('api.consumables.index', ['manufacturer_id' => $manufacturer->id]) }}"
|
||||||
data-click-to-select="true"
|
data-cookie-id-table="manufacturerDetail-consumables"
|
||||||
data-cookie-id-table="maufacturerConsumablesTable-{{config('version.hash_version') }}">
|
data-columns="{{ \App\Presenters\ConsumablePresenter::dataTableLayout() }}">
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
|
||||||
<th data-switchable="true" data-searchable="true" data-sortable="true" data-field="company" data-formatter="companiesLinkObjFormatter">{{ trans('admin/companies/table.title') }}</th>
|
|
||||||
<th data-sortable="true" data-searchable="true" data-field="name" data-formatter="consumablesLinkFormatter">{{ trans('admin/consumables/table.title') }}</th>
|
|
||||||
<th data-searchable="true" data-sortable="true" data-field="location" data-formatter="locationsLinkObjFormatter">{{ trans('general.location') }}</th>
|
|
||||||
<th data-searchable="true" data-sortable="true" data-field="category" data-formatter="categoriesLinkObjFormatter">{{ trans('general.category') }}</th>
|
|
||||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="qty"> {{ trans('admin/consumables/general.total') }}</th>
|
|
||||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="remaining"> {{ trans('admin/consumables/general.remaining') }}</th>
|
|
||||||
<th data-switchable="false" data-searchable="false" data-sortable="true" data-field="min_amt"> {{ trans('general.min_amt') }}</th>
|
|
||||||
<th data-sortable="true" data-field="manufacturer" data-visible="false" data-formatter="manufacturersLinkObjFormatter">{{ trans('general.manufacturer') }}</th>
|
|
||||||
<th data-sortable="true" data-field="model_number" data-visible="false">{{ trans('general.model_no') }}</th>
|
|
||||||
<th data-sortable="true" data-field="item_no" data-visible="false">{{ trans('admin/consumables/general.item_no') }}</th>
|
|
||||||
<th data-sortable="true" data-searchable="true" data-field="order_number" data-visible="false">{{ trans('general.order_number') }}</th>
|
|
||||||
<th data-sortable="true" data-searchable="true" data-field="purchase_date" data-visible="false" data-formatter="dateDisplayFormatter">{{ trans('general.purchase_date') }}</th>
|
|
||||||
<th data-sortable="true" data-searchable="true" data-field="purchase_cost" data-visible="false">{{ trans('general.purchase_cost') }}</th>
|
|
||||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions" data-formatter="consumablesActionsFormatter"> {{ trans('table.actions') }}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div> <!-- /.tab-pan consumables-->
|
</div> <!-- /.tab-pan consumables-->
|
||||||
|
|
||||||
</div> <!-- /.tab-content -->
|
</div> <!-- /.tab-content -->
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
<th data-sortable="true" data-field="image" data-formatter="imageFormatter" data-visible="false">{{ trans('admin/hardware/table.image') }}</th>
|
<th data-sortable="true" data-field="image" data-formatter="imageFormatter" data-visible="false">{{ trans('admin/hardware/table.image') }}</th>
|
||||||
<th data-sortable="true" data-field="manufacturer" data-formatter="manufacturersLinkObjFormatter">{{ trans('general.manufacturer') }}</th>
|
<th data-sortable="true" data-field="manufacturer" data-formatter="manufacturersLinkObjFormatter">{{ trans('general.manufacturer') }}</th>
|
||||||
<th data-sortable="true" data-field="model_number">{{ trans('admin/models/table.modelnumber') }}</th>
|
<th data-sortable="true" data-field="model_number">{{ trans('admin/models/table.modelnumber') }}</th>
|
||||||
<th data-sortable="false" data-field="assets_count">{{ trans('admin/models/table.numassets') }}</th>
|
<th data-sortable="true" data-field="assets_count">{{ trans('admin/models/table.numassets') }}</th>
|
||||||
<th data-sortable="false" data-field="depreciation" data-formatter="depreciationsLinkObjFormatter">{{ trans('general.depreciation') }}</th>
|
<th data-sortable="false" data-field="depreciation" data-formatter="depreciationsLinkObjFormatter">{{ trans('general.depreciation') }}</th>
|
||||||
<th data-sortable="false" data-field="category" data-formatter="categoriesLinkObjFormatter">{{ trans('general.category') }}</th>
|
<th data-sortable="false" data-field="category" data-formatter="categoriesLinkObjFormatter">{{ trans('general.category') }}</th>
|
||||||
<th data-sortable="true" data-field="eol">{{ trans('general.eol') }}</th>
|
<th data-sortable="true" data-field="eol">{{ trans('general.eol') }}</th>
|
||||||
|
|
|
@ -60,26 +60,14 @@
|
||||||
|
|
||||||
<table
|
<table
|
||||||
name="modelassets"
|
name="modelassets"
|
||||||
id="table"
|
id="modelDetailAssets"
|
||||||
class="snipe-table"
|
class="table table-striped snipe-table"
|
||||||
data-toolbar="#toolbar"
|
data-toolbar="#toolbar"
|
||||||
data-url="{{ route('api.assets.index',['model_id'=> $model->id]) }}"
|
data-url="{{ route('api.assets.index',['model_id'=> $model->id]) }}"
|
||||||
data-cookie="true"
|
data-cookie="true"
|
||||||
data-click-to-select="true"
|
data-click-to-select="true"
|
||||||
data-cookie-id-table="model-assets">
|
data-cookie-id-table="modelDetailAssets"
|
||||||
<thead>
|
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}">
|
||||||
<tr>
|
|
||||||
<th data-checkbox="true" data-field="checkbox"></th>
|
|
||||||
<th data-sortable="true" data-field="id" data-searchable="false" data-visible="false">{{ trans('general.id') }}</th>
|
|
||||||
<th data-sortable="false" data-field="company" data-searchable="false" data-visible="false" data-formatter="companiesLinkObjFormatter">{{ trans('admin/companies/table.title') }}</th>
|
|
||||||
<th data-sortable="true" data-field="name" data-searchable="true" data-formatter="hardwareLinkFormatter">{{ trans('general.name') }}</th>
|
|
||||||
<th data-sortable="true" data-field="asset_tag" data-formatter="hardwareLinkFormatter">{{ trans('general.asset_tag') }}</th>
|
|
||||||
<th data-sortable="true" data-field="serial" data-formatter="hardwareLinkFormatter">{{ trans('admin/hardware/table.serial') }}</th>
|
|
||||||
<th data-sortable="false" data-field="assigned_to" data-formatter="polymorphicItemFormatter">{{ trans('admin/hardware/form.checkedout_to') }}</th>
|
|
||||||
<th data-sortable="false" data-field="inout" data-formatter="hardwareInOutFormatter">{{ trans('admin/hardware/table.change') }}</th>
|
|
||||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions" data-formatter="hardwareActionsFormatter">{{ trans('table.actions') }}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
</table>
|
</table>
|
||||||
{{ Form::close() }}
|
{{ Form::close() }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
},
|
},
|
||||||
undefinedText: '',
|
undefinedText: '',
|
||||||
iconsPrefix: 'fa',
|
iconsPrefix: 'fa',
|
||||||
search: {{ (isset($search)) ? 'true' : 'false' }},
|
{!! ((isset($search)) && ($search=='true')) ? 'search: "true",' : '' !!}
|
||||||
paginationVAlign: 'both',
|
paginationVAlign: 'both',
|
||||||
sidePagination: '{{ (isset($clientSearch)) ? 'client' : 'server' }}',
|
sidePagination: '{{ (isset($clientSearch)) ? 'client' : 'server' }}',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
|
Loading…
Reference in a new issue