diff --git a/src/Bundle/ChillPersonBundle/Resources/public/index.js b/src/Bundle/ChillPersonBundle/Resources/public/index.js index 34d0be7d8..6b939ea4d 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/index.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/index.js @@ -1,3 +1,4 @@ require('./sass/chillperson.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 672e718e7..76dde2837 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig @@ -94,7 +94,7 @@
  • {%- if p.person.lastAddress is not empty -%} - {{ p.person.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }} + {{ p.person.currentHouseholdAddress|chill_entity_render_box({'with_valid_from': false}) }} {%- else -%} {{ 'No address given'|trans }} {%- endif -%} @@ -113,7 +113,7 @@ ) }}" class="sc-button"> - {{ 'household.Household file'|trans }} + n° {{ p.person.getCurrentHousehold.id }}
  • {% endif %} @@ -125,189 +125,222 @@ {% 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') }} +

    +
    +
    + + +
    +
    + + {% elseif accompanyingCourse.requestorThirdParty is not empty %} + {% set r = accompanyingCourse.requestorThirdParty %} +
    +
    +

    + {{ r.name }} + {{ 'Tiers' }} +

    +
    +
    + + +
    +
    + {% endif %}

    {{ 'Resources'|trans }}

    -
    - {% for r in accompanyingCourse.resources %} -
    - {% if r.person %} -
    -
    -

    - {{ r.person.firstname ~ ' ' ~ r.person.lastname }} - {{ 'Usager' }} -

    -

    - {% set born = (r.person.gender == 'woman') ? 'née': 'né' %} - {% set gender = (r.person.gender == 'woman') ? 'fa-venus' : - (r.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %} - {% set genderTitle = (r.person.gender == 'woman') ? 'femme' : - (r.person.gender == 'homme') ? 'fa-mars' : 'neutre' %} - {{ born ~ ' le ' ~ r.person.birthdate|format_date('short') }} -

    -
    -
    -
      -
    • - {% if r.person.mobilenumber %} - {{ r.person.mobilenumber }} - {% else %} - - {% if r.person.phonenumber %} - {{ r.person.phonenumber }} - {% else %} - {{ 'No data given'|trans }} - {% endif %} - {% endif %} -
    • -
    • - - {%- if r.person.lastAddress is not empty -%} - {{ r.person.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }} - {%- else -%} - {{ 'No address given'|trans }} - {%- endif -%} -
    • -
    -
      -
    • - -
    • -
    -
    -
    + {% if accompanyingCourse.resources|length == 0 %} +

    {{ 'Any resource for this accompanying course'|trans }}

    + {% else %} +
    + {% for r in accompanyingCourse.resources %} +
    + {% if r.person %} - {% endif %} - {% if r.thirdParty %} +
    +
    +

    + {{ r.person.firstname ~ ' ' ~ r.person.lastname }} + {{ 'Usager' }} +

    +

    + {% set born = (r.person.gender == 'woman') ? 'née': 'né' %} + {% set gender = (r.person.gender == 'woman') ? 'fa-venus' : + (r.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %} + {% set genderTitle = (r.person.gender == 'woman') ? 'femme' : + (r.person.gender == 'homme') ? 'fa-mars' : 'neutre' %} + {{ born ~ ' le ' ~ r.person.birthdate|format_date('short') }} +

    +
    +
    +
      +
    • + {% if r.person.mobilenumber %} + {{ r.person.mobilenumber }} + {% else %} + + {% if r.person.phonenumber %} + {{ r.person.phonenumber }} + {% else %} + {{ 'No data given'|trans }} + {% endif %} + {% endif %} +
    • +
    • + + {%- if r.person.lastAddress is not empty -%} + {{ r.person.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }} + {%- else -%} + {{ 'No address given'|trans }} + {%- endif -%} +
    • +
    +
      +
    • + +
    • +
    +
    +
    -
    -
    -

    - {{ r.thirdParty.name }} - {{ 'Tiers' }} -

    -
    -
    - -
      -
    • - -
    • -
    -
    -
    +<<<<<<< HEAD + {% endif %} + {% if r.thirdParty %} - {% endif %} -
    - {% endfor %} -
    +
    +
    +

    + {{ r.thirdParty.name }} + {{ 'Tiers' }} +

    +
    +
    + +
      +
    • + +
    • +
    +
    +
    + + {% endif %} +
    + {% endfor %} +
    + {% endif %}

    {{ '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 %}

    {{ 'accompanying_course_work.Any work'|trans }}

    @@ -317,7 +350,7 @@ {% block contentActivity %} {% set person = null %} - {% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'accompanyingCourse', 'context': 'person'} %} + {% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'accompanyingCourse', 'context': 'accompanyingCourse'} %} {% endblock %} {# ==> insert accompanyingCourse vue component #} 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/Resources/views/AccompanyingPeriod/list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/list.html.twig index 6abd767b9..6b388857d 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/list.html.twig @@ -9,34 +9,32 @@ {% include 'ChillPersonBundle:AccompanyingPeriod:_list.html.twig' %} - + {% endblock %} diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index ce9e38d77..9547c70b2 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -182,6 +182,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 @@ -191,8 +193,7 @@ See accompanying period: Voir cette période d'accompagnement Referrer: Référent 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 appartenance à un ménage dès que possible. Add to household now: Ajouter à un ménage -Requestor: Demandeur - +Any resource for this accompanying course: Aucun interlocuteur privilégié pour ce parcours # pickAPersonType Pick a person: Choisir une personne