diff --git a/app/Importer/ItemImporter.php b/app/Importer/ItemImporter.php index 769318aa3..6b1d64713 100644 --- a/app/Importer/ItemImporter.php +++ b/app/Importer/ItemImporter.php @@ -286,7 +286,7 @@ class ItemImporter extends Importer $item_type = strtolower(substr($classname, 0, strpos($classname, 'Importer'))); // If we're importing asset models only (without attached assets), override the category type to asset - if ($item_type == 'assetModel') { + if ($item_type == 'assetmodel') { $item_type = 'asset'; } diff --git a/database/factories/ImportFactory.php b/database/factories/ImportFactory.php index e7f8d692e..11fdbe17a 100644 --- a/database/factories/ImportFactory.php +++ b/database/factories/ImportFactory.php @@ -157,7 +157,7 @@ class ImportFactory extends Factory $fileBuilder = Importing\AssetModelsImportFileBuilder::new(); $attributes['name'] = "{$attributes['name']} Asset Model"; - $attributes['import_type'] = 'assetmodel'; + $attributes['import_type'] = 'assetModel'; $attributes['header_row'] = $fileBuilder->toCsv()[0]; $attributes['first_row'] = $fileBuilder->firstRow(); diff --git a/sample_csvs/models-sample.csv b/sample_csvs/models-sample.csv index e7701bd49..f6c92e219 100644 --- a/sample_csvs/models-sample.csv +++ b/sample_csvs/models-sample.csv @@ -1,4 +1,4 @@ -Name,Category,Manufacturer,Notes,Model Number,Fieldset,Requestable,EOL,Min Qty +Name,Category,Manufacturer,Model Notes,Model Number,Fieldset,Requestable,EOL,Min Qty Test Model 2,Laptops,"Botsford, Boyle and Herzog",ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae mauris viverra diam vitae quam suspendisse potenti nullam,9351IS25A51,Laptops and Desktops,Y,36,50 Test Model 3,Laptops,Pollich LLC,,9929FR08W85,Laptops and Desktops,Y,36,30 Test Model 5,Laptops,Berge Inc,turpis adipiscing lorem vitae mattis nibh ligula nec sem duis aliquam convallis nunc proin at turpis a pede,0910VB28Q61,Laptops and Desktops,Y,36,0