diff --git a/app/Http/Controllers/Api/AssetMaintenancesController.php b/app/Http/Controllers/Api/AssetMaintenancesController.php index b9f1ac864c..2bf5b290c8 100644 --- a/app/Http/Controllers/Api/AssetMaintenancesController.php +++ b/app/Http/Controllers/Api/AssetMaintenancesController.php @@ -40,10 +40,24 @@ class AssetMaintenancesController extends Controller $maintenances = $maintenances->TextSearch(e($request->input('search'))); } + if ($request->has('asset_id')) { + $maintenances->where('asset_id', '=', $request->input('asset_id')); + } + $offset = request('offset', 0); $limit = request('limit', 50); - $allowed_columns = ['id','title','asset_maintenance_time','asset_maintenance_type','cost','start_date','completion_date','notes','user_id']; + $allowed_columns = [ + 'id', + 'title', + 'asset_maintenance_time', + 'asset_maintenance_type', + 'cost', + 'start_date', + 'completion_date', + 'notes', + 'user_id' + ]; $order = Input::get('order') === 'asc' ? 'asc' : 'desc'; $sort = in_array(Input::get('sort'), $allowed_columns) ? e($request->input('sort')) : 'created_at'; diff --git a/app/Http/Controllers/Api/GroupsController.php b/app/Http/Controllers/Api/GroupsController.php index dc19f17502..6a5f194ab8 100644 --- a/app/Http/Controllers/Api/GroupsController.php +++ b/app/Http/Controllers/Api/GroupsController.php @@ -20,7 +20,7 @@ class GroupsController extends Controller public function index(Request $request) { $this->authorize('view', Group::class); - $allowed_columns = ['id','name','created_at']; + $allowed_columns = ['id','name','created_at', 'users_count']; $groups = Group::select('id','name','permissions','created_at','updated_at')->withCount('users'); diff --git a/app/Http/Controllers/Api/LocationsController.php b/app/Http/Controllers/Api/LocationsController.php index 6bc2491221..5ff8fe5cc3 100644 --- a/app/Http/Controllers/Api/LocationsController.php +++ b/app/Http/Controllers/Api/LocationsController.php @@ -24,7 +24,7 @@ class LocationsController extends Controller $allowed_columns = [ 'id','name','address','address2','city','state','country','zip','created_at', 'updated_at','parent_id', 'manager_id','image', - 'assigned_assets_count','users_count','assets_count']; + 'assigned_assets_count','users_count','assets_count','currency']; $locations = Location::with('parent', 'manager', 'childLocations')->select([ 'locations.id', diff --git a/app/Http/Controllers/Api/ReportsController.php b/app/Http/Controllers/Api/ReportsController.php index 881bc5da51..ca461398e8 100644 --- a/app/Http/Controllers/Api/ReportsController.php +++ b/app/Http/Controllers/Api/ReportsController.php @@ -42,7 +42,11 @@ class ReportsController extends Controller $allowed_columns = [ 'id', - 'created_at' + 'created_at', + 'target_id', + 'user_id', + 'action_type', + 'note' ]; $sort = in_array($request->input('sort'), $allowed_columns) ? e($request->input('sort')) : 'created_at'; diff --git a/app/Http/Controllers/AssetMaintenancesController.php b/app/Http/Controllers/AssetMaintenancesController.php index 3b9840b4fa..975399f275 100644 --- a/app/Http/Controllers/AssetMaintenancesController.php +++ b/app/Http/Controllers/AssetMaintenancesController.php @@ -63,85 +63,6 @@ class AssetMaintenancesController extends Controller } - /** - * Generates the JSON response for asset maintenances listing view. - * - * @see AssetMaintenancesController::getIndex() method that generates view - * @author Vincent Sposato - * @version v1.0 - * @since [v1.8] - * @return String JSON - */ - public function getDatatable(Request $request) - { - $maintenances = AssetMaintenance::with('asset', 'supplier', 'asset.company', 'admin'); - - if (Input::has('search')) { - $maintenances = $maintenances->TextSearch(e($request->input('search'))); - } - - $offset = request('offset', 0); - $limit = request('limit', 50); - - $allowed_columns = ['id','title','asset_maintenance_time','asset_maintenance_type','cost','start_date','completion_date','notes','user_id']; - $order = Input::get('order') === 'asc' ? 'asc' : 'desc'; - $sort = in_array(Input::get('sort'), $allowed_columns) ? e($request->input('sort')) : 'created_at'; - - switch ($sort) { - case 'user_id': - $maintenances = $maintenances->OrderAdmin($order); - break; - default: - $maintenances = $maintenances->orderBy($sort, $order); - break; - } - - $maintenancesCount = $maintenances->count(); - $maintenances = $maintenances->skip($offset)->take($limit)->get(); - - $rows = array(); - $settings = Setting::getSettings(); - - foreach ($maintenances as $maintenance) { - $actions = ''; - if (Gate::allows('update', Asset::class)) { - $actions .= Helper::generateDatatableButton('edit', route('maintenances.edit', $maintenance->id)); - $actions .= Helper::generateDatatableButton( - 'delete', - route('maintenances.destroy', $maintenance->id), - $enabled = true, - trans('admin/asset_maintenances/message.delete.confirm'), - $maintenance->title - ); - } - - if (($maintenance->cost) && (isset($maintenance->asset)) && ($maintenance->asset->location) && ($maintenance->asset->location->currency!='')) { - $maintenance_cost = $maintenance->asset->location->currency.$maintenance->cost; - } else { - $maintenance_cost = $settings->default_currency.$maintenance->cost; - } - - $rows[] = array( - 'id' => $maintenance->id, - 'asset_name' => ($maintenance->asset) ? (string)link_to_route('maintenances.show', $maintenance->asset->present()->Name(), ['maintenance' => $maintenance->asset->id]) : 'Deleted Asset' , - 'title' => $maintenance->title, - 'notes' => $maintenance->notes, - 'supplier' => ($maintenance->supplier) ? (string)link_to_route('suppliers.show', $maintenance->supplier->name, ['maintenance'=>$maintenance->supplier->id]) : 'Deleted Supplier', - 'cost' => $maintenance_cost, - 'asset_maintenance_type' => e($maintenance->asset_maintenance_type), - 'start_date' => $maintenance->start_date, - 'asset_maintenance_time' => $maintenance->asset_maintenance_time, - 'completion_date' => $maintenance->completion_date, - 'user_id' => ($maintenance->admin) ? (string)link_to_route('users.show', $maintenance->admin->present()->fullName(), ['user'=>$maintenance->admin->id]) : '', - 'actions' => $actions, - 'company' => ($maintenance->asset->company) ? $maintenance->asset->company->name : '' - ); - } - - $data = array('total' => $maintenancesCount, 'rows' => $rows); - return $data; - - } /** * Returns a form view to create a new asset maintenance. @@ -265,9 +186,7 @@ class AssetMaintenancesController extends Controller // Get Supplier List // Render the view return view('asset_maintenances/edit') - ->with('asset_list', Helper::detailedAssetList()) ->with('selectedAsset', null) - ->with('supplier_list', Helper::suppliersList()) ->with('assetMaintenanceType', $assetMaintenanceType) ->with('item', $assetMaintenance); diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index d9caa63bc8..63b1c1638e 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -316,7 +316,7 @@ class SettingsController extends Controller $setting->modellist_displays = ''; - if (($request->has('show_in_model_list')) && (count($request->has('show_in_model_list')) > 0)) + if (($request->has('show_in_model_list')) && (count($request->input('show_in_model_list')) > 0)) { $setting->modellist_displays = implode(',', $request->input('show_in_model_list')); } diff --git a/app/Http/Transformers/LocationsTransformer.php b/app/Http/Transformers/LocationsTransformer.php index 11b9186f17..5d93db4def 100644 --- a/app/Http/Transformers/LocationsTransformer.php +++ b/app/Http/Transformers/LocationsTransformer.php @@ -34,15 +34,16 @@ class LocationsTransformer 'id' => (int) $location->id, 'name' => e($location->name), 'image' => ($location->image) ? app('locations_upload_url').e($location->image) : null, - 'address' => e($location->address), - 'city' => e($location->city), - 'state' => e($location->state), - 'country' => e($location->country), - 'zip' => e($location->zip), + 'address' => ($location->address) ? e($location->address) : null, + 'address2' => ($location->address2) ? e($location->address2) : null, + 'city' => ($location->city) ? e($location->city) : null, + 'state' => ($location->state) ? e($location->state) : null, + 'country' => ($location->country) ? e($location->country) : null, + 'zip' => ($location->zip) ? e($location->zip) : null, 'assigned_assets_count' => (int) $location->assigned_assets_count, 'assets_count' => (int) $location->assets_count, 'users_count' => (int) $location->users_count, - + 'currency' => ($location->currency) ? e($location->currency) : null, 'created_at' => Helper::getFormattedDateObject($location->created_at, 'datetime'), 'updated_at' => Helper::getFormattedDateObject($location->updated_at, 'datetime'), 'parent' => ($location->parent) ? [ diff --git a/app/Presenters/LicensePresenter.php b/app/Presenters/LicensePresenter.php index 3d793c33e7..0cdff34f92 100644 --- a/app/Presenters/LicensePresenter.php +++ b/app/Presenters/LicensePresenter.php @@ -144,6 +144,59 @@ class LicensePresenter extends Presenter } + /** + * Json Column Layout for bootstrap table + * @return string + */ + public static function dataTableLayoutSeats() + { + $layout = [ + [ + "field" => "name", + "searchable" => false, + "sortable" => false, + "switchable" => true, + "title" => trans('admin/licenses/general.seat'), + "visible" => true, + ], [ + "field" => "assigned_user", + "searchable" => false, + "sortable" => false, + "switchable" => true, + "title" => trans('admin/licenses/general.user'), + "visible" => true, + "formatter" => "usersLinkObjFormatter" + ], [ + "field" => "assigned_asset", + "searchable" => false, + "sortable" => false, + "switchable" => true, + "title" => trans('admin/licenses/form.asset'), + "visible" => true, + "formatter" => "hardwareLinkObjFormatter" + ], [ + "field" => "location", + "searchable" => false, + "sortable" => false, + "switchable" => true, + "title" => trans('general.location'), + "visible" => true, + "formatter" => "locationsLinkObjFormatter" + ], [ + "field" => "checkincheckout", + "searchable" => false, + "sortable" => false, + "switchable" => true, + "title" => trans('general.checkin').'/'.trans('general.checkout'), + "visible" => true, + "formatter" => "licenseSeatInOutFormatter" + ] + ]; + + return json_encode($layout); + } + + /** * Link to this licenses Name * @return string diff --git a/app/Presenters/LocationPresenter.php b/app/Presenters/LocationPresenter.php index 6189f7b328..8d3d27f501 100644 --- a/app/Presenters/LocationPresenter.php +++ b/app/Presenters/LocationPresenter.php @@ -11,6 +11,156 @@ use App\Helpers\Helper; class LocationPresenter extends Presenter { + /** + * Json Column Layout for bootstrap table + * @return string + */ + public static function dataTableLayout() + { + $layout = [ + + [ + "field" => "id", + "searchable" => false, + "sortable" => true, + "switchable" => true, + "title" => trans('general.id'), + "visible" => false + ], + [ + "field" => "name", + "searchable" => true, + "sortable" => true, + "title" => trans('admin/locations/table.name'), + "visible" => true, + "formatter" => "locationsLinkFormatter" + ], + [ + "field" => "image", + "searchable" => false, + "sortable" => true, + "switchable" => true, + "title" => trans('general.image'), + "visible" => true, + "formatter" => "imageFormatter" + ], + [ + "field" => "parent", + "searchable" => false, + "sortable" => true, + "switchable" => true, + "title" => trans('admin/locations/table.parent'), + "visible" => true, + "formatter" => "locationsLinkObjFormatter" + ], + + [ + "field" => "assets_count", + "searchable" => false, + "sortable" => true, + "switchable" => true, + "title" => trans('admin/locations/table.assets_rtd'), + "visible" => true, + ], + [ + "field" => "assigned_assets_count", + "searchable" => false, + "sortable" => true, + "switchable" => true, + "title" => trans('admin/locations/table.assets_checkedout'), + "visible" => true, + ], + [ + "field" => "users_count", + "searchable" => false, + "sortable" => true, + "switchable" => true, + "title" => trans('general.people'), + "visible" => true, + ], + [ + "field" => "currency", + "searchable" => true, + "sortable" => true, + "switchable" => true, + "title" => trans('general.currency'), + "visible" => true, + ], + [ + "field" => "address", + "searchable" => true, + "sortable" => true, + "switchable" => true, + "title" => trans('admin/locations/table.address'), + "visible" => true, + ], + [ + "field" => "city", + "searchable" => true, + "sortable" => true, + "switchable" => true, + "title" => trans('admin/locations/table.city'), + "visible" => true, + ], + [ + "field" => "state", + "searchable" => true, + "sortable" => true, + "switchable" => true, + "title" => trans('admin/locations/table.state'), + "visible" => true, + ], + [ + "field" => "zip", + "searchable" => true, + "sortable" => true, + "switchable" => true, + "title" => trans('admin/locations/table.zip'), + "visible" => false, + ], + [ + "field" => "country", + "searchable" => true, + "sortable" => true, + "switchable" => true, + "title" => trans('admin/locations/table.country'), + "visible" => false, + ],[ + "field" => "manager", + "searchable" => false, + "sortable" => false, + "switchable" => true, + "title" => trans('admin/users/table.manager'), + "visible" => false, + "formatter" => 'usersLinkObjFormatter' + ], + + [ + "field" => "created_at", + "searchable" => true, + "sortable" => true, + "switchable" => true, + "title" => trans('general.created_at'), + "visible" => false, + 'formatter' => 'dateDisplayFormatter' + ], + + [ + "field" => "actions", + "searchable" => false, + "sortable" => false, + "switchable" => false, + "title" => trans('table.actions'), + "visible" => true, + "formatter" => "locationsActionsFormatter", + ] + ]; + + return json_encode($layout); + } + + + /** * Link to this locations name * @return string diff --git a/public/css/build/all.css b/public/css/build/all.css index a99d85233d..eeea15c3a4 100644 Binary files a/public/css/build/all.css and b/public/css/build/all.css differ diff --git a/public/css/dist/all.css b/public/css/dist/all.css index a99d85233d..eeea15c3a4 100644 Binary files a/public/css/dist/all.css and b/public/css/dist/all.css differ diff --git a/public/css/overrides.css b/public/css/overrides.css index 15a7cc60ce..50197fbc97 100644 Binary files a/public/css/overrides.css and b/public/css/overrides.css differ diff --git a/public/js/extensions/cookie/bootstrap-table-cookie.js b/public/js/extensions/cookie/bootstrap-table-cookie.js index c3a746a4b7..1cc5c56070 100755 Binary files a/public/js/extensions/cookie/bootstrap-table-cookie.js and b/public/js/extensions/cookie/bootstrap-table-cookie.js differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 4b5cbd4304..90225c7884 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -2,13 +2,13 @@ "/js/build/vue.js": "/js/build/vue.js?id=25049a0c0eb736e1c883", "/css/AdminLTE.css": "/css/AdminLTE.css?id=b8be19a285eaf44eec37", "/css/app.css": "/css/app.css?id=407edb63cc6b6dc62405", - "/css/overrides.css": "/css/overrides.css?id=1bdafb06a8609780f546", + "/css/overrides.css": "/css/overrides.css?id=33d8f8fea649acea5f9c", "/js/build/vue.js.map": "/js/build/vue.js.map?id=6b79d08f1decca72957c", "/css/AdminLTE.css.map": "/css/AdminLTE.css.map?id=99f5a5a03c4155cf69f6", "/css/app.css.map": "/css/app.css.map?id=bdbe05e6ecd70ccfac72", "/css/overrides.css.map": "/css/overrides.css.map?id=898c91d4a425b01b589b", - "/css/dist/all.css": "/css/dist/all.css?id=3a8aa974e7b09b52b18c", + "/css/dist/all.css": "/css/dist/all.css?id=dc1449877e0f8abedc47", "/js/dist/all.js": "/js/dist/all.js?id=4e5e7295e9a59e718567", - "/css/build/all.css": "/css/build/all.css?id=3a8aa974e7b09b52b18c", + "/css/build/all.css": "/css/build/all.css?id=dc1449877e0f8abedc47", "/js/build/all.js": "/js/build/all.js?id=4e5e7295e9a59e718567" } \ No newline at end of file diff --git a/resources/assets/less/overrides.less b/resources/assets/less/overrides.less index 710144f998..7a7a2aa23b 100644 --- a/resources/assets/less/overrides.less +++ b/resources/assets/less/overrides.less @@ -326,3 +326,7 @@ img.navbar-brand-img, .navbar-brand>img { [hidden] { display: none !important; } + +#toolbar { + margin-top: 10px; +} diff --git a/resources/views/accessories/index.blade.php b/resources/views/accessories/index.blade.php index c8d6cee05a..80259a13bc 100755 --- a/resources/views/accessories/index.blade.php +++ b/resources/views/accessories/index.blade.php @@ -21,14 +21,25 @@
- + +
@@ -39,10 +50,5 @@ @stop @section('moar_scripts') -@include ('partials.bootstrap-table', [ - 'search' => true, - 'showFooter' => true, - 'columns' => \App\Presenters\AccessoryPresenter::dataTableLayout(), - 'exportFile' => 'accessories-export', - ]) +@include ('partials.bootstrap-table') @stop diff --git a/resources/views/accessories/view.blade.php b/resources/views/accessories/view.blade.php index 974c8ae1c1..646a7f4483 100644 --- a/resources/views/accessories/view.blade.php +++ b/resources/views/accessories/view.blade.php @@ -53,21 +53,32 @@
- - - - - - - -
{{ trans('general.user') }}{{ trans('table.actions') }}
+ + + + + + + + + +
{{ trans('general.user') }}{{ trans('table.actions') }}
@@ -90,9 +101,5 @@ @stop @section('moar_scripts') -@include ('partials.bootstrap-table', [ - 'exportFile' => 'accessory' . - $accessory->name . '-export', - 'search' => 'false' - ]) +@include ('partials.bootstrap-table') @stop diff --git a/resources/views/account/view-assets.blade.php b/resources/views/account/view-assets.blade.php index 3967201856..53c28678fc 100755 --- a/resources/views/account/view-assets.blade.php +++ b/resources/views/account/view-assets.blade.php @@ -23,18 +23,35 @@ View Assets for {{ $user->present()->fullName() }}
- @if (count($user->assets) > 0)
- + +
- - - - - - - - + + + + + + + + + @foreach ($user->assets as $asset) @@ -61,15 +78,6 @@ View Assets for {{ $user->present()->fullName() }}
{{ trans('general.category') }}{{ trans('admin/hardware/table.asset_tag') }}{{ trans('general.name') }}{{ trans('admin/hardware/table.asset_model') }}{{ trans('admin/hardware/table.serial') }}
{{ trans('general.category') }}{{ trans('admin/hardware/table.asset_tag') }}{{ trans('general.name') }}{{ trans('admin/hardware/table.asset_model') }}{{ trans('admin/hardware/table.serial') }}{{ trans('general.image') }}
- @else - -
-
- - {{ trans('general.no_results') }} -
-
- @endif
@@ -88,9 +96,24 @@ View Assets for {{ $user->present()->fullName() }}
- @if (count($user->licenses) > 0) +
- +
@@ -113,14 +136,6 @@ View Assets for {{ $user->present()->fullName() }}
{{ trans('general.name') }}
- @else -
-
- - {{ trans('general.no_results') }} -
-
- @endif
@@ -139,9 +154,23 @@ View Assets for {{ $user->present()->fullName() }}
- @if (count($user->consumables) > 0)
- +
@@ -156,14 +185,7 @@ View Assets for {{ $user->present()->fullName() }}
{{ trans('general.name') }}
- @else -
-
- - {{ trans('general.no_results') }} -
-
- @endif +
@@ -184,9 +206,24 @@ View Assets for {{ $user->present()->fullName() }}
- @if (count($user->accessories) > 0) +
- +
@@ -201,14 +238,7 @@ View Assets for {{ $user->present()->fullName() }}
Name
- @else -
-
- - {{ trans('general.no_results') }} -
-
- @endif +
@@ -226,37 +256,36 @@ View Assets for {{ $user->present()->fullName() }} @endif
- @if (count($userlog) > 0)
+ data-cookie-id-table="userActivityReport" + data-pagination="true" + data-id-table="userActivityReport" + data-search="true" + data-side-pagination="server" + data-show-columns="true" + data-show-export="true" + data-show-refresh="true" + data-sort-order="asc" + id="userActivityReport" + class="table table-striped snipe-table" + data-url="{{route('api.activity.index', ['target_id' => $user->id, 'target_type' => 'User', 'order' => 'desc']) }}" + data-export-options='{ + "fileName": "my-history-{{ date('Y-m-d') }}", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }'> - - - - - + + + + + - -
{{ trans('general.date') }}{{ trans('general.admin') }}{{ trans('general.action') }}{{ trans('general.item') }}{{ trans('general.date') }}{{ trans('general.admin') }}{{ trans('general.action') }}{{ trans('general.item') }}
- @else -
-
- - {{ trans('general.no_results') }} -
-
- @endif
diff --git a/resources/views/asset_maintenances/index.blade.php b/resources/views/asset_maintenances/index.blade.php index 966aced35d..2b926cef58 100644 --- a/resources/views/asset_maintenances/index.blade.php +++ b/resources/views/asset_maintenances/index.blade.php @@ -20,29 +20,38 @@
- + +
+ - - - - - - - - - - - - + + + + + + + + + + + + @can('update', \App\Models\Asset::class) @endcan diff --git a/resources/views/categories/index.blade.php b/resources/views/categories/index.blade.php index 9302cf172f..08f995f65b 100755 --- a/resources/views/categories/index.blade.php +++ b/resources/views/categories/index.blade.php @@ -20,15 +20,26 @@
-
{{ trans('admin/companies/table.title') }}{{ trans('general.id') }}{{ trans('admin/asset_maintenances/table.asset_name') }}{{ trans('general.supplier') }}{{ trans('admin/asset_maintenances/form.asset_maintenance_type') }}{{ trans('admin/asset_maintenances/form.title') }}{{ trans('admin/asset_maintenances/form.start_date') }}{{ trans('admin/asset_maintenances/form.completion_date') }}{{ trans('admin/asset_maintenances/form.asset_maintenance_time') }}{{ trans('admin/asset_maintenances/form.cost') }}{{ trans('general.admin') }}{{ trans('admin/asset_maintenances/form.notes') }}{{ trans('general.id') }}{{ trans('admin/companies/table.title') }}{{ trans('admin/asset_maintenances/table.asset_name') }}{{ trans('general.supplier') }}{{ trans('admin/asset_maintenances/form.asset_maintenance_type') }}{{ trans('admin/asset_maintenances/form.title') }}{{ trans('admin/asset_maintenances/form.start_date') }}{{ trans('admin/asset_maintenances/form.completion_date') }}{{ trans('admin/asset_maintenances/form.asset_maintenance_time') }}{{ trans('admin/asset_maintenances/form.cost') }}{{ trans('general.admin') }}{{ trans('admin/asset_maintenances/form.notes') }}{{ trans('table.actions') }}
+
diff --git a/resources/views/categories/view.blade.php b/resources/views/categories/view.blade.php index 9763b0ab8e..0316266150 100644 --- a/resources/views/categories/view.blade.php +++ b/resources/views/categories/view.blade.php @@ -28,14 +28,59 @@
+ + + @if ($category->category_type=='asset') + + data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}" + data-cookie-id-table="categoryAssetsTable" + id="categoryAssetsTable" + data-id-table="categoryAssetsTable" + data-export-options='{ + "fileName": "export-{{ str_slug($category->name) }}-assets-{{ date('Y-m-d') }}", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }' + @elseif ($category->category_type=='accessory') + data-columns="{{ \App\Presenters\AccessoryPresenter::dataTableLayout() }}" + data-cookie-id-table="categoryAccessoryTable" + id="categoryAccessoryTable" + data-id-table="categoryAccessoryTable" + data-export-options='{ + "fileName": "export-{{ str_slug($category->name) }}-accessories-{{ date('Y-m-d') }}", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }' + @elseif ($category->category_type=='consumable') + data-columns="{{ \App\Presenters\ConsumablePresenter::dataTableLayout() }}" + data-cookie-id-table="categoryConsumableTable" + id="categoryConsumableTable" + data-id-table="categoryConsumableTable" + data-export-options='{ + "fileName": "export-{{ str_slug($category->name) }}-consumables-{{ date('Y-m-d') }}", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }' + @elseif ($category->category_type=='component') + data-columns="{{ \App\Presenters\ComponentPresenter::dataTableLayout() }}" + data-cookie-id-table="categoryCompomnentTable" + id="categoryCompomnentTable" + data-id-table="categoryCompomnentTable" + data-export-options='{ + "fileName": "export-{{ str_slug($category->name) }}-components-{{ date('Y-m-d') }}", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }' + @endif + + data-pagination="true" + data-search="true" + data-show-footer="true" + data-side-pagination="server" + data-show-columns="true" + data-show-export="true" + data-show-refresh="true" + data-sort-order="asc" + class="table table-striped snipe-table" + data-url="{{ route('api.'.$category_type_route.'.index',['category_id'=> $category->id]) }}"> +
@@ -45,32 +90,5 @@ @stop @section('moar_scripts') - - @if ($category->category_type=='asset') - @include ('partials.bootstrap-table', - [ - 'exportFile' => 'category-' . $category->name . '-export', - 'search' => true, - 'columns' => \App\Presenters\AssetPresenter::dataTableLayout()]) - @elseif ($category->category_type=='accessory') - @include ('partials.bootstrap-table', - [ - 'exportFile' => 'category-' . $category->name . '-export', - 'search' => true, - 'columns' => \App\Presenters\AccessoryPresenter::dataTableLayout()]) - @elseif ($category->category_type=='consumable') - @include ('partials.bootstrap-table', - [ - 'exportFile' => 'category-' . $category->name . '-export', - 'search' => true, - 'columns' => \App\Presenters\ConsumablePresenter::dataTableLayout()]) - @elseif ($category->category_type=='component') - @include ('partials.bootstrap-table', - [ - 'exportFile' => 'category-' . $category->name . '-export', - 'search' => true, - 'columns' => \App\Presenters\ComponentPresenter::dataTableLayout()]) - @endif - - +@include ('partials.bootstrap-table') @stop diff --git a/resources/views/companies/index.blade.php b/resources/views/companies/index.blade.php index 37f0653f3e..dbe6caa5ab 100644 --- a/resources/views/companies/index.blade.php +++ b/resources/views/companies/index.blade.php @@ -17,14 +17,26 @@
+ + data-columns="{{ \App\Presenters\CompanyPresenter::dataTableLayout() }}" + data-cookie-id-table="companiesTable" + data-pagination="true" + data-id-table="companiesTable" + data-search="true" + data-side-pagination="server" + data-show-columns="true" + data-show-export="true" + data-show-refresh="true" + data-sort-order="asc" + id="companiesTable" + class="table table-striped snipe-table" + data-url="{{ route('api.companies.index') }}" + data-export-options='{ + "fileName": "export-companies-{{ date('Y-m-d') }}", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }'> +
@@ -41,10 +53,5 @@ @stop @section('moar_scripts') - @include ('partials.bootstrap-table', [ - 'exportFile' => 'companies-export', - 'search' => true, - 'columns' => \App\Presenters\CompanyPresenter::dataTableLayout() - ]) - + @include ('partials.bootstrap-table') @stop diff --git a/resources/views/companies/view.blade.php b/resources/views/companies/view.blade.php index 81ddec6965..b9d2545ef2 100644 --- a/resources/views/companies/view.blade.php +++ b/resources/views/companies/view.blade.php @@ -75,95 +75,153 @@
- + data-export-options='{ + "fileName": "export-companies-{{ str_slug($company->name) }}-assets-{{ date('Y-m-d') }}", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }'>
+ + data-export-options='{ + "fileName": "export-companies-{{ str_slug($company->name) }}-licenses-{{ date('Y-m-d') }}", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }'>
+
+ - + data-export-options='{ + "fileName": "export-companies-{{ str_slug($company->name) }}-accessories-{{ date('Y-m-d') }}", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }'>
+
+ + data-export-options='{ + "fileName": "export-companies-{{ str_slug($company->name) }}-consumables-{{ date('Y-m-d') }}", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }'>
+
+ + data-export-options='{ + "fileName": "export-companies-{{ str_slug($company->name) }}-components-{{ date('Y-m-d') }}", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }'> +
+ + data-export-options='{ + "fileName": "export-companies-{{ str_slug($company->name) }}-users-{{ date('Y-m-d') }}", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }'> +
diff --git a/resources/views/components/index.blade.php b/resources/views/components/index.blade.php index c49599d018..69dbe40dcf 100644 --- a/resources/views/components/index.blade.php +++ b/resources/views/components/index.blade.php @@ -23,8 +23,28 @@ 'route' => ['component/bulk-form'], 'class' => 'form-inline' ]) }} -
-
+ + +
+
+ data-cookie-id-table="componentsCheckedoutTable" + data-pagination="true" + data-id-table="componentsCheckedoutTable" + data-search="true" + data-side-pagination="server" + data-show-columns="true" + data-show-export="true" + data-show-footer="true" + data-show-refresh="true" + data-sort-order="asc" + data-sort-name="name" + id="componentsCheckedoutTable" + class="table table-striped snipe-table" + data-url="{{ route('api.components.assets', $component->id)}}" + data-export-options='{ + "fileName": "export-components-{{ str_slug($component->name) }}-checkedout-{{ date('Y-m-d') }}", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }'> - - - - - - + + + + + +
{{ trans('general.asset') }}{{ trans('general.qty') }}{{ trans('general.date') }}{{ trans('general.checkin') }}/{{ trans('general.checkout') }}
{{ trans('general.asset') }}{{ trans('general.qty') }}{{ trans('general.date') }}{{ trans('general.checkin') }}/{{ trans('general.checkout') }}
+
diff --git a/resources/views/consumables/index.blade.php b/resources/views/consumables/index.blade.php index feeb2367e3..2605ae135a 100644 --- a/resources/views/consumables/index.blade.php +++ b/resources/views/consumables/index.blade.php @@ -21,17 +21,28 @@
- - - + data-columns="{{ \App\Presenters\ConsumablePresenter::dataTableLayout() }}" + data-cookie-id-table="consumablesTable" + data-pagination="true" + data-id-table="consumablesTable" + data-search="true" + data-side-pagination="server" + data-show-columns="true" + data-show-export="true" + data-show-footer="true" + data-show-refresh="true" + data-sort-order="asc" + data-sort-name="name" + data-toolbar="#toolbar" + id="consumablesTable" + class="table table-striped snipe-table" + data-url="{{ route('api.consumables.index') }}" + data-export-options='{ + "fileName": "export-consumables-{{ date('Y-m-d') }}", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }'>
+
diff --git a/resources/views/consumables/view.blade.php b/resources/views/consumables/view.blade.php index 5632a01264..8e24a67a58 100644 --- a/resources/views/consumables/view.blade.php +++ b/resources/views/consumables/view.blade.php @@ -31,14 +31,26 @@
+ + data-cookie-id-table="consumablesCheckedoutTable" + data-pagination="true" + data-id-table="consumablesCheckedoutTable" + data-search="true" + data-side-pagination="server" + data-show-columns="true" + data-show-export="true" + data-show-footer="true" + data-show-refresh="true" + data-sort-order="asc" + data-sort-name="name" + id="consumablesCheckedoutTable" + class="table table-striped snipe-table" + data-url="{{route('api.consumables.showUsers', $consumable->id)}}" + data-export-options='{ + "fileName": "export-consumables-{{ str_slug($consumable->name) }}-checkedout-{{ date('Y-m-d') }}", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }'> diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index e2c9f0d3d8..ad870af9bd 100755 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -163,25 +163,29 @@
-
{{ trans('general.user') }}
- - - - - - - - - - -
{{ trans('general.date') }}{{ trans('general.admin') }}{{ trans('general.action') }}{{ trans('general.item') }}{{ trans('general.target') }}
+ + + + + + + + + + + + +
{{ trans('general.date') }}{{ trans('general.admin') }}{{ trans('general.action') }}{{ trans('general.item') }}{{ trans('general.target') }}
+ +
@@ -232,19 +236,23 @@
+ - - - - - - + + + + + +
{{ trans('general.name') }}{{ trans('general.type') }}{{ trans('general.name') }}{{ trans('general.type') }}
diff --git a/resources/views/departments/index.blade.php b/resources/views/departments/index.blade.php index bc5c0fb57c..df7d313403 100644 --- a/resources/views/departments/index.blade.php +++ b/resources/views/departments/index.blade.php @@ -17,14 +17,24 @@
+ + data-export-options='{ + "fileName": "export-departments-{{ date('Y-m-d') }}", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }'> @@ -48,6 +58,6 @@ @stop @section('moar_scripts') - @include ('partials.bootstrap-table', ['exportFile' => 'locations-export', 'search' => true]) + @include ('partials.bootstrap-table') @stop diff --git a/resources/views/departments/view.blade.php b/resources/views/departments/view.blade.php index 1fdcc0840e..9848f9e4c8 100644 --- a/resources/views/departments/view.blade.php +++ b/resources/views/departments/view.blade.php @@ -22,15 +22,27 @@
+
{{ trans('general.id') }}
- + data-export-options='{ + "fileName": "export-departments-{{ str_slug($department->name) }}-{{ date('Y-m-d') }}", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }'> +
diff --git a/resources/views/depreciations/index.blade.php b/resources/views/depreciations/index.blade.php index 991fec39b7..22d985c4ca 100755 --- a/resources/views/depreciations/index.blade.php +++ b/resources/views/depreciations/index.blade.php @@ -20,13 +20,25 @@ Asset Depreciations
+ + data-cookie-id-table="depreciationsTable" + data-pagination="true" + data-id-table="depreciationsTable" + data-search="true" + data-side-pagination="server" + data-show-columns="true" + data-show-export="true" + data-show-refresh="true" + data-sort-order="asc" + id="depreciationsTable" + class="table table-striped snipe-table" + data-url="{{ route('api.depreciations.index') }}" + data-export-options='{ + "fileName": "export-depreciations-{{ date('Y-m-d') }}", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }'> + diff --git a/resources/views/groups/index.blade.php b/resources/views/groups/index.blade.php index ba29db4a63..e62baa03b7 100755 --- a/resources/views/groups/index.blade.php +++ b/resources/views/groups/index.blade.php @@ -19,20 +19,30 @@
-
{{ trans('general.id') }}
+ +
+ - + diff --git a/resources/views/groups/view.blade.php b/resources/views/groups/view.blade.php index 69d9129aaf..6a4053bc24 100644 --- a/resources/views/groups/view.blade.php +++ b/resources/views/groups/view.blade.php @@ -23,16 +23,23 @@
-
{{ trans('general.id') }} {{ trans('admin/groups/table.name') }}{{ trans('admin/groups/table.users') }}{{ trans('admin/groups/table.users') }} {{ trans('general.created_at') }} {{ trans('table.actions') }}
- +
@@ -59,10 +66,5 @@ @stop @section('moar_scripts') - @include ('partials.bootstrap-table', [ - 'exportFile' => 'groups-export', - 'search' => true, - 'columns' => \App\Presenters\UserPresenter::dataTableLayout() - ]) - + @include ('partials.bootstrap-table') @stop diff --git a/resources/views/hardware/index.blade.php b/resources/views/hardware/index.blade.php index e54c45974c..2e9ed224d9 100755 --- a/resources/views/hardware/index.blade.php +++ b/resources/views/hardware/index.blade.php @@ -73,25 +73,34 @@ @endif + data-advanced-search="true" + data-click-to-select="true" + data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}" + data-cookie-id-table="assetsListingTable" + data-pagination="true" + data-id-table="assetsListingTable" + data-search="true" + data-side-pagination="server" + data-show-columns="true" + data-show-export="true" + data-show-footer="true" + data-show-refresh="true" + data-sort-order="asc" + data-sort-name="name" + data-toolbar="#toolbar" + id="assetsListingTable" + class="table table-striped snipe-table" + data-url="{{ route('api.assets.index', + array('status' => e(Input::get('status')), + 'order_number'=>e(Input::get('order_number')), + 'company_id'=>e(Input::get('company_id')), + 'status_id'=>e(Input::get('status_id')))) }}" + data-export-options='{ + "fileName": "export{{ (Input::has('status')) ? '-'.str_slug(Input::get('status')) : '' }}-assets-{{ date('Y-m-d') }}", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }'>
+
{{ Form::close() }} @@ -102,11 +111,6 @@ @stop @section('moar_scripts') -@include ('partials.bootstrap-table', [ - 'exportFile' => 'assets-export', - 'search' => true, - 'showFooter' => true, - 'columns' => \App\Presenters\AssetPresenter::dataTableLayout() -]) +@include('partials.bootstrap-table') @stop diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 844a689772..1e4120b464 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -31,6 +31,7 @@ {{-- Page content --}} @section('content') +
@if ($asset->deleted_at!='') @@ -589,7 +590,7 @@ 'class' => 'form-inline', 'id' => 'bulkForm']) }}
- @@ -599,20 +600,24 @@
+ -
+ + {{ Form::close() }}
@@ -624,78 +629,46 @@
@can('update', \App\Models\Asset::class) -
{{ trans('general.asset_maintenances') }} - [ {{ trans('button.add') }} ] -
+ @endcan - @if (count($asset->assetmaintenances) > 0) - +
- - - - - - + + + + + + - - - + + @can('update', \App\Models\Asset::class) - + @endcan - - - - @foreach ($asset->assetmaintenances as $assetMaintenance) - @if (is_null($assetMaintenance->deleted_at)) - - - - - - - - - - - cost; ?> - @can('update', \App\Models\Asset::class) - - @endcan - - @endif - @endforeach - - - - - -
{{ trans('general.supplier') }}{{ trans('admin/asset_maintenances/form.title') }}{{ trans('admin/asset_maintenances/form.asset_maintenance_type') }}{{ trans('admin/asset_maintenances/form.start_date') }}{{ trans('admin/asset_maintenances/form.completion_date') }}{{ trans('admin/asset_maintenances/form.notes') }}{{ trans('general.supplier') }}{{ trans('admin/asset_maintenances/form.title') }}{{ trans('admin/asset_maintenances/form.asset_maintenance_type') }}{{ trans('admin/asset_maintenances/form.start_date') }}{{ trans('admin/asset_maintenances/form.completion_date') }}{{ trans('admin/asset_maintenances/form.notes') }} {{ trans('admin/asset_maintenances/table.is_warranty') }}{{ trans('admin/asset_maintenances/form.cost') }}{{ trans('general.admin') }}{{ trans('admin/asset_maintenances/form.cost') }}{{ trans('general.admin') }}{{ trans('table.actions') }}{{ trans('table.actions') }}
- @if ($assetMaintenance->supplier) - {{ $assetMaintenance->supplier->name }} - @else - (deleted supplier) - @endif - {{ $assetMaintenance->title }}{{ $assetMaintenance->asset_maintenance_type }}{{ $assetMaintenance->start_date }}{{ $assetMaintenance->completion_date }}{{ $assetMaintenance->notes }}{{ $assetMaintenance->is_warranty ? trans('admin/asset_maintenances/message.warranty') : trans('admin/asset_maintenances/message.not_warranty') }}{{ $use_currency.$assetMaintenance->cost }} - @if ($assetMaintenance->admin) - {{ $assetMaintenance->admin->present()->fullName() }} - @endif - - -
{{ is_numeric($totalCost) ? $use_currency.number_format($totalCost, 2) : $totalCost }}
- @else -
- - {{ trans('general.no_results') }} -
- @endif
@@ -705,18 +678,24 @@
+ data-show-export="true" + data-export-options='{ + "fileName": "export{{ (Input::has('status')) ? '-'.str_slug(Input::get('status')) : '' }}-assets", + "ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"] + }' + + data-url="{{ route('api.activity.index', ['item_id' => $asset->id, 'item_type' => 'asset']) }}" + data-cookie-id-table="assetHistory"> + + diff --git a/resources/views/licenses/index.blade.php b/resources/views/licenses/index.blade.php index 28b61d15ac..500453f762 100755 --- a/resources/views/licenses/index.blade.php +++ b/resources/views/licenses/index.blade.php @@ -23,16 +23,28 @@
-
-
+ + +
+