Merge remote-tracking branch 'origin/master' into issue465_display_person_resources

This commit is contained in:
2022-02-17 21:17:40 +01:00
60 changed files with 995 additions and 424 deletions

View File

@@ -56,14 +56,18 @@
</div>
<div>
<add-persons
buttonTitle="persons_associated.add_persons"
modalTitle="add_persons.title"
v-bind:key="addPersons.key"
v-bind:options="addPersons.options"
@addNewPersons="addNewPersons"
ref="addPersons"> <!-- to cast child method -->
</add-persons>
<ul class="record_actions">
<li class="add-persons">
<add-persons
buttonTitle="persons_associated.add_persons"
modalTitle="add_persons.title"
v-bind:key="addPersons.key"
v-bind:options="addPersons.options"
@addNewPersons="addNewPersons"
ref="addPersons"> <!-- to cast child method -->
</add-persons>
</li>
</ul>
</div>
<div v-if="!isParticipationValid" class="alert alert-warning to-confirm">

View File

@@ -144,14 +144,18 @@
</div>
<div>
<add-persons v-if="accompanyingCourse.requestor === null"
buttonTitle="requestor.add_requestor"
modalTitle="requestor.add_requestor"
v-bind:key="addPersons.key"
v-bind:options="addPersons.options"
@addNewPersons="addNewPersons"
ref="addPersons"> <!-- to cast child method -->
</add-persons>
<ul class="record_actions">
<li class="add-persons">
<add-persons v-if="accompanyingCourse.requestor === null"
buttonTitle="requestor.add_requestor"
modalTitle="requestor.add_requestor"
v-bind:key="addPersons.key"
v-bind:options="addPersons.options"
@addNewPersons="addNewPersons"
ref="addPersons"> <!-- to cast child method -->
</add-persons>
</li>
</ul>
</div>
</div>

View File

@@ -29,14 +29,18 @@
</div>
<div>
<add-persons
buttonTitle="resources.add_resources"
modalTitle="resources.add_resources"
v-bind:key="addPersons.key"
v-bind:options="addPersons.options"
@addNewPersons="addNewPersons"
ref="addPersons"> <!-- to cast child method -->
</add-persons>
<ul class="record_actions">
<li class="add-persons">
<add-persons
buttonTitle="resources.add_resources"
modalTitle="resources.add_resources"
v-bind:key="addPersons.key"
v-bind:options="addPersons.options"
@addNewPersons="addNewPersons"
ref="addPersons"> <!-- to cast child method -->
</add-persons>
</li>
</ul>
</div>
</div>

View File

@@ -160,7 +160,7 @@
</p>
<ul class="record_actions">
<li>
<li class="add-persons">
<add-persons
ref="handlingThirdPartyPicker"
v-bind:key="handlingThirdPartyPicker.key"
@@ -222,7 +222,7 @@
</div>
<ul class="record_actions">
<li>
<li class="add-persons">
<add-persons
ref="thirdPartyPicker"
v-bind:key="thirdPartyPicker.key"

View File

@@ -29,7 +29,7 @@
</div>
<ul class="record_actions">
<li>
<li class="add-persons">
<add-persons
buttonTitle="household_members_editor.concerned.add_persons"
modalTitle="household_members_editor.concerned.search"

View File

@@ -61,7 +61,7 @@
<li v-if="hasHousehold">
<button @click="resetMode" class="btn btn-sm btn-misc">{{ $t('household_members_editor.household.reset_mode')}}</button>
</li>
<li v-if="!hasHousehold">
<li v-if="!hasHousehold" class="add-persons">
<add-persons
modalTitle="Chercher un ménage existant"
buttonTitle="Chercher un ménage existant"

View File

@@ -1,10 +1,7 @@
<template>
<ul class="record_actions">
<li class="add-persons">
<a class="btn" :class="getClassButton" :title="$t(buttonTitle)"
@click="openModal"><span v-if="displayTextButton">{{ $t(buttonTitle) }}</span></a>
</li>
</ul>
<a class="btn" :class="getClassButton" :title="$t(buttonTitle)" @click="openModal">
<span v-if="displayTextButton">{{ $t(buttonTitle) }}</span>
</a>
<teleport to="body">
<modal v-if="modal.showModal"

View File

@@ -26,9 +26,9 @@
</div>
<div class="wh-row">
<div class="wh-col">
{% if period.closingDate == null %}
{% if period.closingDate == null and period.step != 'DRAFT' %}
{{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': period.openingDate|format_date('long') } ) }}
{% else %}
{% elseif period.closingDate != null %}
{{ 'accompanying_period.dates_from_%opening_date%_to_%closing_date%'|trans({
'%opening_date%': period.openingDate|format_date('long'),
'%closing_date%': period.closingDate|format_date('long')}
@@ -55,65 +55,67 @@
</div>
</div>
</div>
<div class="item-row separator">
<div class="wrap-list">
{% if period.requestorPerson is not null or period.requestorThirdParty is not null %}
<div class="wl-row">
<div class="wl-col title"><h3>{{ 'Requestor'|trans({'gender': null }) }}</h3></div>
<div class="wl-col list">
{% if period.requestorPerson is not null %}
<span class="wl-item">
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
action: 'show', displayBadge: true,
targetEntity: { name: 'person', id: period.requestorPerson.id },
buttonText: period.requestorPerson|chill_entity_render_string,
isDead: period.requestorPerson.deathdate is not null
} %}
</span>
{% endif %}
{% if period.requestorThirdParty is not null %}
<span class="wl-item">
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
action: 'show', displayBadge: true,
targetEntity: { name: 'thirdparty', id: period.requestorThirdParty.id },
buttonText: period.requestorThirdParty|chill_entity_render_string
} %}
</span>
{% endif %}
{% if period.requestor is not null or period.participations.count > 0 or period.socialIssues.count > 0%}
<div class="item-row separator">
<div class="wrap-list">
{% if period.requestorPerson is not null or period.requestorThirdParty is not null %}
<div class="wl-row">
<div class="wl-col title"><h3>{{ 'Requestor'|trans({'gender': null }) }}</h3></div>
<div class="wl-col list">
{% if period.requestorPerson is not null %}
<span class="wl-item">
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
action: 'show', displayBadge: true,
targetEntity: { name: 'person', id: period.requestorPerson.id },
buttonText: period.requestorPerson|chill_entity_render_string,
isDead: period.requestorPerson.deathdate is not null
} %}
</span>
{% endif %}
{% if period.requestorThirdParty is not null %}
<span class="wl-item">
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
action: 'show', displayBadge: true,
targetEntity: { name: 'thirdparty', id: period.requestorThirdParty.id },
buttonText: period.requestorThirdParty|chill_entity_render_string
} %}
</span>
{% endif %}
</div>
</div>
</div>
{% endif %}
{% if period.participations.count > 0 %}
<div class="wl-row">
<div class="wl-col title"><h3>{{ 'Participants'|trans }}</h3></div>
<div class="wl-col list">
{% for p in period.getCurrentParticipations %}
<span class="wl-item">
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
action: 'show', displayBadge: true,
targetEntity: { name: 'person', id: p.person.id },
buttonText: p.person|chill_entity_render_string,
isDead: p.person.deathdate is not null
} %}
</span>
{% endfor %}
{% endif %}
{% if period.participations.count > 0 %}
<div class="wl-row">
<div class="wl-col title"><h3>{{ 'Participants'|trans }}</h3></div>
<div class="wl-col list">
{% for p in period.getCurrentParticipations %}
<span class="wl-item">
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
action: 'show', displayBadge: true,
targetEntity: { name: 'person', id: p.person.id },
buttonText: p.person|chill_entity_render_string,
isDead: p.person.deathdate is not null
} %}
</span>
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% if period.socialIssues.count > 0 %}
<div class="wl-row">
<div class="wl-col title"><h3>{{ 'Social issues'|trans }}</h3></div>
<div class="wl-col list">
{% for si in period.socialIssues %}
<p class="wl-item">
{{ si|chill_entity_render_box }}
</p>
{% endfor %}
{% endif %}
{% if period.socialIssues.count > 0 %}
<div class="wl-row">
<div class="wl-col title"><h3>{{ 'Social issues'|trans }}</h3></div>
<div class="wl-col list">
{% for si in period.socialIssues %}
<p class="wl-item">
{{ si|chill_entity_render_box }}
</p>
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% endif %}
</div>
</div>
</div>
{% endif %}
<div class="item-row separator">
<div class="item-col item-meta">
{% set notif_counter = chill_count_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod', period.id) %}

View File

@@ -0,0 +1,32 @@
{% extends "@ChillMain/layout.html.twig" %}
{% set activeRouteKey = 'chill_person_accompanying_period_user_list' %}
{% block title %}{{ 'My accompanying periods in draft'|trans }}{% endblock title %}
{% macro recordAction(period) %}
<li>
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': period.id }) }}"
class="btn btn-show" title="{{ 'See accompanying period'|trans }}"></a>
</li>
{% endmacro %}
{% block content %}
<div class="col-md-10">
<h1>{{ 'My accompanying periods in draft'|trans }}</h1>
<div class="flex-table accompanyingcourse-list">
{% for period in accompanyingPeriods %}
{% include '@ChillPerson/AccompanyingPeriod/_list_item.html.twig' with {'period': period, 'recordAction': _self.recordAction(period)} %}
{% else %}
<p class="chill-no-data-statement">{{ 'Any accompanying period'|trans }}</p>
{% endfor %}
</div>
{{ chill_pagination(pagination) }}
</div>
{% endblock %}

View File

@@ -20,6 +20,8 @@
<div class="flex-table accompanyingcourse-list">
{% for period in accompanyingPeriods %}
{% include '@ChillPerson/AccompanyingPeriod/_list_item.html.twig' with {'period': period, 'recordAction': _self.recordAction(period)} %}
{% else %}
<p class="chill-no-data-statement">{{ 'Any accompanying period'|trans }}</p>
{% endfor %}
</div>

View File

@@ -32,14 +32,28 @@
</div>
<div class="item-row separator">
<div class="wrap-list">
{% if p.household is same as p.person.getCurrentHousehold %}
<div class="wl-row">
<div class="wl-col title">
<h3>{{ 'Address'|trans }}</h3>
</div>
<div class="wl-col list">
<p class="item">{{ p.household.getCurrentAddress|chill_entity_render_box }}</p>
</div>
</div>
{% endif %}
<div class="wl-row">
<div class="wl-col title">
<h3>En tant que</h3>
<h3>{{ 'household.As member'|trans }}</h3>
</div>
<div class="wl-col list">
<p class="item">{{ p.position.label|localize_translatable_string }}
<p class="item">
{{ p.position.label|localize_translatable_string }}
{% if p.holder %}
<span class="holder">{{ 'household.holder'|trans }}</span>
<span class="fa-stack fa-holder" title="{{ 'houshold.holder'|trans|e('html_attr') }}">
<i class="fa fa-circle fa-stack-1x text-success"></i>
<i class="fa fa-stack-1x">T</i>
</span>
{% endif %}
</p>
</div>