diff --git a/app/Http/Controllers/AssetsController.php b/app/Http/Controllers/AssetsController.php index 4e020e52e0..ffbe5ad408 100755 --- a/app/Http/Controllers/AssetsController.php +++ b/app/Http/Controllers/AssetsController.php @@ -1081,70 +1081,73 @@ class AssetsController extends Controller * @internal param array $assets * @since [v2.0] */ - public function postBulkSave() + public function postBulkSave(Request $request) { $this->authorize('update', Asset::class); - if (Input::has('ids')) { - $assets = Input::get('ids'); - if ((Input::has('purchase_date')) - || (Input::has('purchase_cost')) - || (Input::has('supplier_id')) - || (Input::has('order_number')) - || (Input::has('warranty_months')) - || (Input::has('rtd_location_id')) - || (Input::has('requestable')) - || (Input::has('company_id')) - || (Input::has('status_id')) - || (Input::has('model_id')) + + \Log::debug($request->input('ids')); + + if (($request->has('ids')) && (count($request->input('ids') > 0))) { + $assets = $request->input('ids'); + if (($request->has('purchase_date')) + || ($request->has('purchase_cost')) + || ($request->has('supplier_id')) + || ($request->has('order_number')) + || ($request->has('warranty_months')) + || ($request->has('rtd_location_id')) + || ($request->has('requestable')) + || ($request->has('company_id')) + || ($request->has('status_id')) + || ($request->has('model_id')) ) { foreach ($assets as $key => $value) { $update_array = array(); - if (Input::has('purchase_date')) { - $update_array['purchase_date'] = e(Input::get('purchase_date')); + if ($request->has('purchase_date')) { + $update_array['purchase_date'] = $request->input('purchase_date'); } - if (Input::has('purchase_cost')) { - $update_array['purchase_cost'] = Helper::ParseFloat(e(Input::get('purchase_cost'))); + if ($request->has('purchase_cost')) { + $update_array['purchase_cost'] = Helper::ParseFloat($request->input('purchase_cost')); } - if (Input::has('supplier_id')) { - $update_array['supplier_id'] = e(Input::get('supplier_id')); + if ($request->has('supplier_id')) { + $update_array['supplier_id'] = $request->input('supplier_id'); } - if (Input::has('model_id')) { - $update_array['model_id'] = e(Input::get('model_id')); + if ($request->has('model_id')) { + $update_array['model_id'] = $request->input('model_id'); } - if (Input::has('company_id')) { - if (Input::get('company_id')=="clear") { + if ($request->has('company_id')) { + if ($request->input('company_id')=="clear") { $update_array['company_id'] = null; } else { - $update_array['company_id'] = e(Input::get('company_id')); + $update_array['company_id'] = $request->input('company_id'); } } - if (Input::has('order_number')) { - $update_array['order_number'] = e(Input::get('order_number')); + if ($request->has('order_number')) { + $update_array['order_number'] = $request->input('order_number'); } - if (Input::has('warranty_months')) { - $update_array['warranty_months'] = e(Input::get('warranty_months')); + if ($request->has('warranty_months')) { + $update_array['warranty_months'] = $request->input('warranty_months'); } - if (Input::has('rtd_location_id')) { - $update_array['rtd_location_id'] = e(Input::get('rtd_location_id')); + if ($request->has('rtd_location_id')) { + $update_array['rtd_location_id'] = $request->input('rtd_location_id'); } - if (Input::has('status_id')) { - $update_array['status_id'] = e(Input::get('status_id')); + if ($request->has('status_id')) { + $update_array['status_id'] = $request->input('status_id'); } - if (Input::has('requestable')) { - $update_array['requestable'] = e(Input::get('requestable')); + if ($request->has('requestable')) { + $update_array['requestable'] = $request->input('requestable'); } DB::table('assets') ->where('id', $key) ->update($update_array); } // endforeach - return redirect()->to("hardware")->with('success', trans('admin/hardware/message.update.success')); + return redirect()->route("hardware.index")->with('success', trans('admin/hardware/message.update.success')); // no values given, nothing to update } - return redirect()->to("hardware")->with('info', trans('admin/hardware/message.update.nothing_updated')); + return redirect()->route("hardware.index")->with('warning', trans('admin/hardware/message.update.nothing_updated')); } // endif - return redirect()->to("hardware"); + return redirect()->route("hardware.index")->with('warning', trans('No assets selected, so nothing was updated.')); } /** diff --git a/app/Models/CustomField.php b/app/Models/CustomField.php index 350b1e8408..5906fed929 100644 --- a/app/Models/CustomField.php +++ b/app/Models/CustomField.php @@ -160,7 +160,6 @@ class CustomField extends Model public function getFormatAttribute($value) { foreach (self::$PredefinedFormats as $name => $pattern) { - \Log::debug($name.'=>'.$pattern); if ($pattern === $value) { return $name; } diff --git a/app/Presenters/LocationPresenter.php b/app/Presenters/LocationPresenter.php index 8325382fc4..6189f7b328 100644 --- a/app/Presenters/LocationPresenter.php +++ b/app/Presenters/LocationPresenter.php @@ -40,7 +40,7 @@ class LocationPresenter extends Presenter public function glyph() { - return ''; + return ''; } public function fullName() { diff --git a/app/Presenters/UserPresenter.php b/app/Presenters/UserPresenter.php index 1515a76f6b..3cee47cf29 100644 --- a/app/Presenters/UserPresenter.php +++ b/app/Presenters/UserPresenter.php @@ -352,6 +352,6 @@ class UserPresenter extends Presenter public function glyph() { - return ''; + return ''; } } diff --git a/config/version.php b/config/version.php index e8eedfb822..ddf07087f0 100644 --- a/config/version.php +++ b/config/version.php @@ -1,10 +1,10 @@ 'v4.1.6-pre', - 'full_app_version' => 'v4.1.6-pre - build 2963-g83c8449', + 'app_version' => 'v4.1.6', + 'full_app_version' => 'v4.1.6 - build 2963-g83c8449', 'build_version' => '2963', 'prerelease_version' => '', 'hash_version' => 'g83c8449', - 'full_hash' => 'v4.1.5-57-g83c8449', + 'full_hash' => 'v4.1.5-76-gb934d2e', 'branch' => 'master', ); diff --git a/resources/views/hardware/bulk.blade.php b/resources/views/hardware/bulk.blade.php index 6cb84f6dfc..ff0c4cb8c6 100755 --- a/resources/views/hardware/bulk.blade.php +++ b/resources/views/hardware/bulk.blade.php @@ -52,7 +52,7 @@ @include ('partials.forms.edit.model-select', ['translated_name' => trans('admin/hardware/form.model'), 'fieldname' => 'model_id']) - @include ('partials.forms.edit.location-select', ['translated_name' => trans('admin/hardware/form.default_location'), 'fieldname' => 'location_id']) + @include ('partials.forms.edit.location-select', ['translated_name' => trans('admin/hardware/form.default_location'), 'fieldname' => 'rtd_location_id']) diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 8c1f85f7c6..a55de38396 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -82,13 +82,23 @@ {{ trans('general.status') }} - @if ($asset->assetstatus->color) - -     - + + @if (($asset->assignedTo) && ($asset->deleted_at=='')) + {{ trans('general.deployed') }} {!! $asset->assignedTo->present()->glyph() !!} + {!! $asset->assignedTo->present()->nameUrl() !!} + @else + @if (($asset->assetstatus) && ($asset->assetstatus->deployable=='1')) + + @elseif (($asset->assetstatus) && ($asset->assetstatus->pending=='1')) + + @elseif (($asset->assetstatus) && ($asset->assetstatus->archived=='1')) + + @endif + + {{ $asset->assetstatus->name }} + + @endif - {{ $asset->assetstatus->name }} - @endif @@ -233,9 +243,15 @@ @endif {{ \App\Helpers\Helper::formatCurrencyOutput($asset->purchase_cost)}} - @if ($asset->order_number) - (Order #{{ $asset->order_number }}) - @endif + + + + @endif + @if ($asset->order_number) + + {{ trans('general.order_number') }} + + #{{ $asset->order_number }} @endif diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php index adb3c9b552..1f78566ad1 100644 --- a/resources/views/partials/bootstrap-table.blade.php +++ b/resources/views/partials/bootstrap-table.blade.php @@ -371,7 +371,6 @@ return '' + row.custom_fields[field_column_plain].value + ''; } } - console.log('NOT a URL!'); return row.custom_fields[field_column_plain].value; }