Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos-tav
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
agplv3
kohinos-tav
Commits
1c6fbe53
Commit
1c6fbe53
authored
Mar 11, 2024
by
Yvon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5896 : add total adult counts to household section
parent
7e2c6c35
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
0 deletions
+62
-0
AdherentAdmin.php
src/Admin/AdherentAdmin.php
+12
-0
Adherent.php
src/Entity/Adherent.php
+17
-0
Version20240311170014.php
src/Migrations/Version20240311170014.php
+33
-0
No files found.
src/Admin/AdherentAdmin.php
View file @
1c6fbe53
...
@@ -38,12 +38,14 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
...
@@ -38,12 +38,14 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use
Symfony\Component\Form\Extension\Core\Type\CheckboxType
;
use
Symfony\Component\Form\Extension\Core\Type\CheckboxType
;
use
Symfony\Component\Form\Extension\Core\Type\ChoiceType
;
use
Symfony\Component\Form\Extension\Core\Type\ChoiceType
;
use
Symfony\Component\Form\Extension\Core\Type\CollectionType
;
use
Symfony\Component\Form\Extension\Core\Type\CollectionType
;
use
Symfony\Component\Form\Extension\Core\Type\IntegerType
;
use
Symfony\Component\Form\Extension\Core\Type\TextType
;
use
Symfony\Component\Form\Extension\Core\Type\TextType
;
use
Symfony\Component\Form\FormError
;
use
Symfony\Component\Form\FormError
;
use
Symfony\Component\Form\FormEvent
;
use
Symfony\Component\Form\FormEvent
;
use
Symfony\Component\Form\FormEvents
;
use
Symfony\Component\Form\FormEvents
;
use
Symfony\Component\Routing\Generator\UrlGeneratorInterface
;
use
Symfony\Component\Routing\Generator\UrlGeneratorInterface
;
use
Symfony\Component\Security\Core\Security
;
use
Symfony\Component\Security\Core\Security
;
use
Symfony\Component\Validator\Constraints\GreaterThanOrEqual
;
/**
/**
* Administration des adhérents.
* Administration des adhérents.
...
@@ -197,6 +199,16 @@ class AdherentAdmin extends AbstractAdmin
...
@@ -197,6 +199,16 @@ class AdherentAdmin extends AbstractAdmin
'required'
=>
true
,
'required'
=>
true
,
'placeholder'
=>
"Choix de la composition du foyer"
,
'placeholder'
=>
"Choix de la composition du foyer"
,
])
])
->
add
(
'householdAdultCount'
,
IntegerType
::
class
,
[
'label'
=>
"Nombre total d'adultes dans le foyer (pour calculer l'allocation)"
,
'constraints'
=>
[
new
GreaterThanOrEqual
([
'value'
=>
0
]),
],
'required'
=>
true
,
'attr'
=>
[
'autocomplete'
=>
false
]
])
->
add
(
'dependentChildren'
,
CollectionType
::
class
,
[
->
add
(
'dependentChildren'
,
CollectionType
::
class
,
[
'entry_type'
=>
DependentChildFormType
::
class
,
'entry_type'
=>
DependentChildFormType
::
class
,
'entry_options'
=>
[
'entry_options'
=>
[
...
...
src/Entity/Adherent.php
View file @
1c6fbe53
...
@@ -124,6 +124,11 @@ class Adherent extends AccountableObject implements AccountableInterface
...
@@ -124,6 +124,11 @@ class Adherent extends AccountableObject implements AccountableInterface
*/
*/
private
$householdComposition
;
private
$householdComposition
;
/**
* @ORM\Column(type="integer", length=255, nullable=true)
*/
private
$householdAdultCount
;
public
function
__construct
()
public
function
__construct
()
{
{
...
@@ -336,6 +341,18 @@ class Adherent extends AccountableObject implements AccountableInterface
...
@@ -336,6 +341,18 @@ class Adherent extends AccountableObject implements AccountableInterface
return
$this
;
return
$this
;
}
}
public
function
getHouseholdAdultCount
()
:
?
int
{
return
$this
->
householdAdultCount
;
}
public
function
setHouseholdAdultCount
(
?
int
$householdAdultCount
)
:
self
{
$this
->
householdAdultCount
=
$householdAdultCount
;
return
$this
;
}
public
function
getMailRappelCotisation
()
:
?
bool
public
function
getMailRappelCotisation
()
:
?
bool
{
{
...
...
src/Migrations/Version20240311170014.php
0 → 100644
View file @
1c6fbe53
<?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
Version20240311170014
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 adherent ADD household_adult_count INT 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 adherent DROP household_adult_count'
);
$this
->
addSql
(
'ALTER TABLE prestataire CHANGE iban iban LONGTEXT CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_general_ci` COMMENT \'(DC2Type:personal_data)\''
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment