diff --git a/src/Bundle/ChillPersonBundle/Resources/public/index.js b/src/Bundle/ChillPersonBundle/Resources/public/index.js
index acdc04579..4a51d51d2 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/index.js
+++ b/src/Bundle/ChillPersonBundle/Resources/public/index.js
@@ -1,3 +1,4 @@
require('./sass/person.scss');
require('./sass/person_with_period.scss');
require('./sass/household_banner.scss');
+require('./sass/accompanying_period_work.scss');
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/modules/accompanying_course_work_list/index.scss b/src/Bundle/ChillPersonBundle/Resources/public/modules/accompanying_course_work_list/index.scss
index 433f291b5..9b5da134d 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/modules/accompanying_course_work_list/index.scss
+++ b/src/Bundle/ChillPersonBundle/Resources/public/modules/accompanying_course_work_list/index.scss
@@ -46,6 +46,15 @@
}
}
+ &.short {
+ .item {
+ padding-bottom: 0;
+ ul.record_actions {
+ margin-bottom: 0;
+ }
+ }
+ }
+
.updatedBy {
margin-top: 1rem;
text-align: right;
@@ -94,3 +103,4 @@ ul.timeline {
}
}
}
+
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/sass/accompanying_period_work.scss b/src/Bundle/ChillPersonBundle/Resources/public/sass/accompanying_period_work.scss
new file mode 100644
index 000000000..dfb885e7b
--- /dev/null
+++ b/src/Bundle/ChillPersonBundle/Resources/public/sass/accompanying_period_work.scss
@@ -0,0 +1,6 @@
+
+.chill-entity__social-action {
+ .badge-primary {
+ background-color: var(--chill-green);
+ }
+}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig
index 650bb1733..99e5ed4f6 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig
@@ -122,6 +122,97 @@
{% endfor %}
+
{{ 'Requestor'|trans }}
+
+ {% if accompanyingCourse.requestor == null %}
+ {{ 'Any requestor to this accompanying course'|trans }}
+ {% elseif accompanyingCourse.requestorPerson is not empty %}
+ {% set r = accompanyingCourse.requestorPerson %}
+
+
+
+ {{ r.firstname ~ ' ' ~ r.lastname }}
+ {{ 'Usager' }}
+
+
+ {% set born = (r.gender == 'woman') ? 'née': 'né' %}
+ {% set gender = (r.gender == 'woman') ? 'fa-venus' :
+ (r.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
+ {% set genderTitle = (r.gender == 'woman') ? 'femme' :
+ (r.gender == 'homme') ? 'fa-mars' : 'neutre' %}
+ {{ born ~ ' le ' ~ r.birthdate|format_date('short') }}
+
+
+
+
+ -
+ {% if r.mobilenumber %}
+ {{ r.mobilenumber }}
+ {% else %}
+
+ {% if r.phonenumber %}
+ {{ r.phonenumber }}
+ {% else %}
+ {{ 'No data given'|trans }}
+ {% endif %}
+ {% endif %}
+
+ -
+
+ {%- if r.lastAddress is not empty -%}
+ {{ r.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }}
+ {%- else -%}
+ {{ 'No address given'|trans }}
+ {%- endif -%}
+
+
+
+
+
+
+ {% elseif accompanyingCourse.requestorThirdParty is not empty %}
+ {% set r = accompanyingCourse.requestorThirdParty %}
+
+
+
+ {{ r.name }}
+ {{ 'Tiers' }}
+
+
+
+
+ {% endif %}
{{ 'Resources'|trans }}
@@ -227,88 +318,25 @@
{{ 'Social actions'|trans }}
-
+
{% for w in works %}
+
{{ 'accompanying_course_work.action'|trans }}
{{ w.socialAction|chill_entity_render_box({ 'no-badge': false }) }}
-
-
- -
-
- {{ w.createdAt|format_date('long') }}
-
-
- {{ 'accompanying_course_work.create_date'|trans }}
-
-
- -
-
- {{ w.startDate|format_date('long') }}
-
-
- {{ 'accompanying_course_work.start_date'|trans }}
-
-
- -
-
- {{ w.endDate|format_date('long') }}
-
-
- {{ 'accompanying_course_work.end_date'|trans }}
-
-
-
-
-
- {% if w.results|length > 0 %}
-
-
-
{{ 'accompanying_course_work.goal'|trans }}
-
{{ 'accompanying_course_work.results without objective'|trans }}
-
-
-
{{ 'accompanying_course_work.results'|trans }}
-
- {% for r in w.results %}
- - {{ r.title|localize_translatable_string }}
- {% endfor %}
-
-
-
- {% endif %}
-
- {% if w.goals|length > 0 %}
- {% for g in w.goals %}
-
-
-
{{ 'accompanying_course_work.goal'|trans }}
-
{{ g.goal.title|localize_translatable_string }}
-
-
- {% if g.results|length == 0 %}
-
{{ 'accompanying_course_work.results'|trans }}
-
{{ 'accompanying_course_work.no_results'|trans }}
- {% else %}
-
{{ 'accompanying_course_work.results'|trans }}
-
- {% for r in g.results %}
- - {{ r.title|localize_translatable_string }}
- {% endfor %}
-
- {% endif %}
-
-
- {% endfor %}
- {% endif %}
-
-
- {{ 'Last updated by'|trans}}: {{ w.updatedBy|chill_entity_render_box }}, {{ w.updatedAt|format_datetime('long', 'short') }}
-
+
{% else %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_by_accompanying_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_by_accompanying_period.html.twig
index 8dfe1bfd5..b12f3c932 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_by_accompanying_period.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_by_accompanying_period.html.twig
@@ -12,7 +12,7 @@
{{ 'accompanying_course_work.action'|trans }}
- {{ w.socialAction|chill_entity_render_box({ 'no-badge': true }) }}
+ {{ w.socialAction|chill_entity_render_box }}
@@ -67,7 +67,7 @@
{{ 'accompanying_course_work.goal'|trans }}
-
{{ g.goal.title|localize_translatable_string }}
+
{{ g.goal.title|localize_translatable_string }}
{% if g.results|length == 0 %}
@@ -96,7 +96,7 @@
{{ 'Update'|trans }}
+ href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}">{{ 'Edit'|trans }}
diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
index 0442166c2..3f5180ad5 100644
--- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
@@ -181,6 +181,8 @@ Create an accompanying course: Créer un parcours
This accompanying course is still a draft: Ce parcours est à l'état brouillon
Associated peoples: Usagers concernés
Resources: Interlocuteurs privilégiés
+Requestor: Demandeur
+Any requestor to this accompanying course: Aucun demandeur pour ce parcours
Social actions: Actions d'accompagnement
Social issues: Problématiques sociales
Last events on accompanying course: Dernières actions de suivi