diff --git a/app/Presenters/AssetMaintenancesPresenter.php b/app/Presenters/AssetMaintenancesPresenter.php new file mode 100644 index 0000000000..b3156fb57a --- /dev/null +++ b/app/Presenters/AssetMaintenancesPresenter.php @@ -0,0 +1,119 @@ + "id", + "searchable" => false, + "sortable" => true, + "switchable" => true, + "title" => trans('general.id'), + "visible" => false + ],[ + "field" => "company", + "searchable" => true, + "sortable" => true, + "switchable" => true, + "title" => trans('admin/companies/table.title'), + "visible" => false, + "formatter" => "companiesLinkObjFormatter" + ], [ + "field" => "asset_name", + "searchable" => true, + "sortable" => true, + "title" => trans('admin/asset_maintenances/table.asset_name'), + "formatter" => "assetNameLinkFormatter" + ],[ + "field" => "asset_tag", + "searchable" => true, + "sortable" => true, + "title" => trans('admin/hardware/table.asset_tag'), + "formatter" => "assetTagLinkFormatter" + ], [ + "field" => "supplier", + "searchable" => true, + "sortable" => true, + "switchable" => true, + "title" => trans('general.supplier'), + "visible" => false, + "formatter" => "suppliersLinkObjFormatter" + ], [ + "field" => "location", + "searchable" => true, + "sortable" => true, + "title" => trans('general.location'), + "formatter" => "locationsLinkObjFormatter", + ], [ + "field" => "asset_maintenance_type", + "searchable" => true, + "sortable" => true, + "title" => trans('admin/asset_maintenances/form.asset_maintenance_type'), + ], [ + "field" => "created_at", + "searchable" => true, + "sortable" => true, + "title" => trans('admin/asset_maintenances/form.start_date'), + "formatter" => "dateDisplayFormatter" + ], [ + "field" => "completion_date", + "searchable" => true, + "sortable" => true, + "title" => trans('admin/asset_maintenances/form.completion_date'), + "formatter" => "dateDisplayFormatter" + ], [ + "field" => "notes", + "searchable" => true, + "sortable" => true, + "title" => trans('admin/asset_maintenances/form.notes') + ],[ + "field" => "is_warranty", + "searchable" => true, + "sortable" => true, + "title" => trans('admin/asset_maintenances/table.is_warranty') + ], [ + "field" => "cost", + "searchable" => true, + "sortable" => true, + "title" => trans('admin/asset_maintenances/form.cost') + ], [ + "field" => "user_id", + "searchable" => true, + "sortable" => true, + "title" => trans('general.admin'), + "formatter" => "usersLinkObjFormatter" + ], [ + "field" => "actions", + "searchable" => false, + "sortable" => false, + "switchable" => false, + "title" => trans('table.actions'), + "visible" => true, + "formatter" => "maintenancesActionsFormatter", + ] + ]; + + return json_encode($layout); + } +} diff --git a/resources/views/asset_maintenances/index.blade.php b/resources/views/asset_maintenances/index.blade.php index 21aa938643..a0361533d9 100644 --- a/resources/views/asset_maintenances/index.blade.php +++ b/resources/views/asset_maintenances/index.blade.php @@ -22,6 +22,7 @@
- - - - - - - - - - - - - - - - - @can('update', \App\Models\Asset::class) - - @endcan - -
{{ trans('general.id') }}{{ trans('admin/companies/table.title') }}{{ trans('admin/asset_maintenances/table.asset_name') }}{{ trans('admin/hardware/table.asset_tag') }}{{ trans('admin/hardware/table.location') }}{{ 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/hardware/view.blade.php b/resources/views/hardware/view.blade.php index fe45e76ae6..82f2376b73 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -672,6 +672,7 @@ - - - - - - - - - - - - @can('update', \App\Models\Asset::class) - - @endcan - -
{{ 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('table.actions') }}