Completed Referral functionality
This commit is contained in:
44
src/Form/ReferralFormType.php
Normal file
44
src/Form/ReferralFormType.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Form;
|
||||
|
||||
use App\Entity\MemberCase;
|
||||
use App\Entity\Referral;
|
||||
use App\Enums\DischargeReason;
|
||||
use App\Enums\ReferralServiceType;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\EnumType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class ReferralFormType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('referralId')
|
||||
->add('serviceCode', EnumType::class, [
|
||||
'class' => ReferralServiceType::class,
|
||||
'label' => 'Service Type'
|
||||
])
|
||||
->add('hours')
|
||||
->add('endDate', null, [
|
||||
'widget' => 'single_text',
|
||||
])
|
||||
->add('dischargeReason', EnumType::class, [
|
||||
'class' => DischargeReason::class
|
||||
])
|
||||
->add('dischargeDate', null, [
|
||||
'widget' => 'single_text',
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => Referral::class,
|
||||
]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user