Merge remote-tracking branch 'origin/master' into rector/rules-up-to-php74

This commit is contained in:
2023-04-27 23:32:31 +02:00
64 changed files with 584 additions and 577 deletions

View File

@@ -64,7 +64,7 @@ class ReferrerScopeAggregator implements AggregatorInterface
$qb->expr()->lte($userHistory . '.startDate', ':' . $dateCalc),
$qb->expr()->orX(
$qb->expr()->isNull($userHistory . '.endDate'),
$qb->expr()->lt($userHistory . '.endDate', ':' . $dateCalc)
$qb->expr()->gt($userHistory . '.endDate', ':' . $dateCalc)
)
)
)

View File

@@ -93,7 +93,7 @@ class ReferrerFilter implements FilterInterface
return [
'Filtered by referrer: only %referrers%', [
'%referrers' => implode(', ', $users),
'%referrers%' => implode(', ', $users),
], ];
}

View File

@@ -174,7 +174,10 @@ final class AccompanyingPeriodACLAwareRepository implements AccompanyingPeriodAC
->andWhere(
$qb->expr()->orX(
$qb->expr()->neq('ap.step', ':draft'),
$qb->expr()->eq('ap.createdBy', ':creator')
$qb->expr()->orX(
$qb->expr()->eq('ap.createdBy', ':creator'),
$qb->expr()->isNull('ap.createdBy')
)
)
)
->setParameter('draft', AccompanyingPeriod::STEP_DRAFT)

View File

@@ -14,6 +14,31 @@
@import './scss/person_by_phonenumber.scss';
@import './scss/address_history.scss';
/*
* Mixins
*/
@mixin context_buttons ($context) {
.chill-entity.entity-address .address {
padding-right: 1em;
}
.address-details-button,
.household-link {
border: 1px solid white;
background-color: transparent;
width: 1.85rem;
height: 1.85rem;
font-size: 75%;
padding: .38rem;
border-radius: 5px;
color: white;
cursor: pointer;
&:hover {
background-color: white;
color: $context
}
}
}
/*
* PERSON CONTEXT
@@ -39,17 +64,7 @@ div.banner {
margin-right: 1em;
}
}
.household-link {
border: 1px solid white;
padding: .05rem .3rem;
border-radius: 5px;
color: white;
cursor: pointer;
&:hover {
background-color: white;
color: $chill-person-context
}
}
@include context_buttons($chill-person-context);
}
}
@@ -219,6 +234,8 @@ div.banner {
font-weight: 700;
font-weight: bold;
}
@include context_buttons($chill-household-context);
}
}

View File

@@ -22,6 +22,7 @@
<div class="col-md-10">
<h1>{{ 'My accompanying periods in draft'|trans }}</h1>
<p class="help-text">{{ 'Display draft periods created by me'|trans }}</p>
<div class="flex-table accompanyingcourse-list">
{% for period in accompanyingPeriods %}
@@ -31,7 +32,9 @@
{% endfor %}
</div>
{{ chill_pagination(pagination) }}
{% if accompanyingPeriods|length > 0 %}
{{ chill_pagination(pagination) }}
{% endif %}
</div>

View File

@@ -58,7 +58,8 @@
{% else %}
<span class=" d-block d-sm-inline-block">
{{ address|chill_entity_render_box({
'render': 'inline', 'multiline': false, 'with_picto': true, 'with_delimiter': true
'render': 'inline', 'multiline': false, 'with_picto': true, 'with_delimiter': true,
'details_button': false
}) }}
</span>
{% endif %}

View File

@@ -23,7 +23,11 @@
{% if address is empty %}
<p class="chill-no-data-statement">{{ 'household.Household does not have any address currently'|trans }}</p>
{% else %}
{{ address|chill_entity_render_box({'multiline': true, 'extended_infos': true }) }}
{{ address|chill_entity_render_box({
'multiline': true,
'extended_infos': true,
'details_button': true
}) }}
{% endif %}
<ul class="list-inline text-right mt-2">

View File

@@ -19,25 +19,25 @@
<div id="header-person-details" class="header-details">
<div class="container-xxl">
<div class="row justify-content-between">
<div class="col-md-12 ps-md-5 ps-xxl-0 container">
<div class="row contact">
<div class="col-md-12 ps-md-5 ps-xxl-0">
<div class="contact">
{% if person.phonenumber %}
<span class="phonenumber d-block d-sm-inline-block">
<span class="col-auto phonenumber">
<i class="fa fa-fw fa-phone"></i>
<a href="{{ 'tel:' ~ person.phonenumber|phone_number_format('E164') }}" class="phone mr-3" title="{{ 'Phonenumber'|trans }}">
{{ person.phonenumber|chill_format_phonenumber }}</a>
</span>
{% endif %}
{% if person.mobilenumber %}
<span class="mobilenumber d-block d-sm-inline-block">
<span class="col-auto mobilenumber">
<i class="fa fa-fw fa-mobile"></i>
<a href="{{ 'tel:' ~ person.mobilenumber|phone_number_format('E164') }}" class="phone mr-3" title="{{ 'Mobilenumber'|trans }}">
{{ person.mobilenumber|chill_format_phonenumber }}</a>
</span>
{% endif %}
{% if person.email %}
<span class="email d-block d-sm-inline-block">
<span class="col-auto email">
<i class="fa fa-fw fa-envelope-o"></i>
<a href="{{ 'mailto:' ~ person.email }}" class="email" title="{{ 'Email'|trans }}">
{{ person.email }}
@@ -51,23 +51,25 @@
{%- elseif person.lastAddress is not empty -%}
{% set address = person.lastAddress %}
{%- endif -%}
{%- if address is not null -%}
<span class=" d-block d-sm-inline-block">
<span class="col-md-auto address">
{%- if address is not null -%}
{{ address|chill_entity_render_box({
'render': 'inline', 'multiline': false, 'with_picto': true, 'with_delimiter': true
'render': 'inline', 'multiline': false, 'with_picto': true, 'with_delimiter': true,
'details_button': false
}) }}
</span>
{%- endif -%}
{% if person.getCurrentHousehold is not null %}
<span>
<a class="household-link" href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id' : person.getCurrentHousehold.id } ) }}">
<i class="fa fa-home"></i>
{%- endif -%}
{% if person.getCurrentHousehold is not null %}
<a class="btn household-link text-end"
href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id' : person.getCurrentHousehold.id } ) }}"
title="{{ 'Show household'|trans }}">
<i class="fa fa-lg fa-home"></i>
</a>
</span>
{% endif %}
{% endif %}
</span>
</div>
</div>
</div>
</div>
</div>

View File

@@ -287,7 +287,7 @@ final class SocialWorkMetadata implements SocialWorkMetadataInterface
$return['socialActionChild'] = $previousSocialActionChild;
} else {
$return['socialActionChild'] = $child = (new SocialAction())->setTitle(['fr' => $socialActionChildTitle]);
$parent->addChild($child);
$child->setParent($parent);
$child->setIssue($socialIssue)->setOrdering($orderingChild);
$this->entityManager->persist($child);
}
@@ -332,7 +332,7 @@ final class SocialWorkMetadata implements SocialWorkMetadataInterface
} elseif (null !== $socialIssueChildTitle) {
$return['socialIssueChild'] = $child = (new SocialIssue())->setTitle(['fr' => $socialIssueChildTitle])
->setOrdering($orderingChild);
$parent->addChild($child);
$child->setParent($parent);
$this->entityManager->persist($child);
} else {
$return['socialIssueChild'] = null;

View File

@@ -966,6 +966,7 @@ Linked evaluations: Évaluations associées
# Accompanying period per user
My accompanying periods: Mes parcours
My accompanying periods in draft: Mes parcours brouillons
Display draft periods created by me: Affiche les parcours en attente de confirmation. Ils ne sont visibles que par moi-même. Ces parcours restent disponibles 15 jours après leur création, avant d'être supprimés automatiquement.
Number of periods: Nombre de parcours
workflow: