From 12a22bcc134622b80c746ad7d2e897182d4e4434 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 29 Apr 2024 14:13:37 +0200 Subject: [PATCH] template + form + property fixes for emploi reports --- .../src/Resources/config/services.yml | 4 +- .../Controller/ImmersionCrudController.php | 2 +- .../DependencyInjection/ChillJobExtension.php | 4 +- src/Bundle/ChillJobBundle/src/Entity/CV.php | 4 +- .../ChillJobBundle/src/Entity/Frein.php | 2 - .../ChillJobBundle/src/Entity/Immersion.php | 21 ++- .../ChillJobBundle/src/Form/ImmersionType.php | 5 +- .../Resources/translations/messages.fr.yml | 11 +- .../views/CSPerson/dispositifs_view.html.twig | 4 +- .../personal_situation_view.html.twig | 4 +- .../src/Resources/views/CV/edit.html.twig | 2 +- .../src/Resources/views/CV/view.html.twig | 124 +++++++++--------- .../src/Resources/views/Frein/edit.html.twig | 2 +- .../src/Resources/views/Frein/view.html.twig | 2 +- .../views/Immersion/edit-bilan.html.twig | 4 +- .../Resources/views/Immersion/edit.html.twig | 10 +- .../Resources/views/Immersion/view.html.twig | 41 ++++-- .../views/ProjetProfessionnel/edit.html.twig | 2 +- .../views/ProjetProfessionnel/view.html.twig | 2 +- .../Resources/views/Report/index.html.twig | 10 +- .../Authorization/CSConnectesVoter.php | 2 +- .../src/migrations/Version20240429111628.php | 34 +++++ 22 files changed, 175 insertions(+), 121 deletions(-) create mode 100644 src/Bundle/ChillJobBundle/src/migrations/Version20240429111628.php diff --git a/src/Bundle/ChillFranceTravailApiBundle/src/Resources/config/services.yml b/src/Bundle/ChillFranceTravailApiBundle/src/Resources/config/services.yml index cc41a540c..38d1400e1 100644 --- a/src/Bundle/ChillFranceTravailApiBundle/src/Resources/config/services.yml +++ b/src/Bundle/ChillFranceTravailApiBundle/src/Resources/config/services.yml @@ -1,7 +1,7 @@ services: Chill\FranceTravailApiBundle\ApiHelper\ApiWrapper: -# $clientId: '%pole_emploi_dev_client_id%' -# $clientSecret: '%pole_emploi_dev_client_secret%' + $clientId: '%pole_emploi_dev_client_id%' + $clientSecret: '%pole_emploi_dev_client_secret%' $redis: '@Chill\MainBundle\Redis\ChillRedis' Chill\FranceTravailApiBundle\ApiHelper\PartenaireRomeAppellation: diff --git a/src/Bundle/ChillJobBundle/src/Controller/ImmersionCrudController.php b/src/Bundle/ChillJobBundle/src/Controller/ImmersionCrudController.php index 7b5f4a07b..c4880c3f3 100644 --- a/src/Bundle/ChillJobBundle/src/Controller/ImmersionCrudController.php +++ b/src/Bundle/ChillJobBundle/src/Controller/ImmersionCrudController.php @@ -73,7 +73,7 @@ class ImmersionCrudController extends EntityPersonCRUDController * * @param int $id */ - public function editBilan(Request $request, $id): Response + public function bilan(Request $request, $id): Response { return $this->formEditAction('bilan', $request, $id); } diff --git a/src/Bundle/ChillJobBundle/src/DependencyInjection/ChillJobExtension.php b/src/Bundle/ChillJobBundle/src/DependencyInjection/ChillJobExtension.php index a855fc0a2..7e4050056 100644 --- a/src/Bundle/ChillJobBundle/src/DependencyInjection/ChillJobExtension.php +++ b/src/Bundle/ChillJobBundle/src/DependencyInjection/ChillJobExtension.php @@ -82,9 +82,9 @@ class ChillJobExtension extends Extension implements PrependExtensionInterface 'base_path' => '/person/report/cv', 'form_class' => CVType::class, 'actions' => [ - 'index' => [ + 'view' => [ 'role' => 'ROLE_USER', - 'template' => '@ChillJob/CV/index.html.twig', + 'template' => '@ChillJob/CV/view.html.twig', ], 'new' => [ 'role' => 'ROLE_USER', diff --git a/src/Bundle/ChillJobBundle/src/Entity/CV.php b/src/Bundle/ChillJobBundle/src/Entity/CV.php index 709419079..2a2e89883 100644 --- a/src/Bundle/ChillJobBundle/src/Entity/CV.php +++ b/src/Bundle/ChillJobBundle/src/Entity/CV.php @@ -76,7 +76,7 @@ class CV implements \Stringable * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(targetEntity: CV\Formation::class, mappedBy: 'CV', cascade: ['persist', 'remove', 'detach'], orphanRemoval: true)] - #[ORM\OrderBy(['startDate' => Order::Descending, 'endDate' => 'DESC'])] +// #[ORM\OrderBy(['startDate' => Order::Descending, 'endDate' => 'DESC'])] private Collection $formations; /** @@ -85,7 +85,7 @@ class CV implements \Stringable * @var \Doctrine\Common\Collections\Collection */ #[ORM\OneToMany(targetEntity: CV\Experience::class, mappedBy: 'CV', cascade: ['persist', 'remove', 'detach'], orphanRemoval: true)] - #[ORM\OrderBy(['startDate' => Order::Descending, 'endDate' => 'DESC'])] +// #[ORM\OrderBy(['startDate' => Order::Descending, 'endDate' => 'DESC'])] private Collection $experiences; #[ORM\ManyToOne(targetEntity: Person::class)] diff --git a/src/Bundle/ChillJobBundle/src/Entity/Frein.php b/src/Bundle/ChillJobBundle/src/Entity/Frein.php index 4236e4aec..a145aac34 100644 --- a/src/Bundle/ChillJobBundle/src/Entity/Frein.php +++ b/src/Bundle/ChillJobBundle/src/Entity/Frein.php @@ -32,8 +32,6 @@ class Frein implements HasPerson, \Stringable /** * @Assert\NotNull() * - * @Assert\Date() - * * @Assert\GreaterThan("5 years ago", * message="La date du rapport ne peut pas être plus de cinq ans dans le passé" * ) diff --git a/src/Bundle/ChillJobBundle/src/Entity/Immersion.php b/src/Bundle/ChillJobBundle/src/Entity/Immersion.php index 94137a34a..8c4e10baf 100644 --- a/src/Bundle/ChillJobBundle/src/Entity/Immersion.php +++ b/src/Bundle/ChillJobBundle/src/Entity/Immersion.php @@ -17,6 +17,7 @@ use Chill\ThirdPartyBundle\Entity\ThirdParty; use Chill\PersonBundle\Entity\Person; use Chill\MainBundle\Entity\User; use Chill\MainBundle\Entity\Address; +use libphonenumber\PhoneNumber; use Symfony\Component\Validator\Constraints as Assert; use Chill\MainBundle\Validation\Constraint\PhonenumberConstraint; @@ -84,16 +85,16 @@ class Immersion implements \Stringable * * @Assert\NotBlank() */ - #[ORM\Column(name: 'tuteurPhoneNumber', type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)] + #[ORM\Column(name: 'tuteurPhoneNumber', type: 'phone_number', nullable: true)] #[PhonenumberConstraint(type: 'any')] - private ?string $tuteurPhoneNumber = null; + private ?PhoneNumber $tuteurPhoneNumber = null; #[ORM\Column(name: 'structureAccName', type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)] private ?string $structureAccName = null; - #[ORM\Column(name: 'structureAccPhonenumber', type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)] + #[ORM\Column(name: 'structureAccPhonenumber', type: 'phone_number', nullable: true)] #[PhonenumberConstraint(type: 'any')] - private ?string $structureAccPhonenumber = null; + private ?PhoneNumber $structureAccPhonenumber = null; #[ORM\Column(name: 'structureAccEmail', type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)] private ?string $structureAccEmail = null; @@ -361,7 +362,7 @@ class Immersion implements \Stringable * * @return Immersion */ - public function setTuteurPhoneNumber(?string $tuteurPhoneNumber = null) + public function setTuteurPhoneNumber(?PhoneNumber $tuteurPhoneNumber = null) { $this->tuteurPhoneNumber = $tuteurPhoneNumber; @@ -370,10 +371,8 @@ class Immersion implements \Stringable /** * Get tuteurPhoneNumber. - * - * @return string|null */ - public function getTuteurPhoneNumber() + public function getTuteurPhoneNumber(): ?PhoneNumber { return $this->tuteurPhoneNumber; } @@ -405,7 +404,7 @@ class Immersion implements \Stringable * * @return Immersion */ - public function setStructureAccPhonenumber(?string $structureAccPhonenumber) + public function setStructureAccPhonenumber(?PhoneNumber $structureAccPhonenumber) { $this->structureAccPhonenumber = $structureAccPhonenumber; @@ -414,10 +413,8 @@ class Immersion implements \Stringable /** * Get structureAccPhonenumber. - * - * @return string */ - public function getStructureAccPhonenumber() + public function getStructureAccPhonenumber(): ?PhoneNumber { return $this->structureAccPhonenumber; } diff --git a/src/Bundle/ChillJobBundle/src/Form/ImmersionType.php b/src/Bundle/ChillJobBundle/src/Form/ImmersionType.php index e9414902c..4ad8e9ad0 100644 --- a/src/Bundle/ChillJobBundle/src/Form/ImmersionType.php +++ b/src/Bundle/ChillJobBundle/src/Form/ImmersionType.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\JobBundle\Form; +use Chill\MainBundle\Form\Type\ChillPhoneNumberType; use Chill\MainBundle\Form\Type\PickAddressType; use Chill\ThirdPartyBundle\Form\Type\PickThirdpartyDynamicType; use Symfony\Component\Form\AbstractType; @@ -47,7 +48,7 @@ class ImmersionType extends AbstractType 'label' => 'Fonction du tuteur', 'required' => true, ]) - ->add('tuteurPhoneNumber', TextType::class, [ + ->add('tuteurPhoneNumber', ChillPhoneNumberType::class, [ 'label' => 'Téléphone du tuteur', 'required' => true, ]) @@ -55,7 +56,7 @@ class ImmersionType extends AbstractType 'label' => 'Nom de la structure', 'required' => false, ]) - ->add('structureAccPhonenumber', TextType::class, [ + ->add('structureAccPhonenumber', ChillPhoneNumberType::class, [ 'label' => 'Téléphone de la structure', 'required' => false, ]) diff --git a/src/Bundle/ChillJobBundle/src/Resources/translations/messages.fr.yml b/src/Bundle/ChillJobBundle/src/Resources/translations/messages.fr.yml index 9f9e652bd..94cd10a0d 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/translations/messages.fr.yml +++ b/src/Bundle/ChillJobBundle/src/Resources/translations/messages.fr.yml @@ -175,13 +175,13 @@ projet_prof: note: "Notes" souhait: code: "Codes souhaits" - - + + chill_3party: key_label: prescripteur: Prescripteur entreprise: Entreprise - + crud: csfrein: title_new: Nouveau rapport "frein" pour %person% @@ -197,6 +197,9 @@ crud: title_delete: Supprimer un CV button_delete: Supprimer confirm_message_delete: Supprimer le %as_string% ? + no_date: Aucune date indiquée + no_end_date: date de fin inconnue + no_start_date: date de début inconnue immersion: title_new: Nouvelle immersion pour %person% title_view: Immersion pour %person% @@ -247,4 +250,4 @@ findernieremploidate: "Date de fin dernier emploi" CHILL_CSCONNECTES_REPORT_NEW: Création et modification des rapports CSConnectes CHILL_CSCONNECTES_REPORT_DELETE: Suppression des rapports CSConnectes CHILL_CSCONNECTES_REPORT_CV: Création et modification des rapports CSConnectes (CV uniquement) -CHILL_CSCONNECTES_EXPORTS: Exports CSConnectes \ No newline at end of file +CHILL_CSCONNECTES_EXPORTS: Exports CSConnectes diff --git a/src/Bundle/ChillJobBundle/src/Resources/views/CSPerson/dispositifs_view.html.twig b/src/Bundle/ChillJobBundle/src/Resources/views/CSPerson/dispositifs_view.html.twig index a2e8ecb8a..976f36e5b 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/views/CSPerson/dispositifs_view.html.twig +++ b/src/Bundle/ChillJobBundle/src/Resources/views/CSPerson/dispositifs_view.html.twig @@ -105,10 +105,10 @@
IEJ
{% if entity.dateContratIEJ != null %} -

