mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
WIP fix emploi reports
This commit is contained in:
parent
800942bc92
commit
454ab73303
@ -45,18 +45,18 @@ class CSReportController extends AbstractController
|
||||
|
||||
$kinds = [];
|
||||
|
||||
if ($this->isGranted(CSConnectesVoter::REPORT_CV, $person)) {
|
||||
// if ($this->isGranted(CSConnectesVoter::REPORT_CV, $person)) {
|
||||
$kinds['cvs'] = CV::class;
|
||||
}
|
||||
// }
|
||||
|
||||
if ($this->isGranted(CSConnectesVoter::REPORT_NEW, $person)) {
|
||||
// if ($this->isGranted(CSConnectesVoter::REPORT_NEW, $person)) {
|
||||
$kinds = \array_merge($kinds, [
|
||||
'cvs' => CV::class,
|
||||
'freins' => Frein::class,
|
||||
'immersions' => Immersion::class,
|
||||
'projet_professionnels' => ProjetProfessionnel::class,
|
||||
]);
|
||||
}
|
||||
// }
|
||||
|
||||
foreach ($kinds as $key => $className) {
|
||||
$ordering = match ($key) {
|
||||
|
@ -11,9 +11,17 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\JobBundle\DependencyInjection;
|
||||
|
||||
use Chill\JobBundle\Controller\CSCrudReportController;
|
||||
use Chill\JobBundle\Controller\CSPersonController;
|
||||
use Chill\JobBundle\Entity\CSPerson;
|
||||
use Chill\JobBundle\Form\CSPersonPersonalSituationType;
|
||||
use Chill\JobBundle\Entity\CV;
|
||||
use Chill\JobBundle\Entity\Frein;
|
||||
use Chill\JobBundle\Entity\Immersion;
|
||||
use Chill\JobBundle\Entity\ProjetProfessionnel;
|
||||
use Chill\JobBundle\Form\CVType;
|
||||
use Chill\JobBundle\Form\FreinType;
|
||||
use Chill\JobBundle\Form\ImmersionType;
|
||||
use Chill\JobBundle\Form\ProjetProfessionnelType;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
|
||||
@ -61,21 +69,98 @@ class ChillJobExtension extends Extension implements PrependExtensionInterface
|
||||
'name' => 'job',
|
||||
'base_role' => 'ROLE_USER',
|
||||
'base_path' => '/person/job/',
|
||||
/* 'form_class' => CSPersonPersonalSituationType::class,
|
||||
],
|
||||
[
|
||||
'class' => CV::class,
|
||||
'controller' => CSCrudReportController::class,
|
||||
'name' => 'cscv',
|
||||
'base_role' => 'ROLE_USER',
|
||||
'base_path' => '/person/report/cv',
|
||||
'form_class' => CVType::class,
|
||||
'actions' => [
|
||||
'index' => [
|
||||
'role' => 'ROLE_USER',
|
||||
'template' => '@ChillPerson/CRUD/index.html.twig',
|
||||
'template' => '@ChillJob/CV/index.html.twig',
|
||||
],
|
||||
'new' => [
|
||||
'role' => 'ROLE_USER',
|
||||
'template' => '@ChillPerson/CRUD/new.html.twig',
|
||||
'template' => '@ChillJob/CV/new.html.twig',
|
||||
],
|
||||
'edit' => [
|
||||
'role' => 'ROLE_USER',
|
||||
'template' => '@ChillPerson/CRUD/edit.html.twig',
|
||||
'template' => '@ChillJob/CV/edit.html.twig',
|
||||
],
|
||||
],*/
|
||||
],
|
||||
],
|
||||
[
|
||||
'class' => ProjetProfessionnel::class,
|
||||
'controller' => CSCrudReportController::class,
|
||||
'name' => 'projet_prof',
|
||||
'base_role' => 'ROLE_USER',
|
||||
'base_path' => '/person/report/projet-professionnel',
|
||||
'form_class' => ProjetProfessionnelType::class,
|
||||
'actions' => [
|
||||
'view' => [
|
||||
'role' => 'ROLE_USER',
|
||||
'template' => '@ChillJob/ProjetProfessionnel/view.html.twig',
|
||||
],
|
||||
'new' => [
|
||||
'role' => 'ROLE_USER',
|
||||
'template' => '@ChillJob/ProjetProfessionnel/new.html.twig',
|
||||
],
|
||||
'edit' => [
|
||||
'role' => 'ROLE_USER',
|
||||
'template' => '@ChillJob/ProjetProfessionnel/edit.html.twig',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'class' => Frein::class,
|
||||
'controller' => CSCrudReportController::class,
|
||||
'name' => 'csfrein',
|
||||
'base_role' => 'ROLE_USER',
|
||||
'base_path' => '/person/report/frein',
|
||||
'form_class' => FreinType::class,
|
||||
'actions' => [
|
||||
'view' => [
|
||||
'role' => 'ROLE_USER',
|
||||
'template' => '@ChillJob/Frein/view.html.twig',
|
||||
],
|
||||
'new' => [
|
||||
'role' => 'ROLE_USER',
|
||||
'template' => '@ChillJob/Frein/new.html.twig',
|
||||
],
|
||||
'edit' => [
|
||||
'role' => 'ROLE_USER',
|
||||
'template' => '@ChillJob/Frein/edit.html.twig',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'class' => Immersion::class,
|
||||
'controller' => CSCrudReportController::class,
|
||||
'name' => 'immersion',
|
||||
'base_role' => 'ROLE_USER',
|
||||
'base_path' => '/person/report/immersion',
|
||||
'form_class' => ImmersionType::class,
|
||||
'actions' => [
|
||||
'view' => [
|
||||
'role' => 'ROLE_USER',
|
||||
'template' => '@ChillJob/Immersion/view.html.twig',
|
||||
],
|
||||
'new' => [
|
||||
'role' => 'ROLE_USER',
|
||||
'template' => '@ChillJob/Immersion/new.html.twig',
|
||||
],
|
||||
'bilan' => [
|
||||
'role' => 'ROLE_USER',
|
||||
'template' => '@ChillJob/Immersion/edit-bilan.html.twig',
|
||||
],
|
||||
'edit' => [
|
||||
'role' => 'ROLE_USER',
|
||||
'template' => '@ChillJob/Immersion/edit.html.twig',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
|
@ -92,9 +92,7 @@ class CSPersonDispositifsType extends AbstractType
|
||||
])
|
||||
->add('prescripteur', PickThirdpartyDynamicType::class, [
|
||||
'required' => false,
|
||||
// 'types' => ['prescripteur'],
|
||||
'label' => 'Prescripteur',
|
||||
// 'center' => $options['center'],
|
||||
])
|
||||
->add('dispositifsNotes', TextareaType::class, [
|
||||
'required' => false,
|
||||
|
@ -149,8 +149,6 @@ class CSPersonPersonalSituationType extends AbstractType
|
||||
'choice_label' => fn ($k) => 'handicap_recommandation.'.$k,
|
||||
])
|
||||
->add('handicapAccompagnement', PickThirdpartyDynamicType::class, [
|
||||
// 'center' => $options['center'],
|
||||
// 'types' => ['prescripteur'],
|
||||
'required' => false,
|
||||
'multiple' => false,
|
||||
])
|
||||
|
@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\JobBundle\Form;
|
||||
|
||||
use Chill\MainBundle\Form\Type\PickAddressType;
|
||||
use Chill\ThirdPartyBundle\Form\Type\PickThirdpartyDynamicType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
@ -22,7 +23,6 @@ use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||
use Chill\MainBundle\Form\Type\DateIntervalType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Chill\JobBundle\Entity\Immersion;
|
||||
use Chill\MainBundle\Form\Type\AddressType;
|
||||
|
||||
class ImmersionType extends AbstractType
|
||||
{
|
||||
@ -31,8 +31,6 @@ class ImmersionType extends AbstractType
|
||||
if ('immersion' === $options['step']) {
|
||||
$builder
|
||||
->add('entreprise', PickThirdpartyDynamicType::class, [
|
||||
'center' => $options['center'],
|
||||
'types' => ['entreprise'],
|
||||
'label' => "Identité de l'entreprise",
|
||||
'required' => true,
|
||||
'multiple' => false,
|
||||
@ -65,11 +63,9 @@ class ImmersionType extends AbstractType
|
||||
'label' => 'Email de la structure',
|
||||
'required' => false,
|
||||
])
|
||||
->add('structureAccAddress', AddressType::class, [
|
||||
->add('structureAccAddress', PickAddressType::class, [
|
||||
'label' => 'Addresse de la structure d\'accompagnement',
|
||||
'required' => false,
|
||||
'has_valid_from' => false,
|
||||
'null_if_empty' => true,
|
||||
])
|
||||
->add('posteTitle', TextType::class, [
|
||||
'label' => 'Intitulé du poste',
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
{% block title 'Dispositifs de ' ~ entity.person.firstName ~ ' ' ~ entity.person.lastName %}
|
||||
|
||||
{% block personcontent %}
|
||||
{% block content %}
|
||||
{% embed '@ChillPerson/CRUD/_edit_content.html.twig' %}
|
||||
{% block crud_content_header %}
|
||||
<h1>Dispositifs</h1>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
{% block title 'Situation personnelle de ' ~ entity.person.firstName ~ ' ' ~ entity.person.lastName %}
|
||||
|
||||
{% block personcontent %}
|
||||
{% block content %}
|
||||
{% embed '@ChillPerson/CRUD/_edit_content.html.twig' %}
|
||||
{% block crud_content_header %}
|
||||
<h1>Situation personnelle</h1>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends '@ChillPerson/layout.html.twig' %}
|
||||
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
||||
|
||||
{% set person = entity.person %}
|
||||
{% set activeRouteKey = '' %}
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block personcontent %}
|
||||
{% block content %}
|
||||
{% embed '@ChillPerson/CRUD/_edit_content.html.twig' %}
|
||||
{% block crud_content_form_rows %}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends '@ChillPerson/layout.html.twig' %}
|
||||
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
||||
|
||||
{% set person = entity.person %}
|
||||
{% set activeRouteKey = '' %}
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block personcontent %}
|
||||
{% block content %}
|
||||
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ ('crud.'~crud_name~'.title_new')|trans({'%person%': person|chill_entity_render_string }) }}</h1>
|
||||
@ -48,7 +48,7 @@
|
||||
|
||||
{% block content_form_actions_back %}
|
||||
<li class="cancel">
|
||||
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_job_report_index', {'person': entity.person.id}) }}">
|
||||
<a class="btn btn-cancel" href="{{ chill_return_path_or('chill_job_report_index', {'person': entity.person.id}) }}">
|
||||
{{ 'Cancel'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% extends '@ChillPerson/CRUD/view.html.twig' %}
|
||||
|
||||
{% block personcontent %}
|
||||
{% block content %}
|
||||
{% embed '@ChillPerson/CRUD/_view_content.html.twig' %}
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ ('crud.' ~ crud_name ~ '.title_view')|trans({'%person%': person|chill_entity_render_string }) }}</h1>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends '@ChillPerson/layout.html.twig' %}
|
||||
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
||||
|
||||
{% set person = entity.person %}
|
||||
{% set activeRouteKey = '' %}
|
||||
@ -7,7 +7,7 @@
|
||||
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
|
||||
{% endblock title %}
|
||||
|
||||
{% block personcontent %}
|
||||
{% block content %}
|
||||
{% embed '@ChillPerson/CRUD/_edit_content.html.twig' %}
|
||||
{% block content_form_actions_back %}
|
||||
<li class="cancel">
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends '@ChillPerson/layout.html.twig' %}
|
||||
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
||||
|
||||
{% set person = entity.person %}
|
||||
{% set activeRouteKey = '' %}
|
||||
@ -7,7 +7,7 @@
|
||||
{% embed('@ChillPerson/CRUD/_new_title.html.twig') %}{% endembed %}
|
||||
{% endblock %}
|
||||
|
||||
{% block personcontent %}
|
||||
{% block content %}
|
||||
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ ('crud.'~crud_name~'.title_new')|trans({'%person%': person|chill_entity_render_string }) }}</h1>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% extends '@ChillPerson/CRUD/view.html.twig' %}
|
||||
|
||||
{% block personcontent %}
|
||||
{% block content %}
|
||||
{% embed '@ChillPerson/CRUD/_view_content.html.twig' %}
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ ('crud.' ~ crud_name ~ '.title_view')|trans({'%person%': person|chill_entity_render_string }) }}</h1>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends '@ChillPerson/layout.html.twig' %}
|
||||
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
||||
|
||||
{% set person = entity.person %}
|
||||
{% set activeRouteKey = '' %}
|
||||
@ -7,7 +7,7 @@
|
||||
Bilan d'immersion
|
||||
{% endblock title %}
|
||||
|
||||
{% block personcontent %}
|
||||
{% block content %}
|
||||
{% embed '@ChillPerson/CRUD/_edit_content.html.twig' %}
|
||||
{% block crud_content_header %}
|
||||
<h1>Bilan d'immersion</h1>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends '@ChillPerson/layout.html.twig' %}
|
||||
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
||||
|
||||
{% set person = entity.person %}
|
||||
{% set activeRouteKey = '' %}
|
||||
@ -7,7 +7,7 @@
|
||||
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
|
||||
{% endblock title %}
|
||||
|
||||
{% block personcontent %}
|
||||
{% block content %}
|
||||
{% embed '@ChillPerson/CRUD/_edit_content.html.twig' %}
|
||||
{% block content_form_actions_back %}
|
||||
<li class="cancel">
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends '@ChillPerson/layout.html.twig' %}
|
||||
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
||||
|
||||
{% set person = entity.person %}
|
||||
{% set activeRouteKey = '' %}
|
||||
@ -7,7 +7,7 @@
|
||||
{% embed('@ChillPerson/CRUD/_new_title.html.twig') %}{% endembed %}
|
||||
{% endblock %}
|
||||
|
||||
{% block personcontent %}
|
||||
{% block content %}
|
||||
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ ('crud.'~crud_name~'.title_new')|trans({'%person%': person|chill_entity_render_string }) }}</h1>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% extends '@ChillPerson/CRUD/view.html.twig' %}
|
||||
|
||||
{% block personcontent %}
|
||||
{% block content %}
|
||||
{% embed '@ChillPerson/CRUD/_view_content.html.twig' %}
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ ('crud.' ~ crud_name ~ '.title_view')|trans({'%person%': person|chill_entity_render_string }) }}</h1>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends '@ChillPerson/layout.html.twig' %}
|
||||
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
||||
|
||||
{% set person = entity.person %}
|
||||
{% set activeRouteKey = '' %}
|
||||
@ -7,7 +7,7 @@
|
||||
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
|
||||
{% endblock title %}
|
||||
|
||||
{% block personcontent %}
|
||||
{% block content %}
|
||||
{% embed '@ChillPerson/CRUD/_edit_content.html.twig' %}
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ ('crud.'~crud_name~'.title_edit')|trans({'%person%': person|chill_entity_render_string }) }}</h1>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends '@ChillPerson/layout.html.twig' %}
|
||||
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
||||
|
||||
{% set person = entity.person %}
|
||||
{% set activeRouteKey = '' %}
|
||||
@ -7,7 +7,7 @@
|
||||
{% embed('@ChillPerson/CRUD/_new_title.html.twig') %}{% endembed %}
|
||||
{% endblock %}
|
||||
|
||||
{% block personcontent %}
|
||||
{% block content %}
|
||||
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ ('crud.'~crud_name~'.title_new')|trans({'%person%': person|chill_entity_render_string }) }}</h1>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% extends '@ChillPerson/CRUD/view.html.twig' %}
|
||||
|
||||
{% block personcontent %}
|
||||
{% block content %}
|
||||
{% embed '@ChillPerson/CRUD/_view_content.html.twig' %}
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ ('crud.' ~ crud_name ~ '.title_view')|trans({'%person%': person|chill_entity_render_string }) }}</h1>
|
||||
|
@ -3,7 +3,7 @@
|
||||
{% set person = entity.person %}
|
||||
{% set activeRouteKey = '' %}
|
||||
|
||||
{% block personcontent %}
|
||||
{% block content %}
|
||||
{% embed '@ChillMain/CRUD/_delete_content.html.twig' %}
|
||||
{% block content_form_actions_back %}
|
||||
<li class="cancel">
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_crud_cscv_new', {'person_id' : person.id }) }}" class="sc-button bt-new">
|
||||
<a href="{{ path('chill_crud_cscv_new', {'person_id' : person.id }) }}" class="btn btn-new">
|
||||
Nouveau CV
|
||||
</a>
|
||||
</li>
|
||||
@ -108,7 +108,7 @@
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_crud_csfrein_new', {'person_id' : person.id }) }}" class="sc-button bt-new">
|
||||
<a href="{{ path('chill_crud_csfrein_new', {'person_id' : person.id }) }}" class="btn btn-new">
|
||||
Nouveau rapport "frein"
|
||||
</a>
|
||||
</li>
|
||||
@ -166,7 +166,7 @@
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_crud_immersion_new', {'person_id' : person.id }) }}" class="sc-button bt-new">
|
||||
<a href="{{ path('chill_crud_immersion_new', {'person_id' : person.id }) }}" class="btn btn-new">
|
||||
Nouvelle immersion
|
||||
</a>
|
||||
</li>
|
||||
@ -242,7 +242,7 @@
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_crud_projet_prof_new', {'person_id' : person.id }) }}" class="sc-button bt-new">
|
||||
<a href="{{ path('chill_crud_projet_prof_new', {'person_id' : person.id }) }}" class="btn btn-new">
|
||||
Nouveau projet professionnel
|
||||
</a>
|
||||
</li>
|
||||
|
@ -24,7 +24,6 @@ final class Version20240424095147 extends AbstractMigration
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('CREATE SCHEMA chill_csconnectes');
|
||||
$this->addSql('DROP SEQUENCE chill_person_accompanying_period_work_eval_doc_id_seq CASCADE');
|
||||
$this->addSql('CREATE SEQUENCE chill_csconnectes.cv_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||
$this->addSql('CREATE SEQUENCE chill_csconnectes.cv_experience_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||
$this->addSql('CREATE SEQUENCE chill_csconnectes.cv_formation_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||
@ -107,7 +106,6 @@ final class Version20240424095147 extends AbstractMigration
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('CREATE SCHEMA public');
|
||||
$this->addSql('DROP SEQUENCE chill_csconnectes.cv_id_seq CASCADE');
|
||||
$this->addSql('DROP SEQUENCE chill_csconnectes.cv_experience_id_seq CASCADE');
|
||||
$this->addSql('DROP SEQUENCE chill_csconnectes.cv_formation_id_seq CASCADE');
|
||||
@ -155,5 +153,6 @@ final class Version20240424095147 extends AbstractMigration
|
||||
$this->addSql('DROP TABLE chill_csconnectes.projetprofessionnel_valide');
|
||||
$this->addSql('DROP TABLE chill_csconnectes.rome_appellation');
|
||||
$this->addSql('DROP TABLE chill_csconnectes.rome_metier');
|
||||
$this->addSql('DROP SCHEMA chill_csconnectes');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user