Merge branch 'develop'

This commit is contained in:
snipe 2018-01-11 15:23:27 -08:00
commit 5b15a2fc0a
13 changed files with 101 additions and 192 deletions

View file

@ -30,20 +30,21 @@ class AssetModelsController extends Controller
public function index(Request $request)
{
$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'])
->with('category','depreciation', 'manufacturer','fieldset')
->withCount('assets');
if ($request->has('search')) {
$assetmodels->TextSearch($request->input('search'));
}
if ($request->has('status')) {
$assetmodels->onlyTrashed();
}
if ($request->has('search')) {
$assetmodels->TextSearch($request->input('search'));
}
$offset = $request->input('offset', 0);
$limit = $request->input('limit', 50);
@ -60,6 +61,7 @@ class AssetModelsController extends Controller
}
$total = $assetmodels->count();
$assetmodels = $assetmodels->skip($offset)->take($limit)->get();
return (new AssetModelsTransformer)->transformAssetModels($assetmodels, $total);

View file

@ -54,6 +54,7 @@ class AssetsController extends Controller
*/
public function index(Request $request)
{
$this->authorize('index', Asset::class);
$allowed_columns = [
@ -78,30 +79,28 @@ class AssetsController extends Controller
];
$filter = array();
if ($request->has('filter')) {
$filter = json_decode($request->input('filter'));
}
$all_custom_fields = CustomField::all(); //used as a 'cache' of custom fields throughout this page load
foreach ($all_custom_fields as $field) {
$allowed_columns[]=$field->db_column_name();
}
$assets = Company::scopeCompanyables(Asset::select('assets.*'),"company_id","assets")->with(
'location', 'assetstatus', 'assetlog', 'company', 'defaultLoc','assignedTo',
$assets = Company::scopeCompanyables(Asset::select('assets.*'),"company_id","assets")
->with('location', 'assetstatus', 'assetlog', 'company', 'defaultLoc','assignedTo',
'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')) {
$assets->where('assets.status_id', '=', $request->input('status_id'));
}
@ -116,6 +115,7 @@ class AssetsController extends Controller
if ($request->has('location_id')) {
$assets->where('assets.location_id', '=', $request->input('location_id'));
// dd($assets->toSql());
}
if ($request->has('supplier_id')) {
@ -145,7 +145,6 @@ class AssetsController extends Controller
$limit = $request->input('limit', 50);
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
// This is used by the sidenav, mostly
// 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
// API passes custom field ordering as custom_fields.fieldname, and we have to strip

View file

@ -25,9 +25,6 @@ class LicensesController extends Controller
$this->authorize('view', License::class);
$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')) {
$licenses->where('company_id','=',$request->input('company_id'));
@ -73,6 +70,12 @@ class LicensesController extends Controller
$licenses->where('supplier_id','=',$request->input('supplier_id'));
}
if ($request->has('search')) {
$licenses = $licenses->TextSearch($request->input('search'));
}
$offset = request('offset', 0);
$limit = request('limit', 50);
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
@ -94,7 +97,8 @@ class LicensesController extends Controller
$licenses = $licenses->orderBy($sort, $order);
break;
}
$total = $licenses->count();

View file

