mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Added possibility to export Parts from part tables
This commit is contained in:
parent
3b36b2a4dc
commit
49944cda87
9 changed files with 161 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue