template + form + property fixes for emploi reports

This commit is contained in:
Julie Lenaerts 2024-04-29 14:13:37 +02:00
parent cba8a342d5
commit 12a22bcc13
22 changed files with 175 additions and 121 deletions

View File

@ -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:

View File

@ -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);
}

View File

@ -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',

View File

@ -76,7 +76,7 @@ class CV implements \Stringable
* @var \Doctrine\Common\Collections\Collection<int, \Chill\JobBundle\Entity\CV\Formation>
*/
#[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<int, \Chill\JobBundle\Entity\CV\Experience>
*/
#[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)]

View File

@ -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é"
* )

View File

@ -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;
}

View File

@ -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,
])

View File

@ -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
CHILL_CSCONNECTES_EXPORTS: Exports CSConnectes

View File

@ -105,10 +105,10 @@
<dt>IEJ</dt>
<dd>
{% if entity.dateContratIEJ != null %}
<p>Date du contrat IEJ&nbsp;: {{ entity.dateContratIEJ|format_date('long', 'none') }}</p>
<p>Date du contrat IEJ&nbsp;: {{ entity.dateContratIEJ|format_date('short') }}</p>
{% endif %}
{% if entity.dateAvenantIEJ != null %}
<p>Date de l'avenant IEJ&nbsp;: {{ entity.dateAvenantIEJ|format_date('long', 'none') }}</p>
<p>Date de l'avenant IEJ&nbsp;: {{ entity.dateAvenantIEJ|format_date('short') }}</p>
{% endif %}
</dd>
{% endif %}

View File

@ -132,7 +132,7 @@
<dt>Date de fin du dernier emploi</dt>
{% if entity.dateFinDernierEmploi is not null %}
<dd>{{ entity.dateFinDernierEmploi|format_date('medium', 'none') }}
<dd>{{ entity.dateFinDernierEmploi|format_date('short') }}
{% else %}
<dd>{{ null|chill_print_or_message }}</dd>
{% endif %}
@ -175,7 +175,7 @@
<dt>Date du premier versement</dt>
{% if entity.ressourceDate1Versement is not null %}
<dd>{{ entity.ressourceDate1Versement|format_date('medium', 'none') }}
<dd>{{ entity.ressourceDate1Versement|format_date('short') }}
{% else %}
<dd>{{ null|chill_print_or_message }}</dd>
{% endif %}

View File

@ -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 %}

View File

