fix: MemberCase
Migration for CaseDocuments to MemberDocuments Convert referralType field to use ReferralType Enum
This commit is contained in:
parent
cdacfd918a
commit
d39942eced
@ -2,14 +2,13 @@
|
|||||||
|
|
||||||
namespace App\Form;
|
namespace App\Form;
|
||||||
|
|
||||||
use App\Entity\CompanyDocument;
|
|
||||||
use App\Entity\MemberCase;
|
use App\Entity\MemberCase;
|
||||||
use App\Entity\ReferralSource;
|
use App\Entity\ReferralSource;
|
||||||
use App\Enums\CaseLevel;
|
use App\Enums\CaseLevel;
|
||||||
use App\Enums\County;
|
use App\Enums\County;
|
||||||
|
use App\Enums\Case\ReferralType;
|
||||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
|
||||||
use Symfony\Component\Form\Extension\Core\Type\EnumType;
|
use Symfony\Component\Form\Extension\Core\Type\EnumType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
@ -19,6 +18,8 @@ class MemberCaseFormType extends AbstractType
|
|||||||
{
|
{
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||||
{
|
{
|
||||||
|
$docs = $options['docs'];
|
||||||
|
|
||||||
$builder
|
$builder
|
||||||
->add('caseNumber', TextType::class, [
|
->add('caseNumber', TextType::class, [
|
||||||
'required' => true
|
'required' => true
|
||||||
@ -29,7 +30,9 @@ class MemberCaseFormType extends AbstractType
|
|||||||
->add('lastName', TextType::class, [
|
->add('lastName', TextType::class, [
|
||||||
'required' => true
|
'required' => true
|
||||||
])
|
])
|
||||||
->add('referralType')
|
->add('referralType', EnumType::class, [
|
||||||
|
'class' => ReferralType::class
|
||||||
|
])
|
||||||
->add('admitDate', null, [
|
->add('admitDate', null, [
|
||||||
'widget' => 'single_text',
|
'widget' => 'single_text',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
@ -62,11 +65,6 @@ class MemberCaseFormType extends AbstractType
|
|||||||
->add('county', EnumType::class, [
|
->add('county', EnumType::class, [
|
||||||
'class' => County::class,
|
'class' => County::class,
|
||||||
])
|
])
|
||||||
->add('docs', ChoiceType::class, [
|
|
||||||
'data_class' => CompanyDocument::class,
|
|
||||||
'multiple' => true,
|
|
||||||
'expanded' => true,
|
|
||||||
])
|
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user