mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-10 21:19:30 +00:00
Added generic CSV type option, to highlight the universal nature of the importer
This commit is contained in:
parent
1d33d95c57
commit
76f3c379b5
2 changed files with 386 additions and 379 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue