mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-13 21:59:34 +00:00
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:
parent
a0900c518a
commit
0c297244fa
2 changed files with 4 additions and 4 deletions
|
|
@ -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']
|
||||
));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue