Refactor address vue app and create a PickAddressType

This commit is contained in:
2021-10-13 22:58:54 +02:00
parent 01ff88074b
commit 13b96637bb
13 changed files with 282 additions and 110 deletions

View File

@@ -5,6 +5,7 @@ namespace Chill\ThirdPartyBundle\Form;
use Chill\MainBundle\Entity\Address;
use Chill\MainBundle\Entity\Civility;
use Chill\MainBundle\Form\Type\ChillCollectionType;
use Chill\MainBundle\Form\Type\PickAddressType;
use Chill\MainBundle\Form\Type\PickCenterType;
use Chill\MainBundle\Form\Type\ChillTextareaType;
use Chill\MainBundle\Templating\TranslatableStringHelper;
@@ -88,7 +89,9 @@ class ThirdPartyType extends AbstractType
])
;
/*
$builder
/*
->add('address', HiddenType::class)
->get('address')
->addModelTransformer(new CallbackTransformer(
@@ -106,8 +109,7 @@ class ThirdPartyType extends AbstractType
->getRepository(Address::class)
->findOneBy(['id' => (int) $addressId]);
}
))
;
))*/
// Contact Person ThirdParty (child)
if (ThirdParty::KIND_CONTACT === $options['kind'] || ThirdParty::KIND_CHILD === $options['kind']) {
@@ -147,6 +149,9 @@ class ThirdPartyType extends AbstractType
// Institutional ThirdParty (parent)
} else {
$builder
->add('address', PickAddressType::class, [
'label' => 'Address'
])
->add('nameCompany', TextType::class, [
'label' => 'thirdparty.NameCompany',
'required' => false