{% extends "portal/hod_template/base.html" %}

{% block main_content %}





<!-- Main content -->
<section class="content">
  <div class="container-fluid">
      <!-- /.row -->
      <div class="row">
          <div class="col">
              <div class="mb-5 mr-3">
                  <button type="button" class="btn btn-success shadow float-right" data-toggle="modal" data-target="#modal-lg">
                      <i class="fas fa-plus"></i>   Add new customer
                    </button>
              </div>
          </div>
      </div>
      
      <div class="row">
          <div class="col-12">
              <div class="card">
                  <div class="card-header">
                      <h3 class="card-title text-dark">Customer Details</h3>

                      <div class="card-tools">
                          <div class="input-group input-group-sm" style="width: 150px;">
                              <input type="text" name="table_search" class="form-control float-right"
                                  placeholder="Search">

                              <div class="input-group-append">
                                  <button type="submit" class="btn btn-default"><i class="fas fa-search"></i></button>
                              </div>
                          </div>
                      </div>
                  </div>
                  <!-- /.card-header -->
                  <div class="card-body text-dark table-responsive p-0">
                      <table class="table text-black table-hover text-nowrap">
                          <thead>
                              <tr>
                                  <th>ID</th>
                                  <th>First Name</th>
                                  <th>Last Name</th>
                                  
                                  <th>Email</th>
                        
                                  <th>Action</th>
                              </tr>
                          </thead>
                          <tbody>
                            {% for account in object_list %}
                              <tr>
                                  <td>{{account.id}}</td>
                                  <td>{{account.user.first_name}}</td>
                                  <td>{{account.user.last_name}}</td>
                                 
                                  <td>{{account.user.email}}</td>
                              
                                  <th> <a name="" id="" class="btn btn-success"
                                          href="{#% url "edit_customer" customer.pk %#}" role="button"><i
                                              class="fas fa-edit text-white"></i></a>
                                              <a name="" id="" class="btn btn-danger"
                                              href="{% url 'account_instant_delete' account.pk %}" role="button"><i
                                                  class="fas fa-trash text-white"></i></a>
                                                  <a name="" id="" class="btn btn-dark"
                                                  href="{% url 'account_detail' account.pk %}" role="button"><i
                                                      class="fas fa-eye text-white"></i></a> </th>


                                  {% endfor %}
                          </tbody>
                      </table>
                  </div>
                  <!-- /.card-body -->
              </div>
              <!-- /.card -->
          </div>
      </div>
      <!-- /.row -->

      {% include "portal/hod_template/modals/customer_create_form.html" %}

  </div><!-- /.container-fluid -->
</section>
<!-- /.content -->

{% endblock main_content %}