Merge remote-tracking branch 'origin/master' into features/household-editor

This commit is contained in:
Julien Fastré 2021-06-10 11:01:59 +02:00
commit abc79249a2
7 changed files with 143 additions and 144 deletions

View File

@ -41,12 +41,6 @@ table {
}
}
// règle la typo des étiquettes de dénomination rendues avec renderBox
.chill_denomination {
font-size: 1.3em;
font-weight: 700;
}
/*
* ACCOMPANYING_COURSE
* Header custom for Accompanying Course

View File

@ -21,38 +21,38 @@ class Position
* @ORM\Column(type="integer")
* @Serializer\Groups({ "read" })
*/
private $id;
private ?int $id;
/**
* @ORM\Column(type="json")
* @Serializer\Groups({ "read" })
*/
private $label = [];
private array $label = [];
/**
* @ORM\Column(type="boolean")
* @Serializer\Groups({ "read" })
*/
private $shareHouseHold;
private bool $shareHouseHold = true;
/**
* @ORM\Column(type="boolean")
* @Serializer\Groups({ "read" })
*/
private $allowHolder;
private bool $allowHolder = false;
/**
* @ORM\Column(type="float")
* @Serializer\Groups({ "read" })
*/
private $ordering;
private float $ordering = 0.00;
public function getId(): ?int
{
return $this->id;
}
public function getLabel(): ?array
public function getLabel(): array
{
return $this->label;
}
@ -64,7 +64,7 @@ class Position
return $this;
}
public function getShareHousehold(): ?bool
public function getShareHousehold(): bool
{
return $this->shareHouseHold;
}
@ -76,12 +76,12 @@ class Position
return $this;
}
public function getAllowHolder(): ?bool
public function getAllowHolder(): bool
{
return $this->allowHolder;
}
public function isAllowHolder(): ?bool
public function isAllowHolder(): bool
{
return $this->getAllowHolder();
}
@ -93,7 +93,7 @@ class Position
return $this;
}
public function getOrdering(): ?float
public function getOrdering(): float
{
return $this->ordering;
}

View File

@ -2,6 +2,20 @@
div.list-with-period,
div.list-household-members,
div.list-household-members--summary {
.chill-entity__person {
.chill-entity__person__first-name,
.chill-entity__person__last-name {
font-size: 1.3em;
font-weight: 700;
}
}
.chill_denomination {
font-size: 1.3em;
font-weight: 700;
}
div.person {
ul.record_actions {
li {
@ -44,13 +58,4 @@ div.list-household-members--summary {
}
}
}
.chill-entity__person {
.chill-entity__person__first-name,
.chill-entity__person__last-name,
// text is used in vue component 'Person'
.chill-entity__person__text {
font-size: 1.3em;
font-weight: 700;
}
}
}

View File

@ -4,7 +4,7 @@
<div class="grid-6">{% set title = title %}
<h1>
<i class="fa fa-child"></i>
<i class="fa fa-home"></i>
{{ 'household.Household'|trans }}
<span style="font-weight: lighter; font-size: 50%;">(n°{{ household.id }})</span>
</h1>

View File

@ -6,15 +6,15 @@
<h1>{{ block('title') }}</h1>
{% for p in positions %}
<h3>{{ p.label|localize_translatable_string }}</h3>
<h3>{{ p.label|localize_translatable_string }}</h3>
{% if false == p.shareHousehold %}
<p>{{ 'household.Those members does not share address'|trans }}</p>
{% endif %}
{% if false == p.shareHousehold %}
<p>{{ 'household.Those members does not share address'|trans }}</p>
{% endif %}
{%- set members = household.currentMembersByPosition(p) %}
{% if members|length > 0 %}
<div class="flex-table list-household-members">
{%- set members = household.currentMembersByPosition(p) %}
{% if members|length > 0 %}
<div class="flex-table list-household-members">
{% for m in members %}
<div class="item-bloc">
<div class="item-row person">
@ -62,19 +62,19 @@
{% endif %}
</div>
{% endfor %}
</div>
{% else %}
<p class="chill-no-data-statement">{{ 'household.Any persons into this position'|trans }}</p>
{% endif %}
</div>
{% else %}
<p class="chill-no-data-statement">{{ 'household.Any persons into this position'|trans }}</p>
{% endif %}
{% set members = household.nonCurrentMembersByPosition(p) %}
{% if members|length > 0 %}
<p><!-- force a space after table --></p>
<button class="sc-button bt-green" type="button" data-toggle="collapse" data-target="#nonCurrent_{{ p.id }}" aria-expanded="false" aria-controls="collapse non current members">
{% set members = household.nonCurrentMembersByPosition(p) %}
{% if members|length > 0 %}
<p><!-- force a space after table --></p>
<button class="sc-button bt-green" type="button" data-toggle="collapse" data-target="#nonCurrent_{{ p.id }}" aria-expanded="false" aria-controls="collapse non current members">
{{ 'household.Show future or past memberships'|trans({'length': members|length}) }}
</button>
</button>
<div id="nonCurrent_{{ p.id }}" class="collapse">
<div id="nonCurrent_{{ p.id }}" class="collapse">
<div class="flex-table list-household-members">
{% for m in members %}
<div class="item-bloc">
@ -119,14 +119,14 @@
</div>
{% endif %}
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% endif %}
{% endfor %}
<ul class="record_actions sticky-form-buttons">
<li>
<a class="sc-button bt-create">

View File

@ -84,7 +84,7 @@ class HouseholdMemberControllerTest extends WebTestCase
$form = $crawler->selectButton('Enregistrer')
->form();
$form['household_member[endDate]'] = (new \DateTime('tomorrow'))
->format('d-m-Y');
->format('Y-m-d');
$crawler = $client->submit($form);

View File

@ -63,14 +63,14 @@ services:
resource: '../Repository/'
tags: ['doctrine.repository_service']
Chill\PersonBundle\Controller\:
autowire: true
resource: '../Controller/'
tags: ['controller.service_arguments']
Chill\PersonBundle\Templating\Entity\:
autowire: true
autoconfigure: true
resource: '../Templating/Entity'
tags:
- 'chill.render_entity'
Chill\PersonBundle\Controller\:
autowire: true
resource: '../Controller/'
tags: ['controller.service_arguments']