{% extends 'base.html' %}
{% block content %}
<div class="container-fluid mt-3">
<div class="row">
<div class="col-lg-12">
                        <div class="card">
                            <div class="card-body">
                                <h4 class="card-title">Manage Visitor</h4>
                                <div>
                                    {% include 'includes/messages.html' %}
                                <div class="table-responsive">
                                    <table class="table table-bordered">
                                        <thead>
                                            <tr>
                                                <th>S.No</th>
                                                <th>Full Name</th>
                                                <th>Contact Number</th>
                                                <th>Email</th>
                                                <th>Entery Date and Time</th>
                                                <th>Status</th>
                                                <th>Action</th>
                                                
                                            </tr>
                                        </thead>
                                        <tbody>
                                            {% for i in visitor %}
                                            <tr>
                                                <td>{{ i.id}}</td>
                                                <td>{{ i.fullname}}</td>
                                                <td>{{ i.mobilenumber}}</td>
                                                <td>{{ i.email}}</td>
                                                <td>{{ i.created_at}}</td>
                                                {% if i.status == '0' %}
                                                <td>Visitor In</td>
                                                {% else %}
                                                <td>{{ i.status}}</td>{% endif %}
                                                <td><a href="{% url 'update_visitor' i.id %}" class="btn btn-success">Update </a><a href="{% url 'delete_visitor' i.id %}" class="btn btn-danger">Delete</a></td>
                                               
                                            </tr>
                                            {% endfor %}
                                        </tbody>
                                        <tfoot>
                                            <tr>
                                                <th>S.No</th>
                                                <th>Full Name</th>
                                                <th>Contact Number</th>
                                                <th>Email</th>
                                                <th>Entery Date and Time</th>
                                                <th>Status</th>
                                                <th>Action</th>
                                            </tr>
                                        </tfoot>
                                    </table>
                                </div>
                                    
                                </div>
                            </div>
                        </div>
                    </div>
                  </div>
</div>


{% endblock %}