{% include 'header.twig' %}
	
 <!-- Main variables *content* -->
		
	<main>
                 <div class="container-fluid mt-3">
                    <div class="row">
               <div class="col-lg-12">
                  <div class="card p-4">
                     <div class="row align-items-center">
                        <div class="col-md-auto col-12">
							                        </div>

                        <div class="col-lg">
                           <div class="search-services">
							  <form action="/updates" method="get" id="history-search">
								  <div class="icon">
									 <i class="ri-search-line"></i>
								  </div>
                              <input type="text" class="textbox" name="search" value="" placeholder="Search">
							  </form>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
            
            
            
      <div class="row">
        <div class="col-lg-12">
         
                   <div class="row">
               <div class="col-lg-12">
                  <div class="page overflow-hidden">
                     <div class="page-body pb-4 pb-xl-6 mt-4">
							<div class="services-head-row">
							  <div class="si-wrapper">
								<div class="service-item mb-4">
								  <div class="s-row s-title">
                                    									<div class="s-col s-col-sm">
								
									  ID
									</div>
									<div class="s-col s-title">
									  Service Name
									</div>
									<div class="s-col s-col-md">
									 Description
									</div>
									<div class="s-col s-col-md">
									 Date
									</div>
									<div class="s-col s-col-md">
								Action
									</div>    
      
          <tbody>



            {% for order in orders %}
              <tr>
<td>{{ order['service_id'] }}</td> 
                <td>{{ order['service_name'] }}</td>
               
                 <td>{{ order['description'] }}</td> 
      <td>{{ order['date'] }}</td> 
          <td><span class="badge" style="background-color: #ffb500">{{ order['action'] }}</span></span></td>
               

              </tr>
            {% endfor %}
</td>
          </tbody>
        </table>
      </div>
    <br>
     {% if pagination["count"] > 1 %}
        <ul class="pagination">

          {% if pagination["current"] != 1 %}
            <li>
              <a class="btn btn-actions" href="updates/{{ status }}/{{ pagination["previous"] }}{% if search %}?search={{ search }}{% endif %}" aria-label="Previous">
                <span aria-hidden="true">«</span>
              </a>
            </li>
          {% endif %}

          {% set r, l = 3, 3 %}

          {% if pagination['current'] == 1 %}
            {% set r = 7 %}
          {% endif %}

          {% if pagination['current'] == 2 %}
            {% set r = 5 %}
          {% endif %}

          {% if pagination['current'] >= pagination['count'] %}
            {% set l = 5 %}
          {% endif %}

          {% for page in 1..pagination["count"] %}
            {% if page >= (pagination['current']-l) and page <= (pagination['current']+r) %}
              <li{% if page == pagination['current'] %} class="active" {%endif%}><a class="btn btn-actions" 
 href="updates/{{ status }}/{{ page }}{% if search %}?search={{ search }}{% endif %}">{{ page }}</a></li>
            {%endif%}
          {% endfor %}

          {% if pagination['current'] < pagination['count'] %}
            <li>
              <a class="btn btn-actions" href="updates/{{ status }}/{{ pagination['next'] }}{% if search %}?search={{ search }}{% endif %}" aria-label="Next">
                <span aria-hidden="true">»</span>
              </a>
            </li>
          {% endif %}

        </ul>
      {% endif %}


    </div>
  </div>
</div></div></div></div>
</div></div></div></div></div></div>
</div>




<br><br><br><br><br>
{% include 'footer.twig' %}