<table class="datatable-show-all table">
    <thead class="{{ class }}">
    <tr>
       
            <th>
                <div style="white-space: normal!important; display: flex; flex-direction: row; justify-content: space-between;align-items: center;">
                    <span>Appart.</span>
                    <span>N° App.</span>
                </div>
            </th>
            <th>Occupé par</th>
            <th>Zone</th>
            <th>Mt. du loyer</th>
            <th>Commission</th>
            <th>Démarcheur</th>
            <th>Status</th>
            <th>Actions</th>
    </tr>
    </thead>
    <tbody>
     {% set total = 0 %}
        {% for propertie in properties %}
       
        <tr>
            <td>{{ demarcheur.nom }} {{ demarcheur.prenom }}</td>
            
            <td>
               {{ demarcheur.email }}
            </td>
            <td>
               {{ demarcheur.telephone }}
            </td>

            <td>
                <div class="custom-control custom-switch {% if demarcheur.active %}custom-control-success{% else %}custom-control-danger{% endif %}">
                    <input type="checkbox" data-id="{{ demarcheur.id }}" class="custom-control-input js-status-input" id="status-{{ demarcheur.id }}" {% if demarcheur.active %}checked{% endif %}>
                    <label class="custom-control-label position-static p-0" for="status-{{ demarcheur.id }}"></label>
                </div>
            
            <td>{{ demarcheur.createdAt|date('d/m/Y à H:i:s') }}</td>
            <td style="text-align: center!important;display: flex; flex-direction: row; justify-content: center; align-items: center;">
                <div class="list-icons">
                    <div class="dropdown">
                        <a href="javascript:" class="list-icons-item" data-toggle="dropdown">
                            <i class="icon-menu9"></i>
                        </a>
                        <div class="dropdown-menu dropdown-menu-right">
                           
                            {{ action_form(propertie, path('admin.properties.edit', {'id': propertie.id}), 'Modifier') }}
                            {{ delete_form(propertie, path('admin.properties.delete', {'id': propertie.id}), 'Etes vous sûr de vouloir supprimer cette proprietée?', 'Supprimer') }}
                        </div>
                    </div>
                </div>
            </td>
        </tr>
    {% else %}
        <tr>
            <td colspan="8">{{ data_none }}</td>
        </tr>
    {% endfor %}
    </tbody>
</table>
<script type="module">
    import Save from "{{ asset('js/modules/module.js') }}";
    Save('/admin/api/locataires/check-status')
</script>