mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Merge pull request #2095 from dmeltzer/importer-improvements
Reduce Import error warnings in importer.
This commit is contained in:
commit
11c400f12b
|
@ -348,7 +348,7 @@ class ObjectImportCommand extends Command {
|
||||||
$this->log('Company ' . $asset_company_name . ' was created');
|
$this->log('Company ' . $asset_company_name . ' was created');
|
||||||
return $company;
|
return $company;
|
||||||
} else {
|
} else {
|
||||||
$this->jsonError('Company', $company->getErrors());
|
$this->log('Company', $company->getErrors());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->companies->add($company);
|
$this->companies->add($company);
|
||||||
|
@ -470,7 +470,7 @@ class ObjectImportCommand extends Command {
|
||||||
$this->log('Location ' . $asset_location . ' was created');
|
$this->log('Location ' . $asset_location . ' was created');
|
||||||
return $location;
|
return $location;
|
||||||
} else {
|
} else {
|
||||||
$this->jsonError('Location', $location->getErrors()) ;
|
$this->log('Location', $location->getErrors()) ;
|
||||||
return $location;
|
return $location;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -512,7 +512,7 @@ class ObjectImportCommand extends Command {
|
||||||
$this->log('Supplier ' . $supplier_name . ' was created');
|
$this->log('Supplier ' . $supplier_name . ' was created');
|
||||||
return $supplier;
|
return $supplier;
|
||||||
} else {
|
} else {
|
||||||
$this->jsonError('Supplier', $supplier->getErrors());
|
$this->log('Supplier', $supplier->getErrors());
|
||||||
return $supplier;
|
return $supplier;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -856,4 +856,4 @@ class ObjectImportCommand extends Command {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,24 +73,21 @@
|
||||||
<div class="alert alert-warning">
|
<div class="alert alert-warning">
|
||||||
<strong>Warning</strong> {{trans('admin/hardware/message.import.errorDetail')}}
|
<strong>Warning</strong> {{trans('admin/hardware/message.import.errorDetail')}}
|
||||||
</div>
|
</div>
|
||||||
<table class="table table-striped" id="errors-table">
|
<table class="table table-striped table-bordered" id="errors-table">
|
||||||
<thead>
|
<thead>
|
||||||
<th>Asset</th>
|
<th>Asset</th>
|
||||||
<th colspan="1">Field</th>
|
<th>Errors</th>
|
||||||
<th colspan ="1">Parameter</th>
|
|
||||||
<th colspan ="1">Errors</th>
|
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (session('import_errors') as $asset => $error)
|
@foreach (session('import_errors') as $asset => $error)
|
||||||
<tr>
|
<tr>
|
||||||
<td> {{ $asset }}</td>
|
<td> {{ $asset }}</td>
|
||||||
|
|
||||||
@foreach ($error as $field => $values )
|
@foreach ($error as $field => $values )
|
||||||
<td> {{ $field }} </td>
|
<td> <span><b>{{ $field }}:</b>
|
||||||
@foreach( $values as $fieldName=>$errorString)
|
@foreach( $values as $errorString)
|
||||||
<td>{{$fieldName}}</td>
|
<span>{{$errorString[0]}} </span>
|
||||||
<td>{{$errorString[0]}}</td>
|
@endforeach
|
||||||
@endforeach
|
</td>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
Loading…
Reference in a new issue