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
1
Merge Requests
1
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
f187c75c
Commit
f187c75c
authored
Dec 02, 2022
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
affect profildecotisation to adherent
parent
935f83f1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
5 deletions
+26
-5
AdherentAdmin.php
src/Admin/AdherentAdmin.php
+23
-0
ProfilDeCotisationAdmin.php
src/Admin/ProfilDeCotisationAdmin.php
+0
-2
Adherent.php
src/Entity/Adherent.php
+1
-1
ProfilDeCotisation.php
src/Entity/ProfilDeCotisation.php
+2
-2
No files found.
src/Admin/AdherentAdmin.php
View file @
f187c75c
...
...
@@ -9,6 +9,7 @@ use App\Entity\Geoloc;
use
App\Entity\Groupe
;
use
App\Entity\User
;
use
App\Entity\Usergroup
;
use
App\Entity\ProfilDeCotisation
;
use
App\Enum\CurrencyEnum
;
use
App\Events\MLCEvents
;
use
App\Exporter\CustomDoctrineORMQuerySourceIterator
;
...
...
@@ -37,6 +38,7 @@ use Symfony\Component\Form\FormEvent;
use
Symfony\Component\Form\FormEvents
;
use
Symfony\Component\Routing\Generator\UrlGeneratorInterface
;
use
Symfony\Component\Security\Core\Security
;
use
Symfony\Component\Form\CallbackTransformer
;
/**
* Administration des adhérents.
...
...
@@ -165,6 +167,27 @@ class AdherentAdmin extends AbstractAdmin
->
end
()
;
if
(
true
)
{
$formMapper
->
tab
(
'General'
)
->
with
(
'Profil de cotisation'
,
[
'class'
=>
'col-md-5'
])
->
add
(
'profilDeCotisation'
,
ChoiceType
::
class
,
[
'required'
=>
false
,
'label'
=>
'Choix du profil : '
,
'choices'
=>
$this
->
getConfigurationPool
()
->
getContainer
()
->
get
(
'doctrine'
)
->
getRepository
(
ProfilDeCotisation
::
class
)
->
findAll
(),
'empty_data'
=>
null
,
'choice_label'
=>
function
(
$choice
,
$key
,
$value
)
{
if
(
null
===
$choice
)
{
return
'Aucun.'
;
}
return
$choice
->
__toString
();
}
])
->
end
()
->
end
();
}
$em
=
$this
->
getConfigurationPool
()
->
getContainer
()
->
get
(
'doctrine'
)
->
getManager
();
$formMapper
->
getFormBuilder
()
->
addEventListener
(
FormEvents
::
POST_SUBMIT
,
function
(
FormEvent
$event
)
use
(
$em
)
{
$adherent
=
$event
->
getData
();
...
...
src/Admin/ProfilDeCotisationAdmin.php
View file @
f187c75c
...
...
@@ -15,8 +15,6 @@ use App\Enum\CurrencyEnum;
* Administration des profils de cotisation.
*
* KOHINOS : Outil de gestion de Monnaie Locale Complémentaire
*
* -------------------------------> TODO
*/
class
ProfilDeCotisationAdmin
extends
AbstractAdmin
{
...
...
src/Entity/Adherent.php
View file @
f187c75c
...
...
@@ -253,7 +253,7 @@ class Adherent extends AccountableObject implements AccountableInterface
/**
* @return ProfilDeCotisation
*/
public
function
getProfilDeCotisation
()
:
ProfilDeCotisation
public
function
getProfilDeCotisation
()
:
?
ProfilDeCotisation
{
return
$this
->
profilDeCotisation
;
}
...
...
src/Entity/ProfilDeCotisation.php
View file @
f187c75c
...
...
@@ -168,7 +168,7 @@ class ProfilDeCotisation
public
function
__toString
()
:
string
{
return
'
Profil de t
aux '
.
strval
(
number_format
(
$this
->
tauxCotisation
,
2
,
'.'
,
''
))
.
'
et de maximum percevable mensuel '
.
strval
(
$this
->
maxPercevableMensuel
)
.
'
€'
;
return
'
T
aux '
.
strval
(
number_format
(
$this
->
tauxCotisation
,
2
,
'.'
,
''
))
.
'
, Maximum '
.
strval
(
$this
->
maxPercevableMensuel
)
.
'
€'
;
}
}
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