Date du contrat IEJ : {{ entity.dateContratIEJ|format_date('long', 'none') }}

+

Date du contrat IEJ : {{ entity.dateContratIEJ|format_date('short') }}

{% endif %} {% if entity.dateAvenantIEJ != null %} -

Date de l'avenant IEJ : {{ entity.dateAvenantIEJ|format_date('long', 'none') }}

+

Date de l'avenant IEJ : {{ entity.dateAvenantIEJ|format_date('short') }}

{% endif %}
{% endif %} diff --git a/src/Bundle/ChillJobBundle/src/Resources/views/CSPerson/personal_situation_view.html.twig b/src/Bundle/ChillJobBundle/src/Resources/views/CSPerson/personal_situation_view.html.twig index 8409fcffc..22b37ce54 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/views/CSPerson/personal_situation_view.html.twig +++ b/src/Bundle/ChillJobBundle/src/Resources/views/CSPerson/personal_situation_view.html.twig @@ -132,7 +132,7 @@
Date de fin du dernier emploi
{% if entity.dateFinDernierEmploi is not null %} -
{{ entity.dateFinDernierEmploi|format_date('medium', 'none') }} +
{{ entity.dateFinDernierEmploi|format_date('short') }} {% else %}
{{ null|chill_print_or_message }}
{% endif %} @@ -175,7 +175,7 @@
Date du premier versement
{% if entity.ressourceDate1Versement is not null %} -
{{ entity.ressourceDate1Versement|format_date('medium', 'none') }} +
{{ entity.ressourceDate1Versement|format_date('short') }} {% else %}
{{ null|chill_print_or_message }}
{% endif %} diff --git a/src/Bundle/ChillJobBundle/src/Resources/views/CV/edit.html.twig b/src/Bundle/ChillJobBundle/src/Resources/views/CV/edit.html.twig index aabbef4e4..ddd16f9bf 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/views/CV/edit.html.twig +++ b/src/Bundle/ChillJobBundle/src/Resources/views/CV/edit.html.twig @@ -25,7 +25,7 @@ {% endblock %} {% block content %} -{% embed '@ChillPerson/CRUD/_edit_content.html.twig' %} +{% embed '@ChillMain/CRUD/_edit_content.html.twig' %} {% block crud_content_form_rows %} diff --git a/src/Bundle/ChillJobBundle/src/Resources/views/CV/view.html.twig b/src/Bundle/ChillJobBundle/src/Resources/views/CV/view.html.twig index c4db35bb9..cae02a387 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/views/CV/view.html.twig +++ b/src/Bundle/ChillJobBundle/src/Resources/views/CV/view.html.twig @@ -9,7 +9,7 @@ {% block crud_content_view_details %}
Date du rapport
-
{{ entity.reportDate|format_date('long', 'none') }}
+
{{ entity.reportDate|format_date('short') }}

