mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 17:28:23 +00:00 
			
		
		
		
	Merge remote-tracking branch 'origin/master' into features/household-editor
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
| @@ -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; | ||||
|     } | ||||
|   | ||||
| @@ -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; | ||||
|      } | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -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> | ||||
|   | ||||
| @@ -6,127 +6,127 @@ | ||||
| <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"> | ||||
|   {% for m in members %} | ||||
|   <div class="item-bloc"> | ||||
|     <div class="item-row person"> | ||||
|       <div class="item-col box-person"> | ||||
|         <div> | ||||
|           {{ m.person|chill_entity_render_box({'addLink': true}) }} | ||||
|           {% if m.holder %} | ||||
|             <span class="badge badge-primary">{{ 'household.holder'|trans }}</span> | ||||
|   {%- 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"> | ||||
|             <div class="item-col box-person"> | ||||
|               <div> | ||||
|                 {{ m.person|chill_entity_render_box({'addLink': true}) }} | ||||
|                 {% if m.holder %} | ||||
|                   <span class="badge badge-primary">{{ 'household.holder'|trans }}</span> | ||||
|                 {% endif %} | ||||
|               </div> | ||||
|               <div> | ||||
|                 {{ 'Born the date'|trans({ 'gender': m.person.gender, 'birthdate': m.person.birthdate|format_date('long') }) }} | ||||
|               </div> | ||||
|             </div> | ||||
|             <div class="item-col box-where"> | ||||
|               <ul class="list-content fa-ul"> | ||||
|                 {% if m.startDate is not empty %} | ||||
|                   <li>{{ 'Since %date%'|trans({'%date%': m.startDate|format_date('long') }) }}</li> | ||||
|                 {% endif %} | ||||
|                 {% if m.endDate is not empty %} | ||||
|                   <li>{{ 'Until %date%'|trans({'%date%': m.endDate|format_date('long') }) }}</li> | ||||
|                 {% endif %} | ||||
|               </ul> | ||||
|               <ul class="record_actions"> | ||||
|                 <li> | ||||
|                   <a  | ||||
|                   href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}"  | ||||
|                   class="sc-button bt-edit"  | ||||
|                   /> | ||||
|                     {{ 'household.Update membership'|trans }} | ||||
|                   </a> | ||||
|                 </li> | ||||
|                 <li> | ||||
|                   <a href="#" class="sc-button" /><i class="fa fa-sign-out"></i>{{ 'household.Leave'|trans }}</a> | ||||
|                 </li> | ||||
|               </ul> | ||||
|             </div> | ||||
|           </div> | ||||
|           {% if m.comment is not empty %} | ||||
|             <div class="item-row comment"> | ||||
|               <blockquote class="chill-user-quote"> | ||||
|                 {{ m.comment|chill_markdown_to_html }} | ||||
|               </blockquote> | ||||
|             </div> | ||||
|           {% endif %} | ||||
|         </div> | ||||
|         <div> | ||||
|           {{ 'Born the date'|trans({ 'gender': m.person.gender, 'birthdate': m.person.birthdate|format_date('long') }) }} | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="item-col box-where"> | ||||
|         <ul class="list-content fa-ul"> | ||||
|           {% if m.startDate is not empty %} | ||||
|             <li>{{ 'Since %date%'|trans({'%date%': m.startDate|format_date('long') }) }}</li> | ||||
|           {% endif %} | ||||
|           {% if m.endDate is not empty %} | ||||
|             <li>{{ 'Until %date%'|trans({'%date%': m.endDate|format_date('long') }) }}</li> | ||||
|           {% endif %} | ||||
|         </ul> | ||||
|         <ul class="record_actions"> | ||||
|           <li> | ||||
|             <a  | ||||
|             href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}"  | ||||
|             class="sc-button bt-edit"  | ||||
|             /> | ||||
|               {{ 'household.Update membership'|trans }} | ||||
|             </a> | ||||
|           </li> | ||||
|           <li> | ||||
|             <a href="#" class="sc-button" /><i class="fa fa-sign-out"></i>{{ 'household.Leave'|trans }}</a> | ||||
|           </li> | ||||
|         </ul> | ||||
|       {% endfor %} | ||||
|     </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"> | ||||
|       {{ 'household.Show future or past memberships'|trans({'length': members|length}) }} | ||||
|     </button> | ||||
|  | ||||
|     <div id="nonCurrent_{{ p.id }}" class="collapse"> | ||||
|       <div class="flex-table list-household-members"> | ||||
|         {% for m in members %} | ||||
|           <div class="item-bloc"> | ||||
|             <div class="item-row person"> | ||||
|               <div class="item-col box-person"> | ||||
|                 <div> | ||||
|                   {{ m.person|chill_entity_render_box({'addLink': true}) }} | ||||
|                   {% if m.holder %} | ||||
|                     <span class="badge badge-primary">{{ 'household.holder'|trans }}</span> | ||||
|                   {% endif %} | ||||
|                 </div> | ||||
|                 <div> | ||||
|                   {{ 'Born the date'|trans({ 'gender': m.person.gender, 'birthdate': m.person.birthdate|format_date('long') }) }} | ||||
|                 </div> | ||||
|               </div> | ||||
|               <div class="item-col box-where"> | ||||
|                 <ul class="list-content fa-ul"> | ||||
|                   {% if m.startDate is not empty %} | ||||
|                     <li>{{ 'Since %date%'|trans({'%date%': m.startDate|format_date('long') }) }}</li> | ||||
|                   {% endif %} | ||||
|                   {% if m.endDate is not empty %} | ||||
|                     <li>{{ 'Until %date%'|trans({'%date%': m.endDate|format_date('long') }) }}</li> | ||||
|                   {% endif %} | ||||
|                 </ul> | ||||
|                 <ul class="record_actions"> | ||||
|                   <li> | ||||
|                     <a  | ||||
|                     href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}"  | ||||
|                     class="sc-button bt-edit"  | ||||
|                     /> | ||||
|                       {{ 'household.Update membership'|trans }} | ||||
|                     </a> | ||||
|                   </li> | ||||
|                 </ul> | ||||
|               </div> | ||||
|             </div> | ||||
|             {% if m.comment is not empty %} | ||||
|             <div class="item-row comment"> | ||||
|               <blockquote class="chill-user-quote"> | ||||
|                 {{ m.comment|chill_markdown_to_html }} | ||||
|               </blockquote> | ||||
|             </div> | ||||
|             {% endif %} | ||||
|           </div> | ||||
|         {% endfor %} | ||||
|       </div> | ||||
|     </div> | ||||
|     {% if m.comment is not empty %} | ||||
|     <div class="item-row comment"> | ||||
|       <blockquote class="chill-user-quote"> | ||||
|         {{ m.comment|chill_markdown_to_html }} | ||||
|       </blockquote> | ||||
|     </div> | ||||
|     {% endif %} | ||||
|   </div> | ||||
|   {% endfor %} | ||||
| </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"> | ||||
|   {{ 'household.Show future or past memberships'|trans({'length': members|length}) }} | ||||
| </button> | ||||
|  | ||||
| <div id="nonCurrent_{{ p.id }}" class="collapse"> | ||||
|   <div class="flex-table list-household-members"> | ||||
|     {% for m in members %} | ||||
|   <div class="item-bloc"> | ||||
|     <div class="item-row person"> | ||||
|       <div class="item-col box-person"> | ||||
|         <div> | ||||
|           {{ m.person|chill_entity_render_box({'addLink': true}) }} | ||||
|           {% if m.holder %} | ||||
|             <span class="badge badge-primary">{{ 'household.holder'|trans }}</span> | ||||
|           {% endif %} | ||||
|         </div> | ||||
|         <div> | ||||
|           {{ 'Born the date'|trans({ 'gender': m.person.gender, 'birthdate': m.person.birthdate|format_date('long') }) }} | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="item-col box-where"> | ||||
|         <ul class="list-content fa-ul"> | ||||
|           {% if m.startDate is not empty %} | ||||
|             <li>{{ 'Since %date%'|trans({'%date%': m.startDate|format_date('long') }) }}</li> | ||||
|           {% endif %} | ||||
|           {% if m.endDate is not empty %} | ||||
|             <li>{{ 'Until %date%'|trans({'%date%': m.endDate|format_date('long') }) }}</li> | ||||
|           {% endif %} | ||||
|         </ul> | ||||
|         <ul class="record_actions"> | ||||
|           <li> | ||||
|             <a  | ||||
|             href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}"  | ||||
|             class="sc-button bt-edit"  | ||||
|             /> | ||||
|               {{ 'household.Update membership'|trans }} | ||||
|             </a> | ||||
|           </li> | ||||
|         </ul> | ||||
|       </div> | ||||
|     </div> | ||||
|     {% if m.comment is not empty %} | ||||
|     <div class="item-row comment"> | ||||
|       <blockquote class="chill-user-quote"> | ||||
|         {{ m.comment|chill_markdown_to_html }} | ||||
|       </blockquote> | ||||
|     </div> | ||||
|     {% endif %} | ||||
|   </div> | ||||
|  | ||||
|     {% endfor %} | ||||
|   </div> | ||||
| </div> | ||||
|  | ||||
| {% endif %} | ||||
|   {% endif %} | ||||
|  | ||||
| {% endfor %} | ||||
|  | ||||
| <ul class="record_actions sticky-form-buttons"> | ||||
|   <li> | ||||
|     <a class="sc-button bt-create"> | ||||
|   | ||||
| @@ -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); | ||||
|  | ||||
|   | ||||
| @@ -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'] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user