Added basic possibility to change the manufacturer, footprint, category and part unit of multiple parts.

This commit is contained in:
Jan Böhmer 2020-05-24 18:26:10 +02:00
parent 6f6ac0f128
commit ca74dd84f0
4 changed files with 195 additions and 2 deletions

View file

@ -74,6 +74,7 @@ class PartListsController extends AbstractController
$redirect = $request->request->get('redirect_back');
$ids = $request->request->get('ids');
$action = $request->request->get('action');
$target = $request->request->get('target');
if (!$this->isCsrfTokenValid('table_action', $request->request->get('_token'))) {
$this->addFlash('error', 'csfr_invalid');
@ -84,7 +85,7 @@ class PartListsController extends AbstractController
$this->addFlash('error', 'part.table.actions.no_params_given');
} else {
$parts = $actionHandler->idStringToArray($ids);
$actionHandler->handleAction($action, $parts, null);
$actionHandler->handleAction($action, $parts, $target ? (int) $target : null);
//Save changes
$this->entityManager->flush();