mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-28 23:19:42 -08:00
Merge branch 'develop'
# Conflicts: # config/version.php
This commit is contained in:
commit
e35b3745eb
|
@ -1198,9 +1198,14 @@ class AssetsController extends Controller
|
||||||
$user = User::find(e(Input::get('assigned_to')));
|
$user = User::find(e(Input::get('assigned_to')));
|
||||||
$admin = Auth::user();
|
$admin = Auth::user();
|
||||||
|
|
||||||
|
if (!$user) {
|
||||||
|
return redirect()->route('hardware/bulkcheckout')->withInput()->with('error', trans('admin/hardware/message.checkout.user_does_not_exist'));
|
||||||
|
}
|
||||||
|
|
||||||
if (!is_array(Input::get('selected_assets'))) {
|
if (!is_array(Input::get('selected_assets'))) {
|
||||||
return redirect()->route('hardware/bulkcheckout')->withInput()->with('error', trans('admin/hardware/message.checkout.no_assets_selected'));
|
return redirect()->route('hardware/bulkcheckout')->withInput()->with('error', trans('admin/hardware/message.checkout.no_assets_selected'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$asset_ids = array_filter(Input::get('selected_assets'));
|
$asset_ids = array_filter(Input::get('selected_assets'));
|
||||||
|
|
||||||
if ((Input::has('checkout_at')) && (Input::get('checkout_at')!= date("Y-m-d"))) {
|
if ((Input::has('checkout_at')) && (Input::get('checkout_at')!= date("Y-m-d"))) {
|
||||||
|
@ -1215,6 +1220,7 @@ class AssetsController extends Controller
|
||||||
$expected_checkin = '';
|
$expected_checkin = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$errors = [];
|
$errors = [];
|
||||||
DB::transaction(function () use ($user, $admin, $checkout_at, $expected_checkin, $errors, $asset_ids) {
|
DB::transaction(function () use ($user, $admin, $checkout_at, $expected_checkin, $errors, $asset_ids) {
|
||||||
|
|
||||||
|
@ -1223,6 +1229,14 @@ class AssetsController extends Controller
|
||||||
$this->authorize('checkout', $asset);
|
$this->authorize('checkout', $asset);
|
||||||
$error = $asset->checkOut($user, $admin, $checkout_at, $expected_checkin, e(Input::get('note')), null);
|
$error = $asset->checkOut($user, $admin, $checkout_at, $expected_checkin, e(Input::get('note')), null);
|
||||||
|
|
||||||
|
if ($user->location_id!='') {
|
||||||
|
$asset->location_id = $user->location_id;
|
||||||
|
$asset->unsetEventDispatcher();
|
||||||
|
$asset->save();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($error) {
|
if ($error) {
|
||||||
array_merge_recursive($errors, $asset->getErrors()->toArray());
|
array_merge_recursive($errors, $asset->getErrors()->toArray());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
return array (
|
return array (
|
||||||
'app_version' => 'v4.1.10-pre',
|
'app_version' => 'v4.1.10-pre',
|
||||||
'full_app_version' => 'v4.1.10-pre - build 3204-g09eff88',
|
'full_app_version' => 'v4.1.10-pre - build 3210-g0eff821',
|
||||||
'build_version' => '3204',
|
'build_version' => '3210',
|
||||||
'prerelease_version' => '',
|
'prerelease_version' => '',
|
||||||
'hash_version' => 'g09eff88',
|
'hash_version' => 'g0eff821',
|
||||||
'full_hash' => 'v4.1.10-pre-74-g09eff88',
|
'full_hash' => 'v4.1.10-pre-80-g0eff821',
|
||||||
'branch' => 'master',
|
'branch' => 'master',
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue