Skip to content

Commit 76f3c37

Browse files
committed
Added generic CSV type option, to highlight the universal nature of the importer
1 parent 1d33d95 commit 76f3c37

File tree

2 files changed

+386
-379
lines changed

2 files changed

+386
-379
lines changed

src/Controller/ProjectController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ public function importBOM(
149149
'choices' => [
150150
'project.bom_import.type.kicad_pcbnew' => 'kicad_pcbnew',
151151
'project.bom_import.type.kicad_schematic' => 'kicad_schematic',
152+
'project.bom_import.type.generic_csv' => 'generic_csv',
152153
]
153154
]);
154155
$builder->add('clear_existing_bom', CheckboxType::class, [
@@ -176,7 +177,7 @@ public function importBOM(
176177

177178
try {
178179
// For schematic imports, redirect to field mapping step
179-
if ($import_type === 'kicad_schematic') {
180+
if (in_array($import_type, ['kicad_schematic', 'generic_csv'], true)) {
180181
// Store file content and options in session for field mapping step
181182
$file_content = $form->get('file')->getData()->getContent();
182183
$clear_existing = $form->get('clear_existing_bom')->getData();

0 commit comments

Comments
 (0)