Compétences

@@ -39,78 +39,80 @@

Formations suivies

-
- {% for f in entity.formations %} -
-

{{ f.title }}{% if f.organisme is not empty %} auprès de {{ f.organisme }}{% endif %}

+ {% if entity.formations|length > 0 %} + {% for f in entity.formations %} +
+
+

{{ f.title }}{% if f.organisme is not empty %} auprès de {{ f.organisme }}{% endif %}

-
+
-
Dates de formation
-
- {% if f.startDate is null and f.endDate is null %} - {{ null|chill_print_or_message("Aucune date indiquée") }} - {% elseif f.startDate is null %} - Jusqu'au {{ f.endDate|format_date('long', 'none') }} (date de début inconnue) - {% elseif f.endDate is null %} - Depuis le {{ f.startDate|format_date('long', 'none') }} (date de fin inconnue) - {% else %} - Du {{ f.startDate|format_date('long', 'none') }} au {{ f.endDate|format_date('long', 'none') }} - {% endif %} -
+
Dates de formation
+
+ {% if f.startDate is null and f.endDate is null %} + {{ null|chill_print_or_message("Aucune date indiquée") }} + {% elseif f.startDate is null %} + Jusqu'au {{ f.endDate|format_date('short') }} (date de début inconnue) + {% elseif f.endDate is null %} + Depuis le {{ f.startDate|format_date('short') }} (date de fin inconnue) + {% else %} + Du {{ f.startDate|format_date('short') }} au {{ f.endDate|format_date('short') }} + {% endif %} +
-
Diplôme
-
-