@ -9,7 +9,7 @@
{% block crud_content_view_details %}
<dl class="chill_view_data">
<dt>Date du rapport</dt>
<dd>{{ entity.reportDate|format_date('long', 'none') }}</dd>
<dd>{{ entity.reportDate|format_date('short') }}</dd>
<h2>Compétences</h2>
@ -39,78 +39,80 @@
<h3>Formations suivies</h3>
<div class="csconnectes__cv-view__formations">
{% for f in entity.formations %}
<div class="csconnectes__cv-view__formations__formation">
<h4>{{ f.title }}{% if f.organisme is not empty %} <span style="font-size: 85%;">auprès de <span style="font-style: italic;">{{ f.organisme }}</span></span>{% endif %}</h4>
{% if entity.formations|length > 0 %}
{% for f in entity.formations %}
<div class="flex-table">
<div class="csconnectes__cv-view__formations__formation">
<h4>{{ f.title }}{% if f.organisme is not empty %} <span style="font-size: 85%;">auprès de <span style="font-style: italic;">{{ f.organisme }}</span></span>{% endif %}</h4>
<dl class="chill_view_data">
<dl class="chill_view_data">
<dt>Dates de formation</dt>
<dd>
{% 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') }} <span class="chill-no-data-statement">(date de début inconnue)</span>
{% elseif f.endDate is null %}
Depuis le {{ f.startDate|format_date('long', 'none') }} <span class="chill-no-data-statement">(date de fin inconnue)</span>
{% else %}
Du {{ f.startDate|format_date('long', 'none') }} au {{ f.endDate|format_date('long', 'none') }}
{% endif %}
</dd>
<dt>Dates de formation</dt>
<dd>
{% 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') }} <span class="chill-no-data-statement">(date de début inconnue)</span>
{% elseif f.endDate is null %}
Depuis le {{ f.startDate|format_date('short') }} <span class="chill-no-data-statement">(date de fin inconnue)</span>
{% else %}
Du {{ f.startDate|format_date('short') }} au {{ f.endDate|format_date('short') }}
{% endif %}
</dd>
<dt>Diplôme</dt>
<dd>
<p>Diplôme obtenu: {{ (f.diplomaObtained is null ? null : ('diploma_obtained.' ~ f.diplomaObtained))|chill_print_or_message("Aucune information") }}</p>
<p>Diplôme reconnu en France: {{ (f.diplomaReconnue is null ? null : ('diploma_reconnu.' ~ f.diplomaReconnue))|chill_print_or_message("Aucune information") }}</p>
</dd>
</dl>
</div>
<dt>Diplôme</dt>
<dd>
<p>Diplôme obtenu: {{ (f.diplomaObtained is null ? null : ('diploma_obtained.' ~ f.diplomaObtained))|chill_print_or_message("Aucune information") }}</p>
<p>Diplôme reconnu en France: {{ (f.diplomaReconnue is null ? null : ('diploma_reconnu.' ~ f.diplomaReconnue))|chill_print_or_message("Aucune information") }}</p>
</dd>
</dl>
</div>
</div>
{% endfor %}
{% else %}
<p class="chill-no-data-statement">Aucune formation renseignée</p>
{% endfor %}
</div>
<span class="chill-no-data-statement">{{ 'No education'|trans }}</span>
{% endif %}
<h3>Expériences</h3>
<div class="csconnectes__cv-view__experiences">
{% for f in entity.experiences %}
<div class="">
<h4>{{ f.poste }} {% if f.structure is not empty %}<span style="font-size: 85%;">auprès de <span style=" font-style: italic;">{{ f.structure }}</span></span>{% endif %}</h4>
{% if entity.formations|length > 0 %}
{% for f in entity.experiences %}
<div class="flex-table">
<div class="csconnectes__cv-view__experiences_experience">
<h4>{{ f.poste }} {% if f.structure is not empty %}<span style="font-size: 85%;">auprès de <span style=" font-style: italic;">{{ f.structure }}</span></span>{% endif %}</h4>
<dl class="chill_view_data">
<dl class="chill_view_data">
<dt>Dates de l'expérience</dt>
<dd>
{% 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') }} <span class="chill-no-data-statement">(date de début inconnue)</span>
{% elseif f.endDate is null %}
Depuis le {{ f.startDate|format_date('short') }} <span class="chill-no-data-statement">(date de fin inconnue)</span>
{% else %}
Du {{ f.startDate|format_date('short') }} au {{ f.endDate|format_date('short') }}
{% endif %}
</dd>
<dt>Dates de l'expérience</dt>
<dd>
{% 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') }} <span class="chill-no-data-statement">(date de début inconnue)</span>
{% elseif f.endDate is null %}
Depuis le {{ f.startDate|format_date('long', 'none') }} <span class="chill-no-data-statement">(date de fin inconnue)</span>
{% else %}
Du {{ f.startDate|format_date('long', 'none') }} au {{ f.endDate|format_date('long', 'none') }}
{% endif %}
</dd>
<dt>Type de contrat</dt>
<dd>
{{ (f.contratType is null ? null : ('xp_contrat_type.'~f.contratType))|chill_print_or_message }}
</dd>
<dt>Type de contrat</dt>
<dd>
{{ (f.contratType is null ? null : ('xp_contrat_type.'~f.contratType))|chill_print_or_message }}
</dd>
{% if f.notes is not empty %}
<dt>Notes</dt>
<dd>
{{ f.notes|chill_print_or_message(null, 'blockquote') }}
</dd>
{% endif %}
</dl>
</div>
{% if f.notes is not empty %}
<dt>Notes</dt>
<dd>
{{ f.notes|chill_print_or_message(null, 'blockquote') }}
</dd>
{% endif %}
</dl>
</div>
</div>
{% endfor %}
{% else %}
<p class="chill-no-data-statement">Aucune formation renseignée</p>
{% endfor %}
</div>
{% endif %}
<h3>Note</h3>

View File

@ -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 %}
<li class="cancel">
<a class="btn btn-cancel" href="{{ chill_return_path_or('chill_job_report_index', {'person': entity.person.id}) }}">

View File

@ -9,7 +9,7 @@
{% block crud_content_view_details %}
<dl class="chill_view_data">
<dt>Date du rapport</dt>
<dd>{{ entity.reportDate|format_date('long', 'none') }}</dd>
<dd>{{ entity.reportDate|format_date('long') }}</dd>
<dt>Freins identifiés</dt>
<dd>

View File

@ -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 %}
<h1>Bilan d'immersion</h1>
{% endblock crud_content_header %}
@ -23,7 +23,7 @@ Bilan d'immersion
{% block crud_content_form_rows %}
<p>
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 <pre>{{ entity.entreprise.name }}</pre>
Domaine d'activité: {{ entity.domaineActivite }}
<br/><br/>

View File

@ -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 %}
<li class="cancel">
<a class="btn btn-cancel" href="{{ chill_return_path_or('chill_job_report_index', {'person': entity.person.id}) }}">
@ -61,5 +65,7 @@
{% endblock %}
{% block js %}
<script type="text/javascript" src="{{ asset('build/immersion_edit.js') }}"></script>
{{ parent() }}
{{ encore_entry_script_tags('mod_pickentity_type') }}
<script type="text/javascript" src="{{ asset('build/immersion_edit.js') }}"></script>
{% endblock %}

View File

@ -29,21 +29,34 @@
{% if entity.tuteurPhoneNumber is not empty %}
<dt>Téléphone du tuteur</dt>
<dd>
<a href="tel:{{ entity.tuteurPhoneNumber }}"><pre>{{ entity.tuteurPhoneNumber|chill_format_phonenumber }}</pre></a>
<p>{{ entity.tuteurPhoneNumber|chill_format_phonenumber }}</p>
</dd>
{% endif %}
<h2>Structure d'accompagnement</h2>
<dd>
{% for el in ['structureAccName', 'structureAccPhonenumber', 'structureAccEmail'] %}
{% set el_data = attribute(entity, el) %}
{% if el_data is not empty %}{{ el_data }}<br/>{% endif %}
{% endfor %}
{% if entity.structureAccAddress is not empty %}
{{ macro_address._render(entity.structureAccAddress, { 'with_valid_from': false }) }}
{% endif %}
</dd>
<dt>Nom de la structure</dt>
<dd>{{ entity.structureAccName }}</dd>
<dt>Addresse mail de la structure</dt>
<dd>{{ entity.structureAccEmail }}</dd>
{% if entity.structureAccPhonenumber is not empty %}
<dt>Téléphone de la structure</dt>
<dd>
<p>{{ entity.structureAccPhonenumber|chill_format_phonenumber }}</p>
</dd>
{% endif %}
{# <dd>#}
{# {% for el in ['structureAccName', 'structureAccPhonenumber', 'structureAccEmail'] %}#}
{# {% set el_data = attribute(entity, el) %}#}
{# {% if el_data is not empty %}{{ el_data }}<br/>{% endif %}#}
{# {% endfor %}#}
{# {% if entity.structureAccAddress is not empty %}#}
{# {{ macro_address._render(entity.structureAccAddress, { 'with_valid_from': false }) }}#}
{# {% endif %}#}
{# </dd>#}
<h2>Poste occupé</h2>
@ -54,8 +67,8 @@
<dd>{{ entity.posteLieu|chill_print_or_message }}</dd>
<dt>Dates</dt>
<dd>Du {{ entity.debutDate|format_date('long', 'none') }}
au {{ entity.getDateEndComputed|format_date('long', 'none') }}
<dd>Du {{ entity.debutDate|format_date('long') }}
au {{ entity.getDateEndComputed|format_date('long') }}
</dd>
<dt>Horaire</dt>
@ -135,7 +148,7 @@
<dd>
{% 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 %}
<li>
<a class="btn" href="{{ chill_return_path_or('chill_crud_immersion_bilan', { 'id': entity.id }) }}">
<a class="btn btn-misc" href="{{ chill_return_path_or('chill_crud_immersion_bilan', { 'id': entity.id, 'person_id': entity.person.id }) }}">
<svg style="height: 1rem;" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="graduation-cap" class="svg-inline--fa fa-graduation-cap fa-w-20" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M622.34 153.2L343.4 67.5c-15.2-4.67-31.6-4.67-46.79 0L17.66 153.2c-23.54 7.23-23.54 38.36 0 45.59l48.63 14.94c-10.67 13.19-17.23 29.28-17.88 46.9C38.78 266.15 32 276.11 32 288c0 10.78 5.68 19.85 13.86 25.65L20.33 428.53C18.11 438.52 25.71 448 35.94 448h56.11c10.24 0 17.84-9.48 15.62-19.47L82.14 313.65C90.32 307.85 96 298.78 96 288c0-11.57-6.47-21.25-15.66-26.87.76-15.02 8.44-28.3 20.69-36.72L296.6 284.5c9.06 2.78 26.44 6.25 46.79 0l278.95-85.7c23.55-7.24 23.55-38.36 0-45.6zM352.79 315.09c-28.53 8.76-52.84 3.92-65.59 0l-145.02-44.55L128 384c0 35.35 85.96 64 192 64s192-28.65 192-64l-14.18-113.47-145.03 44.56z"></path></svg>
Bilan
</a>

View File

@ -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 %}
<h1>{{ ('crud.'~crud_name~'.title_edit')|trans({'%person%': person|chill_entity_render_string }) }}</h1>
{% endblock crud_content_header %}

View File

@ -9,7 +9,7 @@
{% block crud_content_view_details %}
<dl class="chill_view_data">
<dt>Date</dt>
<dd>{{ entity.reportDate|format_date('long', 'none') }}</dd>
<dd>{{ entity.reportDate|format_date('long') }}</dd>
<h2>Souhaits</h2>

View File

@ -22,7 +22,7 @@
<tbody>
{% for cv in cvs %}
<tr>
<td>{{ cv.reportDate|format_date('short', 'none') }}</td>
<td>{{ cv.reportDate|format_date('short') }}</td>
<td>
<ul class="record_actions">
<li>
@ -70,7 +70,7 @@
<tbody>
{% for frein in freins %}
<tr>
<td>{{ frein.reportDate|format_date('short', 'none') }}</td>
<td>{{ frein.reportDate|format_date('short') }}</td>
<td>
{% if frein.freinsPerso|merge(frein.freinsEmploi)|length > 0 %}
<ul>
@ -133,7 +133,7 @@
<tbody>
{% for im in immersions %}
<tr>
<td>{{ im.debutDate|format_date('short', 'none') }}</td>
<td>{{ im.debutDate|format_date('short') }}</td>
<td>
{{ im.entreprise.name }}
</td>
@ -146,7 +146,7 @@
<a href="{{ path('chill_crud_immersion_edit', {'id': im.id, 'person_id': person.id}) }}" class="btn btn-edit"></a>
</li>
<li>
<a href="{{ path('chill_crud_immersion_bilan', {'id': im.id, 'person_id': person.id}) }}" class="btn btn-bilan">
<a href="{{ path('chill_crud_immersion_bilan', {'id': im.id, 'person_id': person.id}) }}" class="btn btn-misc">
<svg style="height: 1rem;" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="graduation-cap" class="svg-inline--fa fa-graduation-cap fa-w-20" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M622.34 153.2L343.4 67.5c-15.2-4.67-31.6-4.67-46.79 0L17.66 153.2c-23.54 7.23-23.54 38.36 0 45.59l48.63 14.94c-10.67 13.19-17.23 29.28-17.88 46.9C38.78 266.15 32 276.11 32 288c0 10.78 5.68 19.85 13.86 25.65L20.33 428.53C18.11 438.52 25.71 448 35.94 448h56.11c10.24 0 17.84-9.48 15.62-19.47L82.14 313.65C90.32 307.85 96 298.78 96 288c0-11.57-6.47-21.25-15.66-26.87.76-15.02 8.44-28.3 20.69-36.72L296.6 284.5c9.06 2.78 26.44 6.25 46.79 0l278.95-85.7c23.55-7.24 23.55-38.36 0-45.6zM352.79 315.09c-28.53 8.76-52.84 3.92-65.59 0l-145.02-44.55L128 384c0 35.35 85.96 64 192 64s192-28.65 192-64l-14.18-113.47-145.03 44.56z"></path></svg>
</a>
</li>
@ -192,7 +192,7 @@
<tbody>
{% for pr in projet_professionnels %}
<tr>
<td>{{ pr.reportDate|format_date('short', 'none') }}</td>
<td>{{ pr.reportDate|format_date('short') }}</td>
<td>
{% set romes = [] %}
{% if pr.valide|length > 0 %}

View File

@ -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';

View File

@ -0,0 +1,34 @@
<?php
declare(strict_types=1);
namespace Chill\Migrations\Job;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20240429111628 extends AbstractMigration
{
public function getDescription(): string
{
return 'Emploi - Change field type to phonenumber for tuteur and structure acc';
}
public function up(Schema $schema): void
{
$this->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');
}
}