mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -08:00
Use asset tags
This commit is contained in:
parent
7899d2284c
commit
da52511bf9
|
@ -119,10 +119,16 @@ class AssetsController extends Controller
|
||||||
$asset = new Asset();
|
$asset = new Asset();
|
||||||
$asset->model()->associate(AssetModel::find($request->input('model_id')));
|
$asset->model()->associate(AssetModel::find($request->input('model_id')));
|
||||||
$asset->name = $request->input('name');
|
$asset->name = $request->input('name');
|
||||||
|
|
||||||
// Check for a corresponding serial
|
// Check for a corresponding serial
|
||||||
if (($serials) && (array_key_exists($a, $serials))) {
|
if (($serials) && (array_key_exists($a, $serials))) {
|
||||||
$asset->serial = $serials[$a];
|
$asset->serial = $serials[$a];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (($asset_tags) && (array_key_exists($a, $asset_tags))) {
|
||||||
|
$asset->asset_tag = $asset_tags[$a];
|
||||||
|
}
|
||||||
|
|
||||||
$asset->company_id = Company::getIdForCurrentUser($request->input('company_id'));
|
$asset->company_id = Company::getIdForCurrentUser($request->input('company_id'));
|
||||||
$asset->model_id = $request->input('model_id');
|
$asset->model_id = $request->input('model_id');
|
||||||
$asset->order_number = $request->input('order_number');
|
$asset->order_number = $request->input('order_number');
|
||||||
|
@ -146,8 +152,6 @@ class AssetsController extends Controller
|
||||||
|
|
||||||
// Create the image (if one was chosen.)
|
// Create the image (if one was chosen.)
|
||||||
if ($request->has('image')) {
|
if ($request->has('image')) {
|
||||||
$image = $request->input('image');
|
|
||||||
|
|
||||||
$asset = $request->handleImages($asset);
|
$asset = $request->handleImages($asset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue