<style>
    .table-container {
        height: 400px; /* Set the desired height for the table container */
        overflow-y: auto; /* Enable vertical scrolling */
    }

    .table thead th {
        position: sticky;
        top: 0;
        background-color: #343a40; /* Set the desired background color for the header */
    }
</style>


<div class="table-responsive" style="height: 400px;">
    <div>
        <table class="table align-items-center table-dark">
            <thead class="thead-dark">
                <tr>
                    <th scope="col">
                        Parameters
                    </th>
                    <th scope="col">
                        Details
                    </th>
                </tr>
            </thead>
            <tbody class="list">
                {% for key, value in employeelist.items() %} 
                <tr>
                    <td class="budget">
                        {{key}}
                    </td>
                    {% if key == "License Details" %}
                    <td class="status">
                        <u><a data-id="{{cloudName}}" class="licenceEnabled" style="cursor: pointer;">
                            <span>
                                <i class="bg-warning"></i>Click here
                            </span>
                          </a></u>
                        
                    </td>
                    {% else %}
                    <td class="status">
                        
                        <span>
                            <i class="bg-warning"></i>{{value | add_comma}}
                        </span>
                    </td>
                    {% endif%}
                </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>

</div>

<div class="modal fade" id="licenceMore" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
  aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">License Details</h5>
        <a class="close" id="licenseClose" aria-label="Close" style="cursor: pointer;">
          <span aria-hidden="true">&times;</span>
        </a>  
      </div>
      <div class="enabled-body">
        ...
      </div>
    </div>
  </div>
</div>


<script type='text/javascript'>
    $(document).ready(function () {
        $('.licenceEnabled').click(function () {
            var userid = $(this).data('id');
            $.ajax({
                url: '/LicenceMore',
                type: 'post',
                data: { userid: userid },
                success: function (data) {
                    $('.enabled-body').html(data);
                    console.log("Calling this line 73");
                    $('.enabled-body').append(data.htmlresponse);
                    console.log("Calling this line 75");
                    $('#licenceMore').modal('show');
                    console.log("Calling line 77");

                }
            });
        });
        $('#licenseClose').click(function () {
            console.log("line 83");
            $('#licenceMore').modal('hide');
        });
    });
  </script>


