mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 18:28:49 +02:00
Added a page to quickly add many parts to a project from parts lists.
This commit is contained in:
parent
345fb0a3c1
commit
25494c9ddf
7 changed files with 157 additions and 3 deletions
|
@ -25,6 +25,7 @@ use App\Entity\Parts\Category;
|
|||
use App\Entity\Parts\Footprint;
|
||||
use App\Entity\Parts\Manufacturer;
|
||||
use App\Entity\Parts\MeasurementUnit;
|
||||
use App\Entity\ProjectSystem\Project;
|
||||
use App\Services\Trees\NodesListBuilder;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
@ -79,6 +80,14 @@ class SelectAPIController extends AbstractController
|
|||
return $this->getResponseForClass(MeasurementUnit::class, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/project", name="select_project")
|
||||
*/
|
||||
public function projects(): Response
|
||||
{
|
||||
return $this->getResponseForClass(Project::class, false);
|
||||
}
|
||||
|
||||
protected function getResponseForClass(string $class, bool $include_empty = false): Response
|
||||
{
|
||||
$test_obj = new $class();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue