Added generic CSV type option, to highlight the universal nature of the importer

This commit is contained in:
Jan Böhmer 2025-09-06 23:20:07 +02:00
parent 1d33d95c57
commit 76f3c379b5
2 changed files with 386 additions and 379 deletions

View file

@ -149,6 +149,7 @@ class ProjectController extends AbstractController
'choices' => [
'project.bom_import.type.kicad_pcbnew' => 'kicad_pcbnew',
'project.bom_import.type.kicad_schematic' => 'kicad_schematic',
'project.bom_import.type.generic_csv' => 'generic_csv',
]
]);
$builder->add('clear_existing_bom', CheckboxType::class, [
@ -176,7 +177,7 @@ class ProjectController extends AbstractController
try {
// For schematic imports, redirect to field mapping step
if ($import_type === 'kicad_schematic') {
if (in_array($import_type, ['kicad_schematic', 'generic_csv'], true)) {
// Store file content and options in session for field mapping step
$file_content = $form->get('file')->getData()->getContent();
$clear_existing = $form->get('clear_existing_bom')->getData();