ChillPersonBundle: add employmentStatus property to Person

This commit is contained in:
Christophe Siraut
2024-11-21 10:08:52 +01:00
parent 1f96f76f87
commit 110db30748
17 changed files with 441 additions and 4 deletions

View File

@@ -15,10 +15,13 @@ use Chill\MainBundle\DependencyInjection\MissingBundleException;
use Chill\MainBundle\Security\Authorization\ChillExportVoter;
use Chill\PersonBundle\Controller\AccompanyingPeriodCommentApiController;
use Chill\PersonBundle\Controller\AccompanyingPeriodResourceApiController;
use Chill\PersonBundle\Controller\EmploymentStatusController;
use Chill\PersonBundle\Controller\HouseholdCompositionTypeApiController;
use Chill\PersonBundle\Controller\RelationApiController;
use Chill\PersonBundle\Doctrine\DQL\AddressPart;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\EmploymentStatus;
use Chill\PersonBundle\Form\EmploymentStatusType;
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodCommentVoter;
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodResourceVoter;
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter;
@@ -192,6 +195,28 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
],
],
],
[
'class' => EmploymentStatus::class,
'name' => 'employment_status',
'base_path' => '/admin/employment',
'base_role' => 'ROLE_ADMIN',
'form_class' => EmploymentStatusType::class,
'controller' => EmploymentStatusController::class,
'actions' => [
'index' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillPerson/EmploymentStatus/index.html.twig',
],
'new' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillPerson/EmploymentStatus/new.html.twig',
],
'edit' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillPerson/EmploymentStatus/edit.html.twig',
],
],
],
[
'class' => \Chill\PersonBundle\Entity\MaritalStatus::class,
'name' => 'person_marital-status',

View File

@@ -85,6 +85,7 @@ class Configuration implements ConfigurationInterface
->append($this->addFieldNode('number_of_children'))
->append($this->addFieldNode('acceptEmail'))
->append($this->addFieldNode('deathdate'))
->append($this->addFieldNode('employment_status', 'hidden'))
->arrayNode('alt_names')
->defaultValue([])
->arrayPrototype()