{% 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">Between Dates Report of Visitor Pass</h4>
                                <div class="basic-form">
                                   
                                    <form method="get" action="" enctype="multipart/form-data" action="{% url 'between_date_report' %}">
                                        {% csrf_token %}
                                        <div class="form-group row">
                                            <label class="col-sm-2 col-form-label">From Date</label>
                                            <div class="col-sm-10">
                                                <input type="date" id="query" name="start_date" class="form-control" required="">
                                            </div>
                                        </div>
                                         <div class="form-group row">
                                            <label class="col-sm-2 col-form-label">To Date</label>
                                            <div class="col-sm-10">
                                                <input type="date" id="query" name="end_date" class="form-control" required="">
                                            </div>
                                        </div>


                                        <div class="form-group row">
                                            <div class="col-sm-10">
                                                <button type="submit" class="btn btn-dark">Submit</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                  </div>
</div>

<div class="container-fluid">
    <div class="row">
    <div class="col-lg-12">
                            <div class="card">
                                <div class="card-body">
                                    {% if vispass %}
                                    <p style="font-size: 20px;color: blue;text-align: center;">Pass Created Details: From "{{ start_date }} to {{ end_date }}"</p>
                                   
                                    <div class="table-responsive">
                                        <table class="table table-striped table-bordered zero-configuration">
                                            <thead>
                                                <tr>
                                                    <th>S.No</th>
                                                    <th>Full Name</th>
                                                    <th>Contact Number</th>
                                                    <th>Entery Date and Time</th>
                                                    <th>Apartment Number</th>
                                                    <th>Floor/Wings</th>
                                                    <th>Action</th>
                                                    
                                                </tr>
                                            </thead>
                                            <tbody>
                                                {% for i in vispass %}
                                                <tr>
                                                    <td>{{ i.id}}</td>
                                                    <td>{{ i.visname}}</td>
                                                    <td>{{ i.mobilenumber}}</td>
                                                    <td>{{ i.created_at}}</td>
                                                    <td>{{ i.apartment}}</td>
                                                    <td>{{ i.floor}}</td>
                                                  
                                                    <td><a href="{% url 'view_visitor_pass' i.id %}" class="btn btn-success">View Details </a><a href="{% url 'delete_visitor_pass' i.id %}" class="btn btn-danger">Delete</a></td>
                                                   
                                                </tr>
                                                {% endfor %}
                                            </tbody>
                                           
                                      
                                        {% endif %}
                                    
                                       
                                           
                                        </table>
                                        
                                    </div>
                                        
                                    </div>
                                </div>
                            </div>
                        </div>
                      </div>
    </div>
    
    

{% endblock %}