-
@@ -98,6 +101,23 @@
@go-to-generate-workflow="goToGenerateWorkflowEvaluationDocument"
>
+ -
+ replaceDocument(d, arg)"
+ >
+
+
+ -
+
+
+
+
-
@@ -152,6 +172,7 @@ import { mapGetters, mapState } from 'vuex';
import PickTemplate from 'ChillDocGeneratorAssets/vuejs/_components/PickTemplate.vue';
import {buildLink} from 'ChillDocGeneratorAssets/lib/document-generator';
import AddAsyncUpload from 'ChillDocStoreAssets/vuejs/_components/AddAsyncUpload.vue';
+import AddAsyncUploadDownloader from 'ChillDocStoreAssets/vuejs/_components/AddAsyncUploadDownloader.vue';
import ListWorkflowModal from 'ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue';
import {buildLinkCreate} from 'ChillMainAssets/lib/entity-workflow/api.js';
@@ -176,7 +197,9 @@ const i18n = {
document_upload: "Téléverser un document",
document_title: "Titre du document",
template_title: "Nom du template",
- browse: "Ajouter un document"
+ browse: "Ajouter un document",
+ replace: "Remplacer",
+ download: "Télécharger le fichier existant"
}
}
};
@@ -188,6 +211,7 @@ export default {
ckeditor: CKEditor.component,
PickTemplate,
AddAsyncUpload,
+ AddAsyncUploadDownloader,
ListWorkflowModal,
},
i18n,
@@ -274,8 +298,9 @@ export default {
},
onInputDocumentTitle(event) {
const id = Number(event.target.id);
+ const key = Number(event.target.dataset.key) + 1;
const title = event.target.value;
- this.$store.commit('updateDocumentTitle', {id: id, evaluationKey: this.evaluation.key, title: title});
+ this.$store.commit('updateDocumentTitle', {id: id, key: key, evaluationKey: this.evaluation.key, title: title});
},
addDocument(storedObject) {
let document = {
@@ -285,6 +310,14 @@ export default {
};
this.$store.commit('addDocument', {key: this.evaluation.key, document: document});
},
+ replaceDocument(oldDocument, storedObject) {
+ let document = {
+ type: 'accompanying_period_work_evaluation_document',
+ storedObject: storedObject,
+ title: oldDocument.title
+ };
+ this.$store.commit('replaceDocument', {key: this.evaluation.key, document: document, oldDocument: oldDocument});
+ },
removeDocument(document) {
if (window.confirm("Êtes-vous sûr·e de vouloir supprimer le document qui a pour titre \"" + document.title +"\" ?")) {
this.$store.commit('removeDocument', {key: this.evaluation.key, document: document});
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js
index 7f96843e5..4ce0b8ebe 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js
@@ -31,6 +31,7 @@ const store = createStore({
.map(p => p.person),
handlingThirdParty: window.accompanyingCourseWork.handlingThierParty,
thirdParties: window.accompanyingCourseWork.thirdParties,
+ referrers: window.accompanyingCourseWork.referrers,
isPosting: false,
errors: [],
},
@@ -54,6 +55,9 @@ const store = createStore({
hasHandlingThirdParty(state) {
return state.handlingThirdParty !== null;
},
+ hasReferrers(state) {
+ return state.referrers.length > 0;
+ },
hasThirdParties(state) {
return state.thirdParties.length > 0;
},
@@ -82,6 +86,7 @@ const store = createStore({
},
results: state.resultsPicked.map(r => ({id: r.id, type: r.type})),
thirdParties: state.thirdParties.map(t => ({id: t.id, type: t.type})),
+ referrers: state.referrers.map(t => ({id: t.id, type: t.type})),
goals: state.goalsPicked.map(g => {
let o = {
type: g.type,
@@ -131,9 +136,9 @@ const store = createStore({
endDate: e.endDate !== null ? ISOToDatetime(e.endDate.datetime) : null,
maxDate: e.maxDate !== null ? ISOToDatetime(e.maxDate.datetime) : null,
warningInterval: e.warningInterval !== null ? intervalISOToDays(e.warningInterval) : null,
- documents: e.documents.map((d, dindex) => {
+ documents: e.documents.map((d, docIndex) => {
return Object.assign(d, {
- key: index
+ key: docIndex
});
}),
});
@@ -213,13 +218,26 @@ const store = createStore({
}));
},
removeDocument(state, {key, document}) {
- let evaluations = state.evaluationsPicked.find(e => e.key === key);
-
- if (evaluations === undefined) {
+ let evaluation = state.evaluationsPicked.find(e => e.key === key);
+ if (evaluation === undefined) {
+ return;
+ }
+ evaluation.documents = evaluation.documents.filter(d => d.key !== document.key);
+ },
+ replaceDocument(state, payload) {
+ let evaluation = state.evaluationsPicked.find(e => e.key === payload.key);
+ if (evaluation === undefined) {
return;
}
- evaluations.documents = evaluations.documents.filter(d => d.key !== document.key);
+ let newDocument = Object.assign(
+ payload.document, {
+ key: evaluation.documents.length + 1,
+ workflows_availables: state.work.workflows_availables_evaluation_documents,
+ workflows: [],
+ }
+ );
+ evaluation.documents = evaluation.documents.map(d => d.id === payload.oldDocument.id ? newDocument : d);
},
addEvaluation(state, evaluation) {
let e = {
@@ -302,6 +320,18 @@ const store = createStore({
state.thirdParties = state.thirdParties
.filter(t => t.id !== thirdParty.id);
},
+ addReferrers(state, referrers) {
+ let ids = state.referrers.map(t => t.id);
+ let unexistings = referrers.filter(t => !ids.includes(t.id));
+
+ for (let i in unexistings) {
+ state.referrers.push(unexistings[i]);
+ }
+ },
+ removeReferrer(state, user) {
+ state.referrers = state.referrers
+ .filter(u => u.id !== user.id);
+ },
setErrors(state, errors) {
state.errors = errors;
},
@@ -309,13 +339,17 @@ const store = createStore({
state.isPosting = st;
},
updateDocumentTitle(state, payload) {
- state.evaluationsPicked.find(e => e.key === payload.evaluationKey)
+ if (payload.id === 0) {
+ state.evaluationsPicked.find(e => e.key === payload.evaluationKey)
+ .documents.find(d => d.key === payload.key).title = payload.title;
+ } else {
+ state.evaluationsPicked.find(e => e.key === payload.evaluationKey)
.documents.find(d => d.id === payload.id).title = payload.title;
+ }
}
},
actions: {
updateThirdParty({ commit }, payload) {
- console.log(payload);
commit('updateThirdParty', payload);
},
getReachablesGoalsForAction({ getters, commit, dispatch }) {
@@ -408,6 +442,9 @@ const store = createStore({
removeDocument({commit}, payload) {
commit('removeDocument', payload);
},
+ replaceDocument({commit}, payload) {
+ commit('replaceDocument', payload);
+ },
submit({ getters, state, commit }, callback) {
let
payload = getters.buildPayload,
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig
index d7e4f4e96..6287b158d 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig
@@ -28,11 +28,14 @@
{% if w.createdBy %}
-
{{ 'Referrer'|trans }}
+ {{ 'Referrers'|trans }}
- {{ w.createdBy|chill_entity_render_box }}
+ {% for u in w.referrers %}
+ {{ u|chill_entity_render_box }}
+ {% if not loop.last %}, {% endif %}
+ {% endfor %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/reassign_list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/reassign_list.html.twig
new file mode 100644
index 000000000..87166d990
--- /dev/null
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/reassign_list.html.twig
@@ -0,0 +1,82 @@
+{% extends 'ChillMainBundle::layout.html.twig' %}
+
+{% block title 'period_by_user_list.Period by user'|trans %}
+
+{% block js %}
+ {{ encore_entry_script_tags('mod_set_referrer') }}
+{% endblock %}
+
+{% block css %}
+ {{ encore_entry_link_tags('mod_set_referrer') }}
+{% endblock %}
+
+{% macro period_meta(period) %}
+ {% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_UPDATE', period) %}
+
+ {% set job_id = null %}
+ {% if period.job is defined %}
+ {% set job_id = period.job.id %}
+ {% endif %}
+
+
+ {% endif %}
+{% endmacro %}
+
+
+{% macro period_actions(period) %}
+ {% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', period) %}
+ -
+
+
+ {% endif %}
+{% endmacro %}
+
+{% import _self as m %}
+
+{% block content %}
+
+
{{ block('title') }}
+
+ {{ form_start(form) }}
+
+
+ {{ form_label(form.user ) }}
+ {{ form_widget(form.user, {'attr': {'class': 'select2'}}) }}
+
+
+
+
+
+ {{ form_end(form) }}
+
+ {% if form.user.vars.value is empty %}
+
{{ 'period_by_user_list.Pick a user'|trans }}
+ {% elseif periods|length == 0 and form.user.vars.value is not empty %}
+
{{ 'period_by_user_list.Any course or no authorization to see them'|trans }}
+
+ {% else %}
+
{{ paginator.totalItems }} parcours à réassigner (calculé ce jour à {{ null|format_time('medium') }})
+
+
+ {% for period in periods %}
+ {% include '@ChillPerson/AccompanyingPeriod/_list_item.html.twig' with {'period': period,
+ 'recordAction': m.period_actions(period), 'itemMeta': m.period_meta(period) } %}
+ {% endfor %}
+
+ {% endif %}
+
+ {{ chill_pagination(paginator) }}
+
+
+{% endblock %}
+
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/accompanying_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/accompanying_period.html.twig
index 5a8d2acf8..a793ac37a 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/Household/accompanying_period.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/accompanying_period.html.twig
@@ -46,13 +46,13 @@
{{ 'Household summary'|trans }}
- {#
+ {# TODO: add ACL to check if user is allowed to edit household? #}
-
-
- {{ 'Create an accompanying period'|trans }}
+
+ {{ 'Create an accompanying period'|trans }}
- #}
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php
index c6d132992..0e146b5c0 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php
@@ -23,6 +23,7 @@ use Chill\PersonBundle\Templating\Entity\PersonRenderInterface;
use DateTimeInterface;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Serializer\Exception\UnexpectedValueException;
+use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
@@ -30,6 +31,8 @@ use Symfony\Contracts\Translation\TranslatorInterface;
use function array_map;
use function implode;
+use function in_array;
+use function is_string;
class PersonDocGenNormalizer implements
ContextAwareNormalizerInterface,
@@ -63,6 +66,15 @@ class PersonDocGenNormalizer implements
$dateContext = $context;
$dateContext['docgen:expects'] = DateTimeInterface::class;
$addressContext = array_merge($context, ['docgen:expects' => Address::class]);
+ $personResourceContext = array_merge($context, [
+ 'docgen:expects' => Person\PersonResource::class,
+ // we simplify the list of attributes for the embedded persons
+ AbstractNormalizer::GROUPS => ['docgen:read'],
+ // when a person reference the same person... take care of circular references
+ AbstractNormalizer::CIRCULAR_REFERENCE_HANDLER => function ($object, $format, $context) {
+ return $this->normalizer->normalize(null, $format, $context);
+ },
+ ]);
if (null === $person) {
return $this->normalizeNullValue($format, $context);
@@ -104,6 +116,7 @@ class PersonDocGenNormalizer implements
'memo' => $person->getMemo(),
'numberOfChildren' => (string) $person->getNumberOfChildren(),
'address' => $this->normalizer->normalize($person->getCurrentPersonAddress(), $format, $addressContext),
+ //'resources' => $this->normalizer->normalize($person->getResources(), $format, $personResourceContext),
];
if ($context['docgen:person:with-household'] ?? false) {
@@ -147,6 +160,17 @@ class PersonDocGenNormalizer implements
);
}
+ private function hasGroup($context, string $group): bool
+ {
+ $groups = $context[AbstractNormalizer::GROUPS] ?? [];
+
+ if (is_string($groups)) {
+ $groups = [$groups];
+ }
+
+ return in_array($group, $groups, true);
+ }
+
private function normalizeNullValue(string $format, array $context)
{
$normalizer = new NormalizeNullValueHelper($this->normalizer, 'type', 'person');
@@ -169,6 +193,8 @@ class PersonDocGenNormalizer implements
$data = $normalizer->normalize($attributes, $format, $context);
+ //$data['resources'] = [];
+
if ($context['docgen:person:with-relations'] ?? false) {
$data['relations'] = [];
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/HouseholdNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/HouseholdNormalizerTest.php
index ac015155b..c67e07b5e 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/HouseholdNormalizerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/HouseholdNormalizerTest.php
@@ -16,6 +16,7 @@ use Chill\PersonBundle\Entity\Household\HouseholdMember;
use Chill\PersonBundle\Entity\Household\Position;
use Chill\PersonBundle\Entity\Person;
use DateTimeImmutable;
+use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
@@ -25,17 +26,24 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
*/
final class HouseholdNormalizerTest extends KernelTestCase
{
+ private EntityManagerInterface $entityManager;
+
private ?NormalizerInterface $normalizer;
+ private array $toDelete;
+
protected function setUp(): void
{
self::bootKernel();
$this->normalizer = self::$container->get(NormalizerInterface::class);
+ $this->entityManager = self::$container->get(EntityManagerInterface::class);
}
public function testNormalizationRecursive()
{
$person = new Person();
+ $person->setFirstName('ok')->setLastName('ok');
+ $this->entityManager->persist($person);
$member = new HouseholdMember();
$household = new Household();
$position = (new Position())
@@ -44,7 +52,8 @@ final class HouseholdNormalizerTest extends KernelTestCase
$member->setPerson($person)
->setStartDate(new DateTimeImmutable('1 year ago'))
- ->setEndDate(new DateTimeImmutable('1 month ago'));
+ ->setEndDate(new DateTimeImmutable('1 month ago'))
+ ->setPosition($position);
$household->addMember($member);
diff --git a/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler.php b/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler.php
index d7a196a6c..d7ce1ed4b 100644
--- a/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler.php
+++ b/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler.php
@@ -62,7 +62,7 @@ class AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler implements EntityW
'workflow.Doc for evaluation (n°%eval%)',
['%eval%' => $entityWorkflow->getRelatedEntityId()]
) . ' (' . $this->translatableStringHelper->localize($doc->getAccompanyingPeriodWorkEvaluation()
- ->getEvaluation()->getTitle()).') '.$doc->getTitle();
+ ->getEvaluation()->getTitle()) . ') ' . $doc->getTitle();
}
public function getRelatedEntity(EntityWorkflow $entityWorkflow): ?AccompanyingPeriodWorkEvaluationDocument
diff --git a/src/Bundle/ChillPersonBundle/config/services/controller.yaml b/src/Bundle/ChillPersonBundle/config/services/controller.yaml
index 22d58ccbe..67c724093 100644
--- a/src/Bundle/ChillPersonBundle/config/services/controller.yaml
+++ b/src/Bundle/ChillPersonBundle/config/services/controller.yaml
@@ -41,6 +41,11 @@ services:
autowire: true
tags: ['controller.service_arguments']
+ Chill\PersonBundle\Controller\ReassignAccompanyingPeriodController:
+ autoconfigure: true
+ autowire: true
+ tags: ['controller.service_arguments']
+
Chill\PersonBundle\Controller\PersonApiController:
arguments:
$authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper'
diff --git a/src/Bundle/ChillPersonBundle/config/services/doctrineEventListener.yaml b/src/Bundle/ChillPersonBundle/config/services/doctrineEventListener.yaml
index f75243d02..dbf6fc16d 100644
--- a/src/Bundle/ChillPersonBundle/config/services/doctrineEventListener.yaml
+++ b/src/Bundle/ChillPersonBundle/config/services/doctrineEventListener.yaml
@@ -12,3 +12,13 @@ services:
event: 'prePersist'
entity: 'Chill\PersonBundle\Entity\PersonAltName'
method: 'prePersistAltName'
+
+ Chill\PersonBundle\EventListener\AccompanyingPeriodWorkEventListener:
+ autoconfigure: true
+ autowire: true
+ tags:
+ -
+ name: 'doctrine.orm.entity_listener'
+ event: 'prePersist'
+ entity: 'Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork'
+ method: 'prePersistAccompanyingPeriodWork'
\ No newline at end of file
diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20220310063629.php b/src/Bundle/ChillPersonBundle/migrations/Version20220310063629.php
new file mode 100644
index 000000000..c168521ed
--- /dev/null
+++ b/src/Bundle/ChillPersonBundle/migrations/Version20220310063629.php
@@ -0,0 +1,42 @@
+addSql('DROP TABLE chill_person_accompanying_period_work_referrer');
+ }
+
+ public function getDescription(): string
+ {
+ return 'Add referrers to AccompanyingPeriodWork';
+ }
+
+ public function up(Schema $schema): void
+ {
+ $this->addSql('CREATE TABLE chill_person_accompanying_period_work_referrer (accompanyingperiodwork_id INT NOT NULL, user_id INT NOT NULL, PRIMARY KEY(accompanyingperiodwork_id, user_id))');
+ $this->addSql('CREATE INDEX IDX_3619F5EBB99F6060 ON chill_person_accompanying_period_work_referrer (accompanyingperiodwork_id)');
+ $this->addSql('CREATE INDEX IDX_3619F5EBA76ED395 ON chill_person_accompanying_period_work_referrer (user_id)');
+ $this->addSql('ALTER TABLE chill_person_accompanying_period_work_referrer ADD CONSTRAINT FK_3619F5EBB99F6060 FOREIGN KEY (accompanyingperiodwork_id) REFERENCES chill_person_accompanying_period_work (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
+ $this->addSql('ALTER TABLE chill_person_accompanying_period_work_referrer ADD CONSTRAINT FK_3619F5EBA76ED395 FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
+ $this->addSql('INSERT INTO chill_person_accompanying_period_work_referrer (accompanyingperiodwork_id, user_id)
+ SELECT id, createdby_id FROM chill_person_accompanying_period_work');
+ }
+}
diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
index bc238570d..06e4ac06e 100644
--- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
@@ -194,6 +194,7 @@ No accompanying user: Aucun accompagnant
No data given: Pas d'information
Participants: Personnes impliquées
Create an accompanying course: Créer un parcours
+Accompanying courses of users: Parcours des utilisateurs
This accompanying course is still a draft: Ce parcours est encore à l'état brouillon.
Associated peoples: Usagers concernés
Resources: Interlocuteurs privilégiés
@@ -213,6 +214,7 @@ No requestor: Pas de demandeur
No resources: "Pas d'interlocuteurs privilégiés"
Persons associated: Usagers concernés
Referrer: Référent
+Referrers: Référents
Some peoples does not belong to any household currently. Add them to an household soon: Certaines personnes n'appartiennent à aucun ménage actuellement. Renseignez leur ménage dès que possible.
Add to household now: Ajouter à un ménage
Any resource for this accompanying course: Aucun interlocuteur privilégié pour ce parcours
@@ -494,6 +496,7 @@ Remove household composition: Supprimer composition familiale
Are you sure you want to remove this composition?: Etes-vous sûr de vouloir supprimer cette composition familiale ?
Concerns household n°%id%: Concerne le ménage n°%id%
Composition: Composition
+The composition has been successfully removed.: La composition a été supprimée.
# accompanying course work
Accompanying Course Actions: Actions d'accompagnements
@@ -577,3 +580,8 @@ My accompanying periods in draft: Mes parcours brouillons
workflow:
Doc for evaluation (n°%eval%): Document de l'évaluation n°%eval%
+
+period_by_user_list:
+ Period by user: Parcours d'accompagnement par utilisateur
+ Pick a user: Choisissez un utilisateur pour obtenir la liste de ses parcours
+ Any course or no authorization to see them: Aucun parcours pour ce référent, ou aucun droit pour visualiser les parcours de ce référent.
diff --git a/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php b/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php
index 480808dfe..cf34c8919 100644
--- a/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php
+++ b/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php
@@ -149,7 +149,7 @@ class ThirdPartyType extends AbstractType
'by_reference' => false,
'button_add_label' => 'Add a contact',
'button_remove_label' => 'Remove a contact',
- 'empty_collection_explain' => 'Any contact',
+ 'empty_collection_explain' => 'No contacts associated',
]);
}
diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig
index 759ba5918..cff7d3a72 100644
--- a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig
+++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig
@@ -60,7 +60,7 @@
{% if types|length > 0 %}
{{ types|join(', ') }}
{% else %}
-
{{ 'thirdparty.no_categories' }}
+
{{ 'thirdparty.no_categories'|trans }}
{% endif %}
diff --git a/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml b/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml
index 9c8091307..d0edb22bb 100644
--- a/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml
@@ -15,6 +15,7 @@ thirdparty.No_comment: Aucun commentaire
thirdparty.NameCompany: Service/Département
thirdparty.Acronym: Sigle
thirdparty.Categories: Catégories
+thirdparty.no_categories: Aucune catégorie
thirdparty.Child: Personne de contact
thirdparty.child: Personne de contact
thirdparty.Children: Personnes de contact
@@ -69,7 +70,6 @@ No nameCompany given: Aucune raison sociale renseignée
No acronym given: Aucun sigle renseigné
No phone given: Aucun téléphone renseigné
No email given: Aucune adresse courriel renseignée
-thirdparty.no_categories: Aucune catégorie
The party is visible in those centers: Le tiers est visible dans ces centres
The party is not visible in any center: Le tiers n'est associé à aucun centre