Diplôme obtenu: {{ (f.diplomaObtained is null ? null : ('diploma_obtained.' ~ f.diplomaObtained))|chill_print_or_message("Aucune information") }}

-

Diplôme reconnu en France: {{ (f.diplomaReconnue is null ? null : ('diploma_reconnu.' ~ f.diplomaReconnue))|chill_print_or_message("Aucune information") }}

-
-
-
+
Diplôme
+
+

Diplôme obtenu: {{ (f.diplomaObtained is null ? null : ('diploma_obtained.' ~ f.diplomaObtained))|chill_print_or_message("Aucune information") }}

+

Diplôme reconnu en France: {{ (f.diplomaReconnue is null ? null : ('diploma_reconnu.' ~ f.diplomaReconnue))|chill_print_or_message("Aucune information") }}

+
+
+ + + {% endfor %} {% else %} -

Aucune formation renseignée

- {% endfor %} - + {{ 'No education'|trans }} + {% endif %}

Expériences

-
- {% for f in entity.experiences %} -
-

{{ f.poste }} {% if f.structure is not empty %}auprès de {{ f.structure }}{% endif %}

+ {% if entity.formations|length > 0 %} + {% for f in entity.experiences %} +
+
+

{{ f.poste }} {% if f.structure is not empty %}auprès de {{ f.structure }}{% endif %}

