mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 06:14:59 +00:00
Add suggested thirdparties, with same parent, for thirdparties of kind 'child'
This commit is contained in:
@@ -31,7 +31,13 @@ class ThirdpartyDuplicateController extends AbstractController
|
||||
#[Route(path: '/{_locale}/3party/{thirdparty_id}/find-manually', name: 'chill_thirdparty_find_duplicate')]
|
||||
public function findManuallyDuplicateAction(ThirdParty $thirdparty, Request $request)
|
||||
{
|
||||
$form = $this->createForm(ThirdpartyFindDuplicateType::class);
|
||||
$suggested = [];
|
||||
|
||||
if ('child' === $thirdparty->getKind()) {
|
||||
$suggested = $thirdparty->getParent()->getChildren();
|
||||
}
|
||||
|
||||
$form = $this->createForm(ThirdpartyFindDuplicateType::class, null, ['suggested' => $suggested]);
|
||||
|
||||
$form->handleRequest($request);
|
||||
|
||||
|
Reference in New Issue
Block a user