{% extends 'template.html.twig' %}

{% block title %} Attendance Action List - {{ parent() }} {% endblock %}

{% block body %}
<!-- Title Start  -->
                        <div class="app-page-title">
                            <div class="page-title-wrapper">

                                <div class="page-title-heading">
                                    <div class="page-title-icon">
                                        <i class="metismenu-icon pe-7s-diamond text-success">
                                        </i>
                                    </div>
                                    <div><h3>Attendance Action</h3>
                                       
                                    </div>
                                </div>
								
                                <div class="page-title-actions">
                                   <div class="d-inline-block dropdown">
                                       <nav class="" aria-label="breadcrumb">
                                                    <ol class="breadcrumb">
                                                        <li class="breadcrumb-item"><a href="#">Home</a></li>
                                                        <li class="active breadcrumb-item" aria-current="page">Attendance Action List</li>
                                                        
                                                    </ol>
                                                </nav>
                                    </div>
                                </div> 
								
							</div>
                        </div>    
                        {% for message in app.flashes('notice') %}
                            
                        <div class="alert alert-info alert-dismissible">
                            <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
                            <strong>{{ message }}</strong> 
                        </div>
                        {% endfor %}  					
						{# <ul class="body-tabs body-tabs-layout tabs-animated body-tabs-animated nav">
                            
                            <li class="nav-item">
                                <a role="tab" class="nav-link active"  href="{{ path('manifest_new') }}">
                                    <span><i class="fa fa-plus"> Add Sales Invoice</i></span>
                                </a>
                            </li>
                        </ul> <!-- Title End  -->  #}
						
						<!-- Tab Start  --> 
                        <div class="tab-content">
						
						    <!-- Table Tab Start  --> 
                            <div class="tab-pane tabs-animation fade show active" id="tab-content-0" role="tabpanel">
                                <div class="main-card mb-3 card">
                                    <div class="card-body">
									
                                         {{ form_start(form) }}
                                        <div class="form-row">
                                              <div class="col-md-3 mb-3">                                             
                                                  {{ form_row(form.pin ) }}
                                                </div>
                                                <div class="col-md-3 mb-3">
                                                  {{ form_row(form.name) }}
                                                </div>
                                                <div class="col-md-2 mb-2">
                                                     {{ form_row(form.fiscalYear) }}
                                                </div>
                                                <div class="col-md-2 mb-2">
                                                     {{ form_row(form.month) }}
                                                </div>
                                                <div class="col-md-2 mb-2" style="margin-top:2px;">
                                                     <button class="btn btn-alternate"><i class="fa fa-search">{{ button_label|default(' Search') }}</i></button>
                                                </div>
                                        </div>
                                         
                                                                             
                                        {{ form_end(form) }} 
					
                                   
                                        <div class="table table-bordered table-responsive table-striped table-hover">
										
                                            <table class="mb-0 table">
                                                <thead>
                                                <tr>
                                                    <th>#</th>
                                                    <th>PIN</th>
                                                    <th>Name</th>
                                                    <th>Year</th>                                                                                                        
                                                    <th>Month</th>
                                                    <th>Present</th>   
                                                    <th>Absent</th>  
                                                    <th>Late</td>    
                                                    <th>Early<br>out </th>   
                                                    <th>UE</th> 
                                                    <th>Leave</th>   
                                                    <th>Holiday</th>
                                                    <th>Working<br>days</th>
                                                    <th>AL</th>
                                                    <th>CL</th>
                                                    <th>Emp. Email</th>
                                                    <th>CC</th>
                                                    <th><i class="fa fa-cogs" aria-hidden="true"></i> Actions</th>
                                                </tr>
                                                </thead>
                                                <tbody>
                                                  {% set counter = 0 %}                                                
                                                  {% for attendenceAction in attendenceActions %}
                                                  
                                                    {% set counter = counter + 1 %}
                                                    <tr>
                                                      <td>{{ counter }}</td>
                                                      <td>{{ attendenceAction.Pin }}</td>    
                                                      <td>{{ attendenceAction.Emp_Name }}</td>                                                 
                                                      <td>{{ attendenceAction.FiscalYear }}</td>
                                                      <td> 
                                                            {% if attendenceAction.Month == 1  %}
                                                                January
                                                            {% elseif attendenceAction.Month == 2 %}
                                                                February
                                                            {% elseif attendenceAction.Month == 3 %}
                                                                March
                                                            {% elseif attendenceAction.Month == 4 %}
                                                                April
                                                            {% elseif attendenceAction.Month == 5 %}
                                                                May
                                                            {% elseif attendenceAction.Month == 6 %}
                                                                June
                                                            {% elseif attendenceAction.Month == 7 %}
                                                                July            
                                                            {% elseif attendenceAction.Month == 8 %}
                                                                August
                                                            {% elseif attendenceAction.Month == 9 %}
                                                                September    
                                                            {% elseif attendenceAction.Month == 10 %}
                                                                October
                                                            {% elseif attendenceAction.Month == 11 %}
                                                                November
                                                            {% else  %}
                                                                December
                                                            {% endif %}

                                                      </td>
                                                      <td>{{ attendenceAction.present_day }} </td>
                                                      <td>{{ attendenceAction.absent_day }} </td>
                                                      <td>{{ attendenceAction.late_day }} </td>
                                                      <td>{{ attendenceAction.early_day }} </td>
                                                      <td>{{ attendenceAction.unothorize_day }} </td>
                                                      <td>{{ attendenceAction.leave_day }} </td>
                                                      <td>{{ attendenceAction.holiday_day }} </td>
                                                      <td>{{ attendenceAction.working_day }} </td>
                                                      <td>{{ attendenceAction.al_days }} </td>
                                                      <td>{{ attendenceAction.cl_days }} </td>
                                                      <td>{{ attendenceAction.email_id }} </td>
                                                      <td>{{ attendenceAction.cc_emailId }} </td>
                                                      <td>
                                                        <a href="{{ path('attendance_email', {'pin': attendenceAction.Pin, 'fiscalYear': attendenceAction.FiscalYear, 'month' : attendenceAction.Month }) }}" class="btn btn-success btn-sm" data-toggle="tooltip" data-placement="top" title="Email Notification"><i class="fa fa-eye"></i></a>

                                                        <a href="{{ path('attendance_directEmail', {'pin': attendenceAction.Pin, 'fiscalYear': attendenceAction.FiscalYear, 'month' : attendenceAction.Month }) }}" class="btn btn-success btn-sm" data-toggle="tooltip" data-placement="top" title="Direct Notification"><i class="fa fa-eye"></i></a>
                                                      </td>                                                     
                                                    
                                                    </tr>
                                                  {% else %}
                                                  <tr>
                                                    <td colspan="25">No records found</td>
                                                  </tr>
                                                 {% endfor %}
                                                </tbody>
                                            </table>

                                     

                                        </div>


                                        
                                    </div>
                                </div>
								
                              
                            </div> <!-- Table Tab End  --> 
														
                        </div> <!-- Tab End  --> 


{% endblock %}

