Added possibility to export Parts from part tables

This commit is contained in:
Jan Böhmer 2023-03-12 00:27:04 +01:00
parent 3b36b2a4dc
commit 49944cda87
9 changed files with 161 additions and 8 deletions

View file

@ -95,6 +95,25 @@ class SelectAPIController extends AbstractController
return $this->getResponseForClass(Project::class, false);
}
/**
* @Route("/export_level", name="select_export_level")
*/
public function exportLevel(): Response
{
$entries = [
1 => $this->translator->trans('export.level.simple'),
2 => $this->translator->trans('export.level.extended'),
3 => $this->translator->trans('export.level.full'),
];
return $this->json(array_map(function ($key, $value) {
return [
'text' => $value,
'value' => $key,
];
}, array_keys($entries), $entries));
}
/**
* @Route("/label_profiles", name="select_label_profiles")
* @return Response