Component Importer and various Importer Fixes (#3132)

* Importer fix: we were trimming the wrong part of the classname when creating a category.  This led to categories not being recognized.

* Add a component importer.  Uses same fields as consumable importer.  Only trick: If an asset_tag is present, we checkout a component to that asset on import

Enable component importer.  Also calculate the importer classname in a cleaner fashion.

* Fix comparisons.  find can return an index of 0, which is falsy.
This commit is contained in:
Daniel Meltzer
2017-01-05 17:45:12 -06:00
committed by snipe
parent 816d2fd095
commit 6ce20c32b1
11 changed files with 132 additions and 42 deletions
@@ -812,6 +812,9 @@ class AssetsController extends Controller
case "consumable":
$redirectTo = "consumables.index";
break;
case "component":
$redirectTo = "components.index";
break;
}
if ($errors) { //Failure