Commit 190bbb42 by Yvon

change name custody, fix wrong column name, clean useless attribute

parent d5bedf87
...@@ -34,10 +34,10 @@ class DependentChild ...@@ -34,10 +34,10 @@ class DependentChild
/** /**
* @var float * @var float
* *
* @ORM\Column(name="conventionnement", type="decimal", scale=2, nullable=true) * @ORM\Column(name="sharedcustodypercentage", type="decimal", scale=2, nullable=true)
* @Assert\Type("numeric") * @Assert\Type("numeric")
*/ */
protected $custody; protected $sharedCustodyPercentage;
public function getId(): ?int public function getId(): ?int
...@@ -69,14 +69,14 @@ class DependentChild ...@@ -69,14 +69,14 @@ class DependentChild
return $this; return $this;
} }
public function getCustody() public function getSharedCustodyPercentage()
{ {
return $this->custody; return $this->sharedCustodyPercentage;
} }
public function setCustody($custody) public function setSharedCustodyPercentage($sharedCustodyPercentage)
{ {
$this->custody = $custody; $this->sharedCustodyPercentage = $sharedCustodyPercentage;
return $this; return $this;
} }
......
...@@ -21,10 +21,9 @@ class DependentChildFormType extends AbstractType ...@@ -21,10 +21,9 @@ class DependentChildFormType extends AbstractType
], ],
'label' => "A-t-il plus de 14 ans ?", 'label' => "A-t-il plus de 14 ans ?",
'required' => true, 'required' => true,
'expanded' => true, 'expanded' => true
'attr' => ['class' => 'dependent-child-older-than-fourteen']
)) ))
->add('custody', ChoiceType::class, [ ->add('sharedCustodyPercentage', ChoiceType::class, [
'label' => "Est-il en garde partagée ?", 'label' => "Est-il en garde partagée ?",
'required' => true, 'required' => true,
'choices' => [ 'choices' => [
...@@ -32,10 +31,7 @@ class DependentChildFormType extends AbstractType ...@@ -32,10 +31,7 @@ class DependentChildFormType extends AbstractType
'oui : je le garde 25 % du temps' => 0.25, 'oui : je le garde 25 % du temps' => 0.25,
'oui : je le garde 50 % du temps' => 0.50, 'oui : je le garde 50 % du temps' => 0.50,
'oui : je le garde 75 % du temps' => 0.75, 'oui : je le garde 75 % du temps' => 0.75,
], ]
'attr' => [
'class' => 'dependent-child-custody-percentage-of-time',
],
]) ])
; ;
} }
......
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240307162630 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE dependent_child CHANGE conventionnement sharedcustodypercentage NUMERIC(10, 2) DEFAULT NULL');
$this->addSql('ALTER TABLE prestataire CHANGE iban iban LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:personal_data)\'');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE dependent_child CHANGE sharedcustodypercentage conventionnement NUMERIC(10, 2) DEFAULT NULL');
$this->addSql('ALTER TABLE prestataire CHANGE iban iban LONGTEXT CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_general_ci` COMMENT \'(DC2Type:personal_data)\'');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment