<<<<<<< 8c98d41a67e0ec45e1fd64b04b779360352c1dcf
@extends('Layout.Employeesmaster')
=======
@extends('Layout.employees_master')
>>>>>>> Storing employee info

@section('title', 'Employees')
@section('header-include')
<style>
form {
  border-radius: 5px; 
  width:100%;   
  background-color: #FFFFFF;
  overflow: hidden;
}

p span {
  color: #F00;
}

p {
  margin: 0px;
  font-weight: 500;
  line-height: 2;
  color:#333;
}

a {
  text-decoration:inherit
}


.form-group {
  overflow: hidden;
  clear: both;
}
 .form-control {
    
    position:relative;
    clear: both;    
    margin-top: 2px;
    display:inline-inline;    
    margin-right: 10px;
}
</style>
@endsection

@section('content')

<section id="content">    
        <section class="scrollable padder">
                <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
                    <li><a href="."><i class="fa fa-home"></i> Home</a></li>                    
                    <li class="active">Reporting Manager</li>
                </ul>              
               
                @include('Layout.messages')
                @include('Layout.errors')
                <div class=container-fluid>
                    <div class=row>
                    <legend style="padding:25px 5px 5px 10px">Reporting Manager</legend>
                        <div class="pull-right" style="margin:5px 20px 5px 10px;">
                        <a href="" class="btn btn-info btn-sm" data-toggle="modal" data-target="#createReportingManager"><i class="fa fa-plus"></i>Add Reporting Manager</a>
                        </div>
                    </div>
                    <div class=row style="padding:0px 5px 5px 10px">
                        <div class="table-responsive" style="padding:0px 5px 5px 10px">
                            <table class="table table-striped m-b-sm datagrid">
                                @if(count($managers) > 0)
                                <tr>
                                    <th>Action</th>
                                    <th>Business Unit</th>
                                    <th>Department</th>
                                    <th>Job Title Code</th>
                                    <th>Name</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($managers as $manager)
                                    <tr id="reportingManager-row-{{ $manager->id }}">
                                        <td>
                                            <form action="{{ route('managers.destroy', $manager->id)}}" method="post" style=position:relative;float:right>
                                            @csrf
                                            @method('DELETE')
                                            <a href="{{ route('managers.edit',$manager->id)}}" ><span class="btn btn-default"><i class="fa fa-edit no-margin"></i></span></a>  
                                            <button data-toggle="tooltip" data-placement="top" title="Delete" type="submit" class="btn btn-danger" onclick="return confirm('Are you sure you want to delete this item?');"><i class="fa fa-trash no-margin"></i></button>
                                            </form>
                                        </td>
                                        <td>{{ $manager->business_unit }}</td>
                                        <td>{{ $manager->department}}</td>
                                        <td>{{ $manager->job_title_code}}</td>
                                        <td>{{ $manager->name}}</td>
                                    </tr> 
                                    @endforeach
                                    @else            
                                    <tr>
                                        <td colspan="2" class="text-center">Nothing to display</td>
                                    </tr>  
                                    @endif                          
                                </tbody>
                                
                            </table>
                        </div>                
                    </div>
                 </div>
            </section>
    </section>

<!-- Modal -->
@include('Modals/reportmanager')


 @endsection
 @section('footer-include')   
<script src="js/bootstrap.js"></script>    
@endsection

@section('j-script')
    <!-- Jquery -->
    <script>
        $(document).on('ready', function(){

        });
       
    </script>

@endsection