{% extends 'base.html.twig' %}

{% block title %}Person{% endblock %}

{% block body %}
    <h1>Person</h1>

    <table class="table">
        <tbody>
            <tr>
                <th>First Name</th>
                <td>{{ person.firstName }}</td>
            </tr> 
            <tr>
                <th>Last Name</th>
                <td>{{ person.lastName }}</td>
            </tr>
            <tr>
                <th>Civility</th>
                <td>{{ person.civility }}</td>
            </tr>
            <tr>
                <th>Date Of Birth</th>
                <td>{{ person.dateOfBirth ? person.dateOfBirth|date('Y-m-d') : '' }}</td>
            </tr>
            <tr>
                <th>Place Of Birth</th>
                <td>{{ person.placeOfBirth }}</td>
            </tr>
            <tr>
                <th>Father Last Name</th>
                <td>{{ person.fatherLastName }}</td>
            </tr>
            <tr>
                <th>Father First Name</th>
                <td>{{ person.fatherFirstName }}</td>
            </tr>
            <tr>
                <th>Mother First Name</th>
                <td>{{ person.motherFirstName }}</td>
            </tr>
            <tr>
                <th>Mother Last Name</th>
                <td>{{ person.motherLastName }}</td>
            </tr>
            <tr>
                <th>Email</th>
                <td>{{ person.email }}</td>
            </tr>
            <tr>
                <th>Phone</th>
                <td>{{ person.phone }}</td>
            </tr>
            <tr>
                <th>Type Of Identification Document</th>
                <td>{{ person.typeOfIdentificationDocument }}</td>
            </tr>
            <tr>
                <th>Identification Document Number</th>
                <td>{{ person.identificationDocumentNumber }}</td>
            </tr>
            <tr>
                <th>Date Of Issue</th>
                <td>{{ person.dateOfIssue ? person.dateOfIssue|date('Y-m-d') : '' }}</td>
            </tr>
            <tr>
                <th>Picture Front Of Identification Document</th>
                <td>{{ person.pictureFrontOfIdentificationDocument }}</td>
            </tr>
            <tr>
                <th>Picture Back Of Identification Document</th>
                <td>{{ person.pictureBackOfIdentificationDocument }}</td>
            </tr>
            <!--tr>
                <th>Stop</th>
                <td>{{ person.stop }}</td>
            </tr-->
            <tr>
                <th>
                    Références
                </th>
                <td>
                    <span class="badge badge-info">ID :
                    {% if person.enrolmentId is not empty %}
                        {{ person.enrolmentId }}
                    {% else %}
                        {{"N/A"|trans}}
                    {% endif %} 
                </span><br>
                <span class="badge badge-info">UID : 
                    {% if person.enrolmentuid is not empty %}
                        {{ person.enrolmentuid }}
                    {% else %}
                        {{"N/A"|trans}}
                    {% endif %}
                </span><br>
                <span class="badge badge-success">SQR : 
                    {% if person.checkQr is not empty %}
                        {{ person.checkQr.numero }}
                    {% else %}
                        {{"N/A"|trans}}
                    {% endif %}
                </span>
                </td>
            </tr>
            <tr>
                <th>Date enrolled</th>
                <td>{{ person.dateCreated ? person.dateCreated|date('d-m-Y H:i:s') : '' }}</td>
            </tr>
        </tbody>
    </table>

    <a href="{{ path('app_person_index') }}">back to list</a>

    <a href="{{ path('app_person_edit', {'id': person.id}) }}">edit</a>

    {{ include('person/_delete_form.html.twig') }}
{% endblock %}
