{% extends '@kohinos/common/layout.html.twig' %}

{% block content %}
<div class='container adherent_infos'>
	<div class="row">
		<div class="col-6">
			<div class='infos mt-4'>
				<h4>{{ "Modifier mes informations"|trans }} :</h4>
				<p>
					{{ form_start(form) }}
						{{ form_row(form.user) }}
						{{ form_row(form.geoloc) }}
						{{ form_row(form.groupe) }}
						{{ form_row(form.save) }}
					{{ form_end(form) }}
				</p>
			</div>
		</div>
		<div class="col-6">
			{% if app.user.adherent is not null and app.user.adherent.emlcAccount.balance >= 0 %}
				<div class='ecompte mt-4'>
					<h4>{{ "Mon ecompte"|trans }} :</h4>
					<ul class='list-group'>
						<li class="list-group-item">{{(app.user.adherent.emlcAccount.balance)|number_format(2, '.', ',')}}</li>
					</ul>
				</div>
			{% endif %}
			{# @TODO : afficher les cotisations #}
			{# {% if app.user.adherent.cotisations|length > 0 %}
				<div class='cotisations mt-4'>
					<h4>{{ "Mes cotisations"|trans }} :</h4>
					<ul class='list-group'>
						{% for cotisation in app.user.adherent.cotisations %}
							<li class="list-group-item">{{cotisation.annee|upper}} : {{cotisation.montant}}&euro; ({{ 'payée le'|trans }} {{cotisation.createdAt|date('d-m-Y')}})</li>
						{% endfor %}
					</ul>
				</div>
			{% endif %} #}
			{# {% if app.user.flux|length > 0 %}
				<div class='flux mt-4'>
					<h4>{{ "Mes transactions"|trans }} :</h4>
					<ul class='list-group'>
						{% for flux in app.user.flux %}
							<li class="list-group-item">{{flux.parenttype|capitalize}} à {{flux.destinataire}} {{flux.montant}}&euro; ({{ 'payée le'|trans }} {{flux.createdAt|date('d-m-Y')}})</li>
						{% endfor %}
					</ul>
				</div>
			{% endif %} #}
		</div>
	</div>
</div>
{% endblock %}