@ -22,7 +22,7 @@ class ManufacturersController extends Controller
public function index(Request $request)
{
$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(
array('id','name','url','support_url','support_email','support_phone','created_at','updated_at','image')

View file

@ -58,11 +58,6 @@ class UsersController extends Controller
$users = Company::scopeCompanyables($users);
if ($request->has('search')) {
$users = $users->TextSearch($request->input('search'));
}
if (($request->has('deleted')) && ($request->input('deleted')=='true')) {
$users = $users->GetDeleted();
}
@ -83,6 +78,10 @@ class UsersController extends Controller
$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';
$offset = request('offset', 0);
$limit = request('limit', 20);
@ -111,6 +110,8 @@ class UsersController extends Controller
$users = $users->orderBy($sort, $order);
break;
}
$total = $users->count();
$users = $users->skip($offset)->take($limit)->get();
return (new UsersTransformer)->transformUsers($users, $total);

View file

@ -85,7 +85,7 @@ class ManufacturerPresenter extends Presenter
[
"field" => "assets_count",
"searchable" => false,
"sortable" => false,
"sortable" => true,
"switchable" => true,
"title" => ' <span class="hidden-md hidden-lg">Assets</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",
"searchable" => false,
"sortable" => false,
"sortable" => true,
"switchable" => true,
"title" => ' <span class="hidden-md hidden-lg">Licenses</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",
"searchable" => false,
"sortable" => false,
"sortable" => true,
"switchable" => true,
"title" => ' <span class="hidden-md hidden-lg">Consumables</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",
"searchable" => false,
"sortable" => false,
"sortable" => true,
"switchable" => true,
"title" => ' <span class="hidden-md hidden-lg">Accessories</span>'
.'<span class="hidden-xs"><i class="fa fa-keyboard-o fa-lg"></i></span>',

View file

@ -60,12 +60,11 @@
data-url="{{ route('api.accessories.checkedout', $accessory->id) }}"
data-cookie="true"
data-click-to-select="true"
data-cookie-id-table="accessoryUsersTable"
>
data-cookie-id-table="accessoryUsersTable">
<thead>
<tr>
<th data-switchable="false" 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-formatter="usersLinkFormatter" data-sortable="false" data-field="name">{{ trans('general.user') }}</th>
<th data-searchable="false" data-sortable="false" data-field="actions" data-formatter="accessoriesInOutFormatter">{{ trans('table.actions') }}</th>
</tr>
</thead>
</table>
@ -91,5 +90,9 @@
@stop
@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

View file

@ -38,13 +38,12 @@
data-url="{{route('api.consumables.showUsers', $consumable->id)}}"
data-cookie="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>
<tr>
<th data-switchable="false" 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-switchable="false" data-searchable="false" data-sortable="false" data-field="admin">{{ trans('general.admin') }}</th>
<th data-searchable="false" data-sortable="false" data-field="name">{{ trans('general.user') }}</th>
<th data-searchable="false" data-sortable="false" data-field="created_at">{{ trans('general.date') }}</th>
<th data-searchable="false" data-sortable="false" data-field="admin">{{ trans('general.admin') }}</th>
</tr>
</thead>
</table>

View file

@ -30,29 +30,14 @@
<div class="table table-responsive">
<table
name="location_users"
id="table-users"
id="location_usersDetailTable"
class="table table-striped snipe-table"
data-url="{{route('api.users.index', ['location_id' => $location->id])}}"
data-cookie="true"
data-click-to-select="true"
data-cookie-id-table="location_usersDetailTable">
<thead>
<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>
data-cookie-id-table="location_usersDetailTable"
data-columns="{{ \App\Presenters\UserPresenter::dataTableLayout() }}">
</table>
</div><!-- /.table-responsive -->
</div><!-- /.box-body -->
@ -68,27 +53,12 @@
<div class="table table-responsive">
<table
name="location_assets"
id="table-assets"
id="location_assetsDetailTable"
data-url="{{route('api.assets.index', ['location_id' => $location->id]) }}"
class="table table-striped snipe-table"
data-cookie="true"
data-show-footer="true"
data-click-to-select="true"
data-cookie-id-table="location_assetsDetailTable">
<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>
data-cookie-id-table="location_assetsDetailTable"
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}">
</table>
</div><!-- /.table-responsive -->
</div><!-- /.box-body -->
@ -143,6 +113,9 @@
@stop
@section('moar_scripts')
@include ('partials.bootstrap-table', ['exportFile' => 'locations-export', 'search' => true])
@include ('partials.bootstrap-table', [
'exportFile' => 'locations-export',
'search' => true
])
@stop

View file

@ -44,121 +44,55 @@
<div class="tab-content">
<div class="tab-pane fade in active" id="assets">
<table
name="manufacturer_assets"
class="table table-striped bootstrap-table snipe-table"
id="assets-table"
data-url="{{ route('api.assets.index', ['manufacturer_id' => $manufacturer->id, 'itemtype' => 'assets']) }}"
data-cookie="true"
data-click-to-select="true"
data-cookie-id-table="maufacturerAssetsTable-{{config('version.hash_version') }}">
<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>
name="manufacturerDetail-assets"
id="manufacturerDetail-assets"
class="table table-striped snipe-table"
data-search="true"
data-url="{{ route('api.assets.index', ['manufacturer_id' => $manufacturer->id, 'itemtype' => 'assets']) }}"
data-cookie-id-table="manufacturerDetail-assets"
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}">
</table>
</div> <!-- /.tab-pane assets -->
<div class="tab-pane fade" id="licenses">
<table
name="manufacturer_licenses"
class="table table-striped bootstrap-table snipe-table"
id="licenses-table"
data-url="{{ route('api.licenses.index', ['manufacturer_id' => $manufacturer->id]) }}"
data-cookie="true"
data-click-to-select="true"
data-cookie-id-table="maufacturerLicensesTable-{{config('version.hash_version') }}">
<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>
name="manufacturerDetail-licenses"
id="manufacturerDetail-licenses"
class="table table-striped snipe-table"
data-search="true"
data-url="{{ route('api.licenses.index', ['manufacturer_id' => $manufacturer->id]) }}"
data-cookie-id-table="manufacturerDetail-licenses"
data-columns="{{ \App\Presenters\LicensePresenter::dataTableLayout() }}">
</table>
</div><!-- /.tab-pan licenses-->
<div class="tab-pane fade" id="accessories">
<table
name="manufacturer_accessories"
class="table table-striped bootstrap-table snipe-table"
id="licenses-table"
data-url="{{ route('api.accessories.index', ['manufacturer_id' => $manufacturer->id]) }}"
data-cookie="true"
data-click-to-select="true"
data-cookie-id-table="manufacturerAccessoriesTable-{{config('version.hash_version') }}">
<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>
name="manufacturerDetail-accessories"
id="manufacturerDetail-accessories"
class="table table-striped snipe-table"
data-search="true"
data-url="{{ route('api.accessories.index', ['manufacturer_id' => $manufacturer->id]) }}"
data-cookie-id-table="manufacturerDetail-accessories"
data-columns="{{ \App\Presenters\AccessoryPresenter::dataTableLayout() }}">
</table>
</div> <!-- /.tab-pan accessories-->
<div class="tab-pane fade" id="consumables">
<table
name="manufacturer_consumables"
class="table table-striped bootstrap-table snipe-table"
id="licenses-table"
data-url="{{ route('api.consumables.index', ['manufacturer_id' => $manufacturer->id]) }}"
data-cookie="true"
data-click-to-select="true"
data-cookie-id-table="maufacturerConsumablesTable-{{config('version.hash_version') }}">
<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>
name="manufacturerDetail-consumables"
id="manufacturerDetail-consumables"
class="table table-striped snipe-table"
data-search="true"
data-url="{{ route('api.consumables.index', ['manufacturer_id' => $manufacturer->id]) }}"
data-cookie-id-table="manufacturerDetail-consumables"
data-columns="{{ \App\Presenters\ConsumablePresenter::dataTableLayout() }}">
</table>
</div> <!-- /.tab-pan consumables-->
</div> <!-- /.tab-content -->

View file

@ -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="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="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="category" data-formatter="categoriesLinkObjFormatter">{{ trans('general.category') }}</th>
<th data-sortable="true" data-field="eol">{{ trans('general.eol') }}</th>

View file

@ -60,26 +60,14 @@
<table
name="modelassets"
id="table"
class="snipe-table"
id="modelDetailAssets"
class="table table-striped snipe-table"
data-toolbar="#toolbar"
data-url="{{ route('api.assets.index',['model_id'=> $model->id]) }}"
data-cookie="true"
data-click-to-select="true"
data-cookie-id-table="model-assets">
<thead>
<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>
data-cookie-id-table="modelDetailAssets"
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}">
</table>
{{ Form::close() }}
</div>

View file

@ -46,7 +46,7 @@
},
undefinedText: '',
iconsPrefix: 'fa',
search: {{ (isset($search)) ? 'true' : 'false' }},
{!! ((isset($search)) && ($search=='true')) ? 'search: "true",' : '' !!}
paginationVAlign: 'both',
sidePagination: '{{ (isset($clientSearch)) ? 'client' : 'server' }}',
sortable: true,