-
+
+
Dates de l'expérience
+
+ {% if f.startDate is null and f.endDate is null %} + {{ null|chill_print_or_message("Aucune date indiquée") }} + {% elseif f.startDate is null %} + Jusqu'au {{ f.endDate|format_date('short') }} (date de début inconnue) + {% elseif f.endDate is null %} + Depuis le {{ f.startDate|format_date('short') }} (date de fin inconnue) + {% else %} + Du {{ f.startDate|format_date('short') }} au {{ f.endDate|format_date('short') }} + {% endif %} +
-
Dates de l'expérience
-
- {% if f.startDate is null and f.endDate is null %} - {{ null|chill_print_or_message("Aucune date indiquée") }} - {% elseif f.startDate is null %} - Jusqu'au {{ f.endDate|format_date('long', 'none') }} (date de début inconnue) - {% elseif f.endDate is null %} - Depuis le {{ f.startDate|format_date('long', 'none') }} (date de fin inconnue) - {% else %} - Du {{ f.startDate|format_date('long', 'none') }} au {{ f.endDate|format_date('long', 'none') }} - {% endif %} -
+
Type de contrat
+
+ {{ (f.contratType is null ? null : ('xp_contrat_type.'~f.contratType))|chill_print_or_message }} +
-
Type de contrat
-
- {{ (f.contratType is null ? null : ('xp_contrat_type.'~f.contratType))|chill_print_or_message }} -
- - {% if f.notes is not empty %} -
Notes
-
- {{ f.notes|chill_print_or_message(null, 'blockquote') }} -
- {% endif %} -
-
+ {% if f.notes is not empty %} +
Notes
+
+ {{ f.notes|chill_print_or_message(null, 'blockquote') }} +
+ {% endif %} + +
+
+ {% endfor %} {% else %}

