Tabs und BOMImporter: Verbesserte Anzeige und Validierung

Die Standardanzeige des Tabs "Details" wurde korrigiert. Im BOMImporter wurden nichtnumerische Spalten kategorisch ausgeschlossen und eine Validation-message angepasst.
This commit is contained in:
Marcel Diegelmann 2025-07-24 10:31:19 +02:00
parent a0900c518a
commit 0c297244fa
2 changed files with 4 additions and 4 deletions

View file

@ -517,7 +517,7 @@ class BOMImporter
//If there is no value, skip
if (isset($values[$index]) && $values[$index] !== '') {
//Check whether the value is numerical
if (is_numeric($values[$index])) {
if (is_numeric($values[$index]) && !in_array($column, ['name','description','manufacturer','designator'])) {
//Convert to integer or float
$temp = (str_contains($values[$index], '.'))
? floatval($values[$index])
@ -548,7 +548,7 @@ class BOMImporter
if (isset($entry['name']) && !is_string($entry['name'])) {
$result->addViolation($this->buildJsonViolation(
'validator.bom_importer.csv.parameter.string.notEmpty',
'validator.bom_importer.json_csv.parameter.string.notEmpty',
"row[$key].name",
$entry['name']
));