Create asset maintenance - Added orange bar for required asset to edit view (#5520)

* Added orange bar for required asset to edit view

* disable redirection to asset maintenances view

* Update - disable redirection to asset maintenances view
This commit is contained in:
lea-mink 2018-05-17 04:23:23 +02:00 committed by snipe
parent fa89f45cb8
commit 233fb23cb8
2 changed files with 2 additions and 2 deletions

View file

@ -113,7 +113,7 @@ class AssetMaintenancesController extends Controller
$assetMaintenance->notes = e($request->input('notes'));
$asset = Asset::find(e($request->input('asset_id')));
if (!Company::isCurrentUserHasAccess($asset)) {
if ((!Company::isCurrentUserHasAccess($asset)) && ($asset!=null)) {
return static::getInsufficientPermissionsRedirect();
}

View file

@ -41,7 +41,7 @@
</div><!-- /.box-header -->
<div class="box-body">
@include ('partials.forms.edit.asset-select', ['translated_name' => trans('admin/asset_maintenances/table.asset_name'), 'fieldname' => 'asset_id'])
@include ('partials.forms.edit.asset-select', ['translated_name' => trans('admin/asset_maintenances/table.asset_name'), 'fieldname' => 'asset_id', 'required' => 'true'])
@include ('partials.forms.edit.supplier-select', ['translated_name' => trans('general.supplier'), 'fieldname' => 'supplier_id', 'required' => 'true'])
@include ('partials.forms.edit.maintenance_type')