Aucune formation renseignée

- {% endfor %} -
- + {% endif %}

Note

diff --git a/src/Bundle/ChillJobBundle/src/Resources/views/Frein/edit.html.twig b/src/Bundle/ChillJobBundle/src/Resources/views/Frein/edit.html.twig index f18c0e964..a7feeeca5 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/views/Frein/edit.html.twig +++ b/src/Bundle/ChillJobBundle/src/Resources/views/Frein/edit.html.twig @@ -8,7 +8,7 @@ {% endblock title %} {% block content %} -{% embed '@ChillPerson/CRUD/_edit_content.html.twig' %} +{% embed '@ChillMain/CRUD/_edit_content.html.twig' %} {% block content_form_actions_back %}
  • diff --git a/src/Bundle/ChillJobBundle/src/Resources/views/Frein/view.html.twig b/src/Bundle/ChillJobBundle/src/Resources/views/Frein/view.html.twig index 04cd6e152..a5ef2b350 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/views/Frein/view.html.twig +++ b/src/Bundle/ChillJobBundle/src/Resources/views/Frein/view.html.twig @@ -9,7 +9,7 @@ {% block crud_content_view_details %}
    Date du rapport
    -
    {{ entity.reportDate|format_date('long', 'none') }}
    +
    {{ entity.reportDate|format_date('long') }}
    Freins identifiés
    diff --git a/src/Bundle/ChillJobBundle/src/Resources/views/Immersion/edit-bilan.html.twig b/src/Bundle/ChillJobBundle/src/Resources/views/Immersion/edit-bilan.html.twig index 6c7f2ddb6..f126bcf40 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/views/Immersion/edit-bilan.html.twig +++ b/src/Bundle/ChillJobBundle/src/Resources/views/Immersion/edit-bilan.html.twig @@ -8,7 +8,7 @@ Bilan d'immersion {% endblock title %} {% block content %} -{% embed '@ChillPerson/CRUD/_edit_content.html.twig' %} +{% embed '@ChillMain/CRUD/_edit_content.html.twig' %} {% block crud_content_header %}

    Bilan d'immersion

    {% endblock crud_content_header %} @@ -23,7 +23,7 @@ Bilan d'immersion {% block crud_content_form_rows %}

    - Immersion du {{ entity.debutDate|format_date('long', 'none') }} au {{ entity.getDateEndComputed|format_date('long', 'none') }}, + Immersion du {{ entity.debutDate|format_date('long') }} au {{ entity.getDateEndComputed|format_date('long') }}, auprès de

    {{ entity.entreprise.name }}
    Domaine d'activité: {{ entity.domaineActivite }}

    diff --git a/src/Bundle/ChillJobBundle/src/Resources/views/Immersion/edit.html.twig b/src/Bundle/ChillJobBundle/src/Resources/views/Immersion/edit.html.twig index f817dbc19..e327ddad3 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/views/Immersion/edit.html.twig +++ b/src/Bundle/ChillJobBundle/src/Resources/views/Immersion/edit.html.twig @@ -3,12 +3,16 @@ {% set person = entity.person %} {% set activeRouteKey = '' %} +{% block css %} + {{ encore_entry_link_tags('mod_pickentity_type') }} +{% endblock %} + {% block title %} {% include('@ChillMain/CRUD/_edit_title.html.twig') %} {% endblock title %} {% block content %} -{% embed '@ChillPerson/CRUD/_edit_content.html.twig' %} +{% embed '@ChillMain/CRUD/_edit_content.html.twig' %} {% block content_form_actions_back %}
  • @@ -61,5 +65,7 @@ {% endblock %} {% block js %} - + {{ parent() }} + {{ encore_entry_script_tags('mod_pickentity_type') }} + {% endblock %} diff --git a/src/Bundle/ChillJobBundle/src/Resources/views/Immersion/view.html.twig b/src/Bundle/ChillJobBundle/src/Resources/views/Immersion/view.html.twig index 70d0f3f28..3dda01fbd 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/views/Immersion/view.html.twig +++ b/src/Bundle/ChillJobBundle/src/Resources/views/Immersion/view.html.twig @@ -29,21 +29,34 @@ {% if entity.tuteurPhoneNumber is not empty %}
    Téléphone du tuteur
    -
    {{ entity.tuteurPhoneNumber|chill_format_phonenumber }}
    +

    {{ entity.tuteurPhoneNumber|chill_format_phonenumber }}

    {% endif %}

    Structure d'accompagnement

    -
    - {% for el in ['structureAccName', 'structureAccPhonenumber', 'structureAccEmail'] %} - {% set el_data = attribute(entity, el) %} - {% if el_data is not empty %}{{ el_data }}
    {% endif %} - {% endfor %} - {% if entity.structureAccAddress is not empty %} - {{ macro_address._render(entity.structureAccAddress, { 'with_valid_from': false }) }} - {% endif %} -
    +
    Nom de la structure
    +
    {{ entity.structureAccName }}
    + +
    Addresse mail de la structure
    +
    {{ entity.structureAccEmail }}
    + + {% if entity.structureAccPhonenumber is not empty %} +
    Téléphone de la structure
    +
    +

    {{ entity.structureAccPhonenumber|chill_format_phonenumber }}

    +
    + {% endif %} + +{#
    #} +{# {% for el in ['structureAccName', 'structureAccPhonenumber', 'structureAccEmail'] %}#} +{# {% set el_data = attribute(entity, el) %}#} +{# {% if el_data is not empty %}{{ el_data }}
    {% endif %}#} +{# {% endfor %}#} +{# {% if entity.structureAccAddress is not empty %}#} +{# {{ macro_address._render(entity.structureAccAddress, { 'with_valid_from': false }) }}#} +{# {% endif %}#} +{#
    #}

    Poste occupé

    @@ -54,8 +67,8 @@
    {{ entity.posteLieu|chill_print_or_message }}
    Dates
    -
    Du {{ entity.debutDate|format_date('long', 'none') }} - au {{ entity.getDateEndComputed|format_date('long', 'none') }} +
    Du {{ entity.debutDate|format_date('long') }} + au {{ entity.getDateEndComputed|format_date('long') }}
    Horaire
    @@ -135,7 +148,7 @@
    {% set attr = attribute(entity, line[0]) %} {% if attr != null %} - {% if attr in constant('CSConnectes\\SPBundle\\Entity\\Immersion::YES_NO_NSP') %} + {% if attr in constant('Chill\\JobBundle\\Entity\\Immersion::YES_NO_NSP') %} {{ ('immersion_nsp.'~attr)|trans }} {% else %} {{ ('immersion_' ~ line[0] ~ '.' ~ attr)|trans }} @@ -195,7 +208,7 @@ {% endblock %} {% block content_view_actions_after %}
  • - + Bilan diff --git a/src/Bundle/ChillJobBundle/src/Resources/views/ProjetProfessionnel/edit.html.twig b/src/Bundle/ChillJobBundle/src/Resources/views/ProjetProfessionnel/edit.html.twig index e38cbf480..ec58011b2 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/views/ProjetProfessionnel/edit.html.twig +++ b/src/Bundle/ChillJobBundle/src/Resources/views/ProjetProfessionnel/edit.html.twig @@ -8,7 +8,7 @@ {% endblock title %} {% block content %} -{% embed '@ChillPerson/CRUD/_edit_content.html.twig' %} +{% embed '@ChillMain/CRUD/_edit_content.html.twig' %} {% block crud_content_header %}

    {{ ('crud.'~crud_name~'.title_edit')|trans({'%person%': person|chill_entity_render_string }) }}

    {% endblock crud_content_header %} diff --git a/src/Bundle/ChillJobBundle/src/Resources/views/ProjetProfessionnel/view.html.twig b/src/Bundle/ChillJobBundle/src/Resources/views/ProjetProfessionnel/view.html.twig index 75687f70f..535a77a20 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/views/ProjetProfessionnel/view.html.twig +++ b/src/Bundle/ChillJobBundle/src/Resources/views/ProjetProfessionnel/view.html.twig @@ -9,7 +9,7 @@ {% block crud_content_view_details %}
    Date
    -
    {{ entity.reportDate|format_date('long', 'none') }}
    +
    {{ entity.reportDate|format_date('long') }}

    Souhaits

    diff --git a/src/Bundle/ChillJobBundle/src/Resources/views/Report/index.html.twig b/src/Bundle/ChillJobBundle/src/Resources/views/Report/index.html.twig index a88fb6b29..2abe8d57a 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/views/Report/index.html.twig +++ b/src/Bundle/ChillJobBundle/src/Resources/views/Report/index.html.twig @@ -22,7 +22,7 @@ {% for cv in cvs %} - {{ cv.reportDate|format_date('short', 'none') }} + {{ cv.reportDate|format_date('short') }}
    • @@ -70,7 +70,7 @@ {% for frein in freins %} - {{ frein.reportDate|format_date('short', 'none') }} + {{ frein.reportDate|format_date('short') }} {% if frein.freinsPerso|merge(frein.freinsEmploi)|length > 0 %}
        @@ -133,7 +133,7 @@ {% for im in immersions %} - {{ im.debutDate|format_date('short', 'none') }} + {{ im.debutDate|format_date('short') }} {{ im.entreprise.name }} @@ -146,7 +146,7 @@
      • - +
      • @@ -192,7 +192,7 @@ {% for pr in projet_professionnels %} - {{ pr.reportDate|format_date('short', 'none') }} + {{ pr.reportDate|format_date('short') }} {% set romes = [] %} {% if pr.valide|length > 0 %} diff --git a/src/Bundle/ChillJobBundle/src/Security/Authorization/CSConnectesVoter.php b/src/Bundle/ChillJobBundle/src/Security/Authorization/CSConnectesVoter.php index 94f800c7f..dc7e651d4 100644 --- a/src/Bundle/ChillJobBundle/src/Security/Authorization/CSConnectesVoter.php +++ b/src/Bundle/ChillJobBundle/src/Security/Authorization/CSConnectesVoter.php @@ -25,7 +25,7 @@ use Chill\MainBundle\Security\Authorization\AuthorizationHelper; /** * check ACL for CSConnectes. */ -class CSConnectesVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface, VoterInterface +class CSConnectesVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface { public const REPORT_NEW = 'CHILL_CSCONNECTES_REPORT_NEW'; public const REPORT_CV = 'CHILL_CSCONNECTES_REPORT_CV'; diff --git a/src/Bundle/ChillJobBundle/src/migrations/Version20240429111628.php b/src/Bundle/ChillJobBundle/src/migrations/Version20240429111628.php new file mode 100644 index 000000000..9ff81cce4 --- /dev/null +++ b/src/Bundle/ChillJobBundle/src/migrations/Version20240429111628.php @@ -0,0 +1,34 @@ +addSql('ALTER TABLE chill_csconnectes.immersion ALTER tuteurphonenumber TYPE VARCHAR(35)'); + $this->addSql('COMMENT ON COLUMN chill_csconnectes.immersion.tuteurPhoneNumber IS \'(DC2Type:phone_number)\''); + + $this->addSql('ALTER TABLE chill_csconnectes.immersion ALTER structureAccPhonenumber TYPE VARCHAR(35)'); + $this->addSql('COMMENT ON COLUMN chill_csconnectes.immersion.structureAccPhonenumber IS \'(DC2Type:phone_number)\''); + } + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE chill_csconnectes.immersion ALTER tuteurPhoneNumber TYPE TEXT'); + $this->addSql('COMMENT ON COLUMN chill_csconnectes.immersion.tuteurphonenumber IS NULL'); + + $this->addSql('ALTER TABLE chill_csconnectes.immersion ALTER structureAccPhonenumber TYPE TEXT'); + $this->addSql('COMMENT ON COLUMN chill_csconnectes.immersion.structureAccPhonenumber IS NULL'); + } +}