mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-05-23 03:41:34 +00:00
Preparations for bulk editing of tags
Made "target" parameter of handleAction in parts table a string Sanitize input for exisitng action which expect an int Add tag (dummy) to SelectAPI Add tag option to twig template
This commit is contained in:
parent
b8d5b83eee
commit
334a37a9d0
4 changed files with 40 additions and 2 deletions
|
|
@ -33,6 +33,7 @@ use App\Entity\Parts\StorageLocation;
|
|||
use App\Entity\ProjectSystem\Project;
|
||||
use App\Form\Type\Helper\StructuralEntityChoiceHelper;
|
||||
use App\Services\Trees\NodesListBuilder;
|
||||
use App\ApiPlatform\Filter\TagFilter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
|
@ -49,6 +50,20 @@ class SelectAPIController extends AbstractController
|
|||
{
|
||||
}
|
||||
|
||||
#[Route(path: '/tag', name: 'select_tag')]
|
||||
public function tag(): Response
|
||||
{
|
||||
$tags = [
|
||||
'text' => 'test',
|
||||
'value' => 'test',
|
||||
];
|
||||
$this->addEmptyNode($tags);
|
||||
// pseudocode:
|
||||
// for each part in selection
|
||||
// use TagFilter to find tags
|
||||
// dedupe
|
||||
return $this->json($tags);
|
||||
|
||||
#[Route(path: '/category', name: 'select_category')]
|
||||
public function category(): Response
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue