From 25b916afebb59b08b574ef5f5f5ae9f8c6a4b1f9 Mon Sep 17 00:00:00 2001 From: Daniel Meltzer Date: Wed, 22 Jun 2016 17:07:55 -0400 Subject: [PATCH] Show the name of the item with errors in the table. --- app/Console/Commands/ObjectImportCommand.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Console/Commands/ObjectImportCommand.php b/app/Console/Commands/ObjectImportCommand.php index 3e1778dadb..203a36d552 100644 --- a/app/Console/Commands/ObjectImportCommand.php +++ b/app/Console/Commands/ObjectImportCommand.php @@ -340,7 +340,7 @@ class ObjectImportCommand extends Command $this->log('Asset Model ' . $asset_model_name . ' with model number ' . $asset_modelno . ' was created'); return $asset_model; } else { - $this->jsonError('Asset Model', $asset_model->getErrors()); + $this->jsonError('Asset Model ' . $asset_model_name, $asset_model->getErrors()); return $asset_model; } } else { @@ -387,7 +387,7 @@ class ObjectImportCommand extends Command $this->log('Category ' . $asset_category . ' was created'); return $category; } else { - $this->jsonError('Category', $category->getErrors()); + $this->jsonError('Category '. $asset_category, $category->getErrors()); return $category; } } else { @@ -462,7 +462,7 @@ class ObjectImportCommand extends Command $this->log('Status ' . $asset_statuslabel_name . ' was created'); return $status; } else { - $this->jsonError('Status', $status->getErrors()); + $this->jsonError('Status '. $asset_statuslabel_name, $status->getErrors()); return $status; } } else { @@ -511,7 +511,7 @@ class ObjectImportCommand extends Command $this->log('Manufacturer ' . $manufacturer->name . ' was created'); return $manufacturer; } else { - $this->jsonError('Manufacturer', $manufacturer->getErrors()); + $this->jsonError('Manufacturer '. $manufacturer->name, $manufacturer->getErrors()); return $manufacturer; }