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
f94a0edd
Commit
f94a0edd
authored
Feb 26, 2024
by
Damien Moulard
Browse files
Options
Browse Files
Download
Plain Diff
fix merge conflicts
parents
ebe13f85
1ac5109e
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
193 additions
and
56 deletions
+193
-56
PrestataireAdmin.php
src/Admin/PrestataireAdmin.php
+18
-2
IndexController.php
src/Controller/IndexController.php
+4
-4
PrestataireAdminController.php
src/Controller/PrestataireAdminController.php
+4
-3
PrestatairesController.php
src/Controller/PrestatairesController.php
+10
-0
Prestataire.php
src/Entity/Prestataire.php
+27
-0
DistributorSelfEvalPrestaQuizType.php
src/Form/Type/DistributorSelfEvalPrestaQuizType.php
+1
-1
ProducerSelfEvalPrestaQuizType.php
src/Form/Type/ProducerSelfEvalPrestaQuizType.php
+1
-1
SelfEvalPrestaQuizType.php
src/Form/Type/SelfEvalPrestaQuizType.php
+18
-10
Version20240220094817.php
src/Migrations/Version20240220094817.php
+31
-0
Version20240221094604.php
src/Migrations/Version20240221094604.php
+31
-0
show.html.twig
templates/themes/kohinos/presta/show.html.twig
+12
-1
base.html.twig
templates/themes/kohinos/tav/prestaquiz/base.html.twig
+0
-2
distributor.html.twig
...lates/themes/kohinos/tav/prestaquiz/distributor.html.twig
+14
-0
distributor_core.html.twig
.../themes/kohinos/tav/prestaquiz/distributor_core.html.twig
+4
-16
form_theme.html.twig
templates/themes/kohinos/tav/prestaquiz/form_theme.html.twig
+0
-0
infos.html.twig
templates/themes/kohinos/tav/prestaquiz/infos.html.twig
+0
-0
producer.html.twig
templates/themes/kohinos/tav/prestaquiz/producer.html.twig
+14
-0
producer_core.html.twig
...tes/themes/kohinos/tav/prestaquiz/producer_core.html.twig
+4
-16
review.html.twig
templates/themes/kohinos/tav/prestaquiz/review.html.twig
+0
-0
sent.html.twig
templates/themes/kohinos/tav/prestaquiz/sent.html.twig
+0
-0
No files found.
src/Admin/PrestataireAdmin.php
View file @
f94a0edd
...
@@ -352,6 +352,23 @@ class PrestataireAdmin extends AbstractAdmin
...
@@ -352,6 +352,23 @@ class PrestataireAdmin extends AbstractAdmin
->
end
()
->
end
()
->
end
()
->
end
()
;
;
if
(
$this
->
getConfigurationPool
()
->
getContainer
()
->
getParameter
(
'presta_self_init_and_eval'
))
{
$formMapper
->
tab
(
'Prestataire'
)
->
with
(
'Prestataire'
,
[
'class'
=>
'col-md-6'
])
->
add
(
'conventionnement'
,
ChoiceType
::
class
,
[
'choices'
=>
[
'50 %'
=>
0.5
,
'75 %'
=>
0.75
,
'100 %'
=>
1
,
],
'required'
=>
false
,
])
->
end
()
->
end
();
}
// @TODO : add tags model transformer if add new from text
// @TODO : add tags model transformer if add new from text
// ->get('etats')
// ->get('etats')
// ->addModelTransformer(new CallbackTransformer(
// ->addModelTransformer(new CallbackTransformer(
...
@@ -672,7 +689,7 @@ class PrestataireAdmin extends AbstractAdmin
...
@@ -672,7 +689,7 @@ class PrestataireAdmin extends AbstractAdmin
];
];
if
((
$this
->
security
->
isGranted
(
'ROLE_GESTION_GROUPE'
)
||
$this
->
security
->
isGranted
(
'ROLE_SUPER_ADMIN'
))
&&
$this
->
getConfigurationPool
()
->
getContainer
()
->
getParameter
(
'presta_self_init_and_eval'
))
{
if
((
$this
->
security
->
isGranted
(
'ROLE_GESTION_GROUPE'
)
||
$this
->
security
->
isGranted
(
'ROLE_SUPER_ADMIN'
))
&&
$this
->
getConfigurationPool
()
->
getContainer
()
->
getParameter
(
'presta_self_init_and_eval'
))
{
$actions
[
'reviewPrestaQuiz'
]
=
[
$actions
[
'reviewPrestaQuiz'
]
=
[
'template'
=>
'@kohinos/tav/
reviewprestaquiz
.html.twig'
'template'
=>
'@kohinos/tav/
prestaquiz/review
.html.twig'
];
];
}
}
if
(
null
!=
$this
->
security
->
getUser
()
&&
(
$this
->
security
->
isGranted
(
'ROLE_SUPER_ADMIN'
)
||
$this
->
security
->
isGranted
(
'ROLE_ADMIN_PRESTATAIRE_COTISATIONS_ALL'
)
||
$this
->
security
->
isGranted
(
'ROLE_ADMIN_PRESTATAIRE_COTISATIONS_CREATE'
)))
{
if
(
null
!=
$this
->
security
->
getUser
()
&&
(
$this
->
security
->
isGranted
(
'ROLE_SUPER_ADMIN'
)
||
$this
->
security
->
isGranted
(
'ROLE_ADMIN_PRESTATAIRE_COTISATIONS_ALL'
)
||
$this
->
security
->
isGranted
(
'ROLE_ADMIN_PRESTATAIRE_COTISATIONS_CREATE'
)))
{
...
@@ -730,7 +747,6 @@ class PrestataireAdmin extends AbstractAdmin
...
@@ -730,7 +747,6 @@ class PrestataireAdmin extends AbstractAdmin
'label'
=>
'Cotisation à jour'
,
'label'
=>
'Cotisation à jour'
,
'template'
=>
'@kohinos/bundles/SonataAdminBundle/CRUD/list_presta_cotisation.html.twig'
,
'template'
=>
'@kohinos/bundles/SonataAdminBundle/CRUD/list_presta_cotisation.html.twig'
,
]
]
)
)
->
add
(
'users'
,
null
,
[
->
add
(
'users'
,
null
,
[
'label'
=>
'Gestionnaires [Cotisation à jour]'
,
'label'
=>
'Gestionnaires [Cotisation à jour]'
,
...
...
src/Controller/IndexController.php
View file @
f94a0edd
...
@@ -214,7 +214,7 @@ class IndexController extends AbstractController
...
@@ -214,7 +214,7 @@ class IndexController extends AbstractController
return
$this
->
redirectToRoute
(
$redirRoute
);
return
$this
->
redirectToRoute
(
$redirRoute
);
}
}
return
$this
->
render
(
'@kohinos/tav/prestaquiz
_
sent.html.twig'
);
return
$this
->
render
(
'@kohinos/tav/prestaquiz
/
sent.html.twig'
);
}
}
/**
/**
...
@@ -262,7 +262,7 @@ class IndexController extends AbstractController
...
@@ -262,7 +262,7 @@ class IndexController extends AbstractController
}
}
}
}
return
$this
->
render
(
'@kohinos/tav/
infos_prestaquiz
.html.twig'
,
[
return
$this
->
render
(
'@kohinos/tav/
prestaquiz/infos
.html.twig'
,
[
'form'
=>
$form
->
createView
(),
'form'
=>
$form
->
createView
(),
]);
]);
}
}
...
@@ -302,8 +302,8 @@ class IndexController extends AbstractController
...
@@ -302,8 +302,8 @@ class IndexController extends AbstractController
}
}
$tmpl
=
Prestataire
::
DISTRIBUTOR
===
$presta
->
getMarketChannelFunction
()
?
$tmpl
=
Prestataire
::
DISTRIBUTOR
===
$presta
->
getMarketChannelFunction
()
?
'@kohinos/tav/
distributor_selfeval_prestaquiz
.html.twig'
'@kohinos/tav/
prestaquiz/distributor
.html.twig'
:
'@kohinos/tav/pr
oducer_selfeval_prestaquiz
.html.twig'
;
:
'@kohinos/tav/pr
estaquiz/producer
.html.twig'
;
return
$this
->
render
(
$tmpl
,
[
return
$this
->
render
(
$tmpl
,
[
'form'
=>
$form
->
createView
(),
'form'
=>
$form
->
createView
(),
...
...
src/Controller/PrestataireAdminController.php
View file @
f94a0edd
...
@@ -8,6 +8,7 @@ use App\Entity\Prestataire;
...
@@ -8,6 +8,7 @@ use App\Entity\Prestataire;
use
App\Enum\MoyenEnum
;
use
App\Enum\MoyenEnum
;
use
App\Form\Type\DistributorSelfEvalPrestaQuizType
;
use
App\Form\Type\DistributorSelfEvalPrestaQuizType
;
use
App\Form\Type\ProducerSelfEvalPrestaQuizType
;
use
App\Form\Type\ProducerSelfEvalPrestaQuizType
;
use
App\Form\Type\SelfEvalPrestaQuizType
;
use
App\Utils\CustomEntityManager
;
use
App\Utils\CustomEntityManager
;
use
DateTime
;
use
DateTime
;
use
Sonata\AdminBundle\Controller\CRUDController
;
use
Sonata\AdminBundle\Controller\CRUDController
;
...
@@ -138,7 +139,7 @@ class PrestataireAdminController extends CRUDController
...
@@ -138,7 +139,7 @@ class PrestataireAdminController extends CRUDController
$quiz
=
$prestataire
->
getSelfEvalPrestaQuiz
();
$quiz
=
$prestataire
->
getSelfEvalPrestaQuiz
();
$formClass
=
Prestataire
::
DISTRIBUTOR
===
$prestataire
->
getMarketChannelFunction
()
?
$formClass
=
Prestataire
::
DISTRIBUTOR
===
$prestataire
->
getMarketChannelFunction
()
?
DistributorSelfEvalPrestaQuizType
::
class
:
ProducerSelfEvalPrestaQuizType
::
class
;
DistributorSelfEvalPrestaQuizType
::
class
:
ProducerSelfEvalPrestaQuizType
::
class
;
$form
=
$this
->
createForm
(
$formClass
,
$quiz
,
[
"
review"
=>
true
]);
$form
=
$this
->
createForm
(
$formClass
,
$quiz
,
[
"
mode"
=>
SelfEvalPrestaQuizType
::
ADMIN_EDIT
]);
$form
->
handleRequest
(
$request
);
$form
->
handleRequest
(
$request
);
...
@@ -150,8 +151,8 @@ class PrestataireAdminController extends CRUDController
...
@@ -150,8 +151,8 @@ class PrestataireAdminController extends CRUDController
}
}
$tmpl
=
Prestataire
::
DISTRIBUTOR
===
$prestataire
->
getMarketChannelFunction
()
?
$tmpl
=
Prestataire
::
DISTRIBUTOR
===
$prestataire
->
getMarketChannelFunction
()
?
'@kohinos/tav/
distributor_selfeval_prestaquiz
.html.twig'
'@kohinos/tav/
prestaquiz/distributor
.html.twig'
:
'@kohinos/tav/pr
oducer_selfeval_prestaquiz
.html.twig'
;
:
'@kohinos/tav/pr
estaquiz/producer
.html.twig'
;
return
$this
->
render
(
$tmpl
,
[
return
$this
->
render
(
$tmpl
,
[
'form'
=>
$form
->
createView
(),
'form'
=>
$form
->
createView
(),
...
...
src/Controller/PrestatairesController.php
View file @
f94a0edd
...
@@ -6,6 +6,10 @@ use App\Entity\Groupe;
...
@@ -6,6 +6,10 @@ use App\Entity\Groupe;
use
App\Entity\Prestataire
;
use
App\Entity\Prestataire
;
use
App\Entity\Rubrique
;
use
App\Entity\Rubrique
;
use
App\Entity\Flux
;
use
App\Entity\Flux
;
use
App\Entity\SelfEvalPrestaQuiz
;
use
App\Form\Type\DistributorSelfEvalPrestaQuizType
;
use
App\Form\Type\ProducerSelfEvalPrestaQuizType
;
use
App\Form\Type\SelfEvalPrestaQuizType
;
use
Doctrine\ORM\EntityManagerInterface
;
use
Doctrine\ORM\EntityManagerInterface
;
use
Symfony\Component\HttpFoundation\RedirectResponse
;
use
Symfony\Component\HttpFoundation\RedirectResponse
;
use
Symfony\Component\Routing\Annotation\Route
;
use
Symfony\Component\Routing\Annotation\Route
;
...
@@ -39,8 +43,14 @@ class PrestatairesController extends FrontController
...
@@ -39,8 +43,14 @@ class PrestatairesController extends FrontController
return
new
RedirectResponse
(
$this
->
router
->
generate
(
'index'
));
return
new
RedirectResponse
(
$this
->
router
->
generate
(
'index'
));
}
}
$quiz
=
$prestataire
->
getSelfEvalPrestaQuiz
();
$formClass
=
Prestataire
::
DISTRIBUTOR
===
$prestataire
->
getMarketChannelFunction
()
?
DistributorSelfEvalPrestaQuizType
::
class
:
ProducerSelfEvalPrestaQuizType
::
class
;
$form
=
$this
->
createForm
(
$formClass
,
$quiz
,
[
"mode"
=>
SelfEvalPrestaQuizType
::
READONLY
]);
return
$this
->
render
(
'@kohinos/presta/show.html.twig'
,
[
return
$this
->
render
(
'@kohinos/presta/show.html.twig'
,
[
'presta'
=>
$prestataire
,
'presta'
=>
$prestataire
,
'form'
=>
$form
->
createView
()
]);
]);
}
}
...
...
src/Entity/Prestataire.php
View file @
f94a0edd
...
@@ -357,6 +357,15 @@ class Prestataire extends AccountableObject implements AccountableInterface
...
@@ -357,6 +357,15 @@ class Prestataire extends AccountableObject implements AccountableInterface
*/
*/
private
$prestataireProductFamilies
;
private
$prestataireProductFamilies
;
/**
* @var float
*
* @ORM\Column(name="conventionnement", type="decimal", scale=2, nullable=true)
* @Assert\Type("numeric")
*/
protected
$conventionnement
;
public
function
__construct
()
public
function
__construct
()
{
{
$this
->
users
=
new
ArrayCollection
();
$this
->
users
=
new
ArrayCollection
();
...
@@ -1219,6 +1228,24 @@ class Prestataire extends AccountableObject implements AccountableInterface
...
@@ -1219,6 +1228,24 @@ class Prestataire extends AccountableObject implements AccountableInterface
$prestataireProductFamily
->
setPrestataire
(
null
);
$prestataireProductFamily
->
setPrestataire
(
null
);
}
}
}
}
}
/**
* @return mixed
*/
public
function
getConventionnement
()
{
return
$this
->
conventionnement
!==
null
?
number_format
(
$this
->
conventionnement
,
2
)
:
null
;
}
/**
* @param mixed $conventionnement
*
* @return Prestataire
*/
public
function
setConventionnement
(
$conventionnement
)
{
$this
->
conventionnement
=
$conventionnement
;
return
$this
;
return
$this
;
}
}
...
...
src/Form/Type/DistributorSelfEvalPrestaQuizType.php
View file @
f94a0edd
...
@@ -100,7 +100,7 @@ class DistributorSelfEvalPrestaQuizType extends SelfEvalPrestaQuizType
...
@@ -100,7 +100,7 @@ class DistributorSelfEvalPrestaQuizType extends SelfEvalPrestaQuizType
$builder
->
add
(
'localite_global_comment'
,
TextareaType
::
class
,
$this
->
cmtOpts
);
$builder
->
add
(
'localite_global_comment'
,
TextareaType
::
class
,
$this
->
cmtOpts
);
//Review
//Review
if
(
$options
[
'
review'
]
)
{
if
(
$options
[
'
mode'
]
!==
self
::
PRESTA_EDIT
)
{
$this
->
reviewOpts
[
'label'
]
=
"Transparence et juste rémunération : "
.
$this
->
reviewLabel
;
$this
->
reviewOpts
[
'label'
]
=
"Transparence et juste rémunération : "
.
$this
->
reviewLabel
;
$this
->
reviewOpts
[
'choices'
]
=
$this
->
stdGlobalChoices
;
$this
->
reviewOpts
[
'choices'
]
=
$this
->
stdGlobalChoices
;
$builder
->
add
(
'review_transpar_global'
,
ChoiceType
::
class
,
$this
->
reviewOpts
);
$builder
->
add
(
'review_transpar_global'
,
ChoiceType
::
class
,
$this
->
reviewOpts
);
...
...
src/Form/Type/ProducerSelfEvalPrestaQuizType.php
View file @
f94a0edd
...
@@ -59,7 +59,7 @@ class ProducerSelfEvalPrestaQuizType extends SelfEvalPrestaQuizType
...
@@ -59,7 +59,7 @@ class ProducerSelfEvalPrestaQuizType extends SelfEvalPrestaQuizType
$builder
->
add
(
'proagdur_global_comment'
,
TextareaType
::
class
,
$this
->
cmtOpts
);
$builder
->
add
(
'proagdur_global_comment'
,
TextareaType
::
class
,
$this
->
cmtOpts
);
//Review
//Review
if
(
$options
[
'
review'
]
)
{
if
(
$options
[
'
mode'
]
!==
self
::
PRESTA_EDIT
)
{
$this
->
reviewOpts
[
'label'
]
=
"Pratiques agricoles durables : "
.
$this
->
reviewLabel
;
$this
->
reviewOpts
[
'label'
]
=
"Pratiques agricoles durables : "
.
$this
->
reviewLabel
;
$this
->
reviewOpts
[
'choices'
]
=
$this
->
stdGlobalChoices
;
$this
->
reviewOpts
[
'choices'
]
=
$this
->
stdGlobalChoices
;
$builder
->
add
(
'review_proagdur_global'
,
ChoiceType
::
class
,
$this
->
reviewOpts
);
$builder
->
add
(
'review_proagdur_global'
,
ChoiceType
::
class
,
$this
->
reviewOpts
);
...
...
src/Form/Type/SelfEvalPrestaQuizType.php
View file @
f94a0edd
...
@@ -20,6 +20,10 @@ use Symfony\Component\Validator\Constraints\NotNull;
...
@@ -20,6 +20,10 @@ use Symfony\Component\Validator\Constraints\NotNull;
*/
*/
class
SelfEvalPrestaQuizType
extends
AbstractType
class
SelfEvalPrestaQuizType
extends
AbstractType
{
{
const
PRESTA_EDIT
=
'presta_edit'
;
const
ADMIN_EDIT
=
'admin_edit'
;
const
READONLY
=
'readonly'
;
protected
$security
;
protected
$security
;
protected
array
$stdChoices
;
protected
array
$stdChoices
;
...
@@ -57,26 +61,28 @@ class SelfEvalPrestaQuizType extends AbstractType
...
@@ -57,26 +61,28 @@ class SelfEvalPrestaQuizType extends AbstractType
public
function
buildForm
(
FormBuilderInterface
$builder
,
array
$options
)
public
function
buildForm
(
FormBuilderInterface
$builder
,
array
$options
)
{
{
//options are moved to buildForm as '
review
' option is required to set them up
//options are moved to buildForm as '
mode
' option is required to set them up
$this
->
reviewOpts
=
[
$this
->
reviewOpts
=
[
'label'
=>
''
,
'label'
=>
''
,
'choices'
=>
$this
->
stdChoices
,
'choices'
=>
$this
->
stdChoices
,
'expanded'
=>
true
,
'expanded'
=>
true
,
"multiple"
=>
false
,
"multiple"
=>
false
,
'constraints'
=>
[
new
NotNull
()]
'constraints'
=>
[
new
NotNull
()],
'disabled'
=>
$options
[
'mode'
]
===
self
::
READONLY
];
];
$this
->
opts
=
$this
->
reviewOpts
;
$this
->
opts
=
$this
->
reviewOpts
;
$this
->
opts
[
'disabled'
]
=
$options
[
'
review'
]
;
$this
->
opts
[
'disabled'
]
=
$options
[
'
mode'
]
!==
self
::
PRESTA_EDIT
;
$this
->
reviewCmtOpts
=
[
$this
->
reviewCmtOpts
=
[
'attr'
=>
[
'attr'
=>
[
'placeholder'
=>
'Commentaires'
'placeholder'
=>
$options
[
'mode'
]
===
self
::
READONLY
?
''
:
'Commentaires'
],
],
'label'
=>
false
,
'label'
=>
false
,
'required'
=>
false
'required'
=>
false
,
'disabled'
=>
$options
[
'mode'
]
===
self
::
READONLY
];
];
$this
->
cmtOpts
=
$this
->
reviewCmtOpts
;
$this
->
cmtOpts
=
$this
->
reviewCmtOpts
;
$this
->
cmtOpts
[
'disabled'
]
=
$options
[
'
review'
]
;
$this
->
cmtOpts
[
'disabled'
]
=
$options
[
'
mode'
]
!==
self
::
PRESTA_EDIT
;
$this
->
cmtOpts
[
'attr'
][
'placeholder'
]
=
$options
[
'
review'
]
?
''
:
'Commentaires'
;
$this
->
cmtOpts
[
'attr'
][
'placeholder'
]
=
$options
[
'
mode'
]
!==
self
::
PRESTA_EDIT
?
''
:
'Commentaires'
;
/* PARTIE 1 : ACCESSIBILITE ET INCLUSIVITE */
/* PARTIE 1 : ACCESSIBILITE ET INCLUSIVITE */
$this
->
opts
[
'label'
]
=
"Géographique et physique : le lieu est-il accessible par différents modes de transport ?"
;
$this
->
opts
[
'label'
]
=
"Géographique et physique : le lieu est-il accessible par différents modes de transport ?"
;
...
@@ -136,7 +142,7 @@ class SelfEvalPrestaQuizType extends AbstractType
...
@@ -136,7 +142,7 @@ class SelfEvalPrestaQuizType extends AbstractType
$builder
->
add
(
'bienetre_global_comment'
,
TextareaType
::
class
,
$this
->
cmtOpts
);
$builder
->
add
(
'bienetre_global_comment'
,
TextareaType
::
class
,
$this
->
cmtOpts
);
//Review
//Review
if
(
$options
[
'
review'
]
)
{
if
(
$options
[
'
mode'
]
!==
self
::
PRESTA_EDIT
)
{
$this
->
reviewOpts
[
'label'
]
=
"Accessibilité et inclusivité : "
.
$this
->
reviewLabel
;
$this
->
reviewOpts
[
'label'
]
=
"Accessibilité et inclusivité : "
.
$this
->
reviewLabel
;
$this
->
reviewOpts
[
'choices'
]
=
$this
->
stdGlobalChoices
;
$this
->
reviewOpts
[
'choices'
]
=
$this
->
stdGlobalChoices
;
$builder
->
add
(
'review_accessib_global'
,
ChoiceType
::
class
,
$this
->
reviewOpts
);
$builder
->
add
(
'review_accessib_global'
,
ChoiceType
::
class
,
$this
->
reviewOpts
);
...
@@ -148,7 +154,9 @@ class SelfEvalPrestaQuizType extends AbstractType
...
@@ -148,7 +154,9 @@ class SelfEvalPrestaQuizType extends AbstractType
$builder
->
add
(
'review_bienetre_global_comment'
,
TextareaType
::
class
,
$this
->
reviewCmtOpts
);
$builder
->
add
(
'review_bienetre_global_comment'
,
TextareaType
::
class
,
$this
->
reviewCmtOpts
);
}
}
$builder
->
add
(
'save'
,
SubmitType
::
class
,
[
'label'
=>
$options
[
'review'
]
?
'Enregistrer'
:
'Envoyer'
]);
if
(
$options
[
'mode'
]
!==
self
::
READONLY
)
{
$builder
->
add
(
'save'
,
SubmitType
::
class
,
[
'label'
=>
$options
[
'mode'
]
===
self
::
PRESTA_EDIT
?
'Envoyer'
:
'Enregistrer'
]);
}
}
}
/**
/**
...
@@ -158,7 +166,7 @@ class SelfEvalPrestaQuizType extends AbstractType
...
@@ -158,7 +166,7 @@ class SelfEvalPrestaQuizType extends AbstractType
{
{
$resolver
->
setDefaults
([
$resolver
->
setDefaults
([
'data_class'
=>
SelfEvalPrestaQuiz
::
class
,
'data_class'
=>
SelfEvalPrestaQuiz
::
class
,
'
review'
=>
false
//decide if prestataire is filling the form or if an admin is reviewing
'
mode'
=>
self
::
PRESTA_EDIT
]);
]);
}
}
...
...
src/Migrations/Version20240220094817.php
0 → 100644
View file @
f94a0edd
<?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
Version20240220094817
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 prestataire ADD conventionnement NUMERIC(10, 2) NOT NULL, 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 prestataire DROP conventionnement, CHANGE iban iban LONGTEXT CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_general_ci` COMMENT \'(DC2Type:personal_data)\''
);
}
}
src/Migrations/Version20240221094604.php
0 → 100644
View file @
f94a0edd
<?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
Version20240221094604
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 prestataire CHANGE iban iban LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:personal_data)\', CHANGE conventionnement conventionnement NUMERIC(10, 2) DEFAULT NULL'
);
}
public
function
down
(
Schema
$schema
)
:
void
{
// this down() migration is auto-generated, please modify it to your needs
$this
->
addSql
(
'ALTER TABLE prestataire CHANGE iban iban LONGTEXT CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_general_ci` COMMENT \'(DC2Type:personal_data)\', CHANGE conventionnement conventionnement NUMERIC(10, 2) NOT NULL'
);
}
}
templates/themes/kohinos/presta/show.html.twig
View file @
f94a0edd
...
@@ -77,12 +77,23 @@
...
@@ -77,12 +77,23 @@
{%
endfor
%}
{%
endfor
%}
</ul>
</ul>
{%
endif
%}
{%
endif
%}
{%
if
app.user
and
presta_self_init_and_eval
and
presta.selfEvalPrestaQuiz
%}
{%
set
prestataire
=
presta
%}
<div
class=
"card-header"
><h2>
Questionnaire
</h2></div>
<div
class=
"card-body"
>
{%
if
presta.marketChannelFunction
==
'distributor'
%}
{%
include
'@kohinos/tav/prestaquiz/distributor_core.html.twig'
%}
{%
else
%}
{%
include
'@kohinos/tav/prestaquiz/producer_core.html.twig'
%}
{%
endif
%}
</div>
{%
endif
%}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{%
endblock
%}
{%
endblock
%}
{%
block
contenat
%}
{%
block
contenat
%}
<div
class=
'container newslist mt-5'
>
<div
class=
'container newslist mt-5'
>
...
...
templates/themes/kohinos/tav/
selfeval_prestaquiz
.html.twig
→
templates/themes/kohinos/tav/
prestaquiz/base
.html.twig
View file @
f94a0edd
{# View for prestataire questionnaire sections that are common to distributors and producers #}
{# View for prestataire questionnaire sections that are common to distributors and producers #}
<br/>
<br/>
<h2><i
class=
"fas fa-universal-access"
></i>
Accessibilité et Inclusivité
</h2>
<h2><i
class=
"fas fa-universal-access"
></i>
Accessibilité et Inclusivité
</h2>
<div
class=
"container"
>
<div
class=
"container"
>
...
...
templates/themes/kohinos/tav/prestaquiz/distributor.html.twig
0 → 100644
View file @
f94a0edd
{%
extends
'@kohinos/common/layout.html.twig'
%}
{%
block
content
%}
{# Check if review mode to adapt title #}
{%
if
form.review_transpar_global
is
defined
%}
<h1>
Revue auto-évaluation distributeur
{{
prestataire.raison
}}
</h1>
{%
else
%}
<h1>
Inscription point de vente (2/2) : auto-évaluation
</h1>
{%
endif
%}
<br/>
<br/>
{%
include
'@kohinos/tav/prestaquiz/distributor_core.html.twig'
%}
{%
endblock
%}
\ No newline at end of file
templates/themes/kohinos/tav/
distributor_selfeval_prestaquiz
.html.twig
→
templates/themes/kohinos/tav/
prestaquiz/distributor_core
.html.twig
View file @
f94a0edd
{%
extends
'@kohinos/common/layout.html.twig'
%}
{%
block
content
%}
{# Form theme use is mandatory to insert non-text stuff (such as html, icons...) in the choice type choices label. #}
{# Form theme use is mandatory to insert non-text stuff (such as html, icons...) in the choice type choices label. #}
{%
form_theme
form
'@kohinos/tav/prestaquiz_form_theme.html.twig'
%}
{%
form_theme
form
'@kohinos/tav/prestaquiz/form_theme.html.twig'
%}
{# Check if review mode to adapt title #}
{%
if
form.review_transpar_global
is
defined
%}
<h1>
Revue auto-évaluation distributeur
{{
prestataire.raison
}}
</h1>
{%
else
%}
<h1>
Inscription point de vente (2/2) : auto-évaluation
</h1>
{%
endif
%}
{{
form_start
(
form
)
}}
{{
form_start
(
form
)
}}
{# includes twig common to distributors and producers #}
{# includes twig common to distributors and producers #}
{%
include
'@kohinos/tav/
selfeval_prestaquiz
.html.twig'
%}
{%
include
'@kohinos/tav/
prestaquiz/base
.html.twig'
%}
<br/>
<br/>
...
@@ -137,6 +127,4 @@
...
@@ -137,6 +127,4 @@
<br/>
<br/>
<br/>
<br/>
{{
form_end
(
form
)
}}
{{
form_end
(
form
)
}}
\ No newline at end of file
{%
endblock
%}
\ No newline at end of file
templates/themes/kohinos/tav/prestaquiz
_
form_theme.html.twig
→
templates/themes/kohinos/tav/prestaquiz
/
form_theme.html.twig
View file @
f94a0edd
File moved
templates/themes/kohinos/tav/
infos_prestaquiz
.html.twig
→
templates/themes/kohinos/tav/
prestaquiz/infos
.html.twig
View file @
f94a0edd
File moved
templates/themes/kohinos/tav/prestaquiz/producer.html.twig
0 → 100644
View file @
f94a0edd
{%
extends
'@kohinos/common/layout.html.twig'
%}
{%
block
content
%}
{# Check if review mode to adapt title #}
{%
if
form.review_proagdur_global
is
defined
%}
<h1>
Revue auto-évaluation producteur
{{
prestataire.raison
}}
</h1>
{%
else
%}
<h1>
Inscription point de vente (2/2) : auto-évaluation
</h1>
{%
endif
%}
<br/>
<br/>
{%
include
'@kohinos/tav/prestaquiz/producer_core.html.twig'
%}
{%
endblock
%}
\ No newline at end of file
templates/themes/kohinos/tav/pr
oducer_selfeval_prestaquiz
.html.twig
→
templates/themes/kohinos/tav/pr
estaquiz/producer_core
.html.twig
View file @
f94a0edd
{%
extends
'@kohinos/common/layout.html.twig'
%}
{%
block
content
%}
{# Form theme use is mandatory to insert non-text stuff (such as html, icons...) in the choice type choices label. #}
{# Form theme use is mandatory to insert non-text stuff (such as html, icons...) in the choice type choices label. #}
{%
form_theme
form
'@kohinos/tav/prestaquiz_form_theme.html.twig'
%}
{%
form_theme
form
'@kohinos/tav/prestaquiz/form_theme.html.twig'
%}
{# Check if review mode to adapt title #}
{%
if
form.review_proagdur_global
is
defined
%}
<h1>
Revue auto-évaluation producteur
{{
prestataire.raison
}}
</h1>
{%
else
%}
<h1>
Inscription point de vente (2/2) : auto-évaluation
</h1>
{%
endif
%}
{{
form_start
(
form
)
}}
{{
form_start
(
form
)
}}
{# includes twig common to distributors and producers #}
{# includes twig common to distributors and producers #}
{%
include
'@kohinos/tav/
selfeval_prestaquiz
.html.twig'
%}
{%
include
'@kohinos/tav/
prestaquiz/base
.html.twig'
%}
<br/>
<br/>
<br/>
<br/>
...
@@ -90,6 +80,4 @@
...
@@ -90,6 +80,4 @@
<br/>
<br/>
<br/>
<br/>
{{
form_end
(
form
)
}}
{{
form_end
(
form
)
}}
\ No newline at end of file
{%
endblock
%}
\ No newline at end of file
templates/themes/kohinos/tav/
reviewprestaquiz
.html.twig
→
templates/themes/kohinos/tav/
prestaquiz/review
.html.twig
View file @
f94a0edd
File moved
templates/themes/kohinos/tav/prestaquiz
_
sent.html.twig
→
templates/themes/kohinos/tav/prestaquiz
/
sent.html.twig
View file @
f94a0edd
File moved
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