{% extends '@ChillPerson/Household/layout.html.twig' %} {% block title 'household.Household summary'|trans %} {% block block_post_menu %}
{% endblock %} {% block content %}
{#

{{ block('title') }}

{{ 'household.Current address'|trans }}

#} {% set address = household.currentAddress %}

{{ 'Address'|trans }}

{% if address is empty %}

{{ 'household.Household does not have any address currently'|trans }}

{% else %} {{ address|chill_entity_render_box({'multiline': true, 'extended_infos': true }) }} {% endif %}
  • {# include vue_address component #} {% include '@ChillMain/Address/_insert_vue_address.html.twig' with { targetEntity: { name: 'household', id: household.id }, backUrl: path('chill_person_household_summary', { 'household_id': household.id }), onlyButton: true, mode: 'new', buttonSize: 'btn-sm', buttonText: 'Move household', modalTitle: 'Move household', buttonDisplayText: false, } %}
{% if form is null %} {% if household.waitingForBirth or not household.commentMembers.isEmpty() %}
{% if household.waitingForBirth %} {% if household.waitingForBirthDate is not null %} {{ 'household.Expecting for birth on date'|trans({ 'date': household.waitingForBirthDate|format_date('long') }) }} {% else %} {{ 'household.Expecting for birth'|trans }} {% endif %} {% endif %} {% if not household.commentMembers.isEmpty() %} {{ household.commentMembers|chill_entity_render_box }} {% endif %}
{% endif %} {% if not household.commentMembers.isEmpty() %} {{ 'household.Edit comment and expecting birth'|trans }} {% else %} {{ 'household.New comment and expecting birth'|trans }} {% endif %} {% else %} {{ form_start(form) }}
{{ form_widget(form.waitingForBirth) }}
{{ form_widget(form.waitingForBirthDate) }}
{{ form_widget(form.commentMembers) }}
{{ form_end(form) }} {% endif %}

{{ 'household.Household members'|trans }}

{% for p in positions %}

{{ p.label|localize_translatable_string }} {% if false == p.shareHousehold %} {% endif %}

{%- set members = household.currentMembersByPosition(p) %} {% macro customButtons(member, household) %}
  • {% endmacro %} {% if members|length > 0 %}
    {% for m in members %} {% include '@ChillPerson/Household/_render_member.html.twig' with { 'member': m, 'customButtons': { 'after': _self.customButtons(m, household) } } %} {% endfor %}
    {% else %}

    {{ 'household.Any persons into this position'|trans }}

    {% endif %} {% set members = household.nonCurrentMembersByPosition(p) %} {% if members|length > 0 %}

    {% for m in members %} {% include '@ChillPerson/Household/_render_member.html.twig' with { 'member': m } %} {% endfor %}
    {% endif %}
    {% endfor %}
    {% endblock %} {% block js %} {{ encore_entry_script_tags('page_household_edit_metadata') }} {% endblock %}