@extends('layouts.main') 
@section('title', 'Linelist Summary')
@section('content')
    <!-- push external head elements to head -->
    @push('head')
        <link rel="stylesheet" href="{{ asset('plugins/DataTables/datatables.min.css') }}">
        <link rel="stylesheet" href="{{ asset('plugins/jquery-ui/jquery-ui.css') }}">
    @endpush

    
    <div class="container-fluid">
        <div class="page-header">
            <div class="row align-items-end">
                <div class="col-lg-8">
                    <div class="page-header-title">
                        <i class="ik ik-pie-chart bg-blue"></i>
                        <div class="d-inline">
                            <h5>{{ __('Linelist Summary') }}</h5>
                        </div>
                    </div>
                </div>
                <div class="col-lg-4">
                    <nav class="breadcrumb-container" aria-label="breadcrumb">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item">
                                <a href="{{route('dashboard')}}"><i class="ik ik-home"></i></a>
                            </li>
                            
                           <li class="breadcrumb-item active" aria-current="page">{{ __('Report')}}</li>
                        </ol>
                    </nav>
                </div>
            </div>
        </div>
        
        <div class="row clearfix">
            <div class="col-md-12">
                
                <form class="forms-sample"  method='POST' action="{{ route('getfilteredlinelistsummaryreport') }}" >
                        @csrf
                            <div class="form-group row">
                                <div class="col-3">
                                    <label>Month</label>
                                    <select name='month' id='month' class='form-control' required>
                                        <option value="">Select Month</option>
                                        @for($i=1;$i<=12;$i++)
                                        <option value="{{str_pad($i, 2, '0', STR_PAD_LEFT)}}" {{ $month == str_pad($i, 2, '0', STR_PAD_LEFT) ? 'selected' : '' }}>{{str_pad($i, 2, '0', STR_PAD_LEFT)}}</option>
                                        @endfor
                                    </select>
                                </div>
                                <div class="col-3">
                                    <label>Year</label>
                                    <select name='year' id='year' class='form-control' required>
                                        <option value="">Select Month</option>
                                        @for($i=2022;$i<=2030;$i++)
                                        <option value="{{$i}}" {{ $year == $i ? 'selected' : '' }}>{{$i}}</option>
                                        @endfor
                                    </select>
                                </div>
                                <div class="col-2 mt-25">
                                    <button type="submit" id="submit" class="btn btn-primary mr-2">{{ __('Submit')}}</button>
                                </div>
                            </div>
                        </form>
                <div class="card">
                    <!--<div class="card-header">-->
                    <!--    <h3>{{ __('Outreach Input Report') }}</h3>-->
                    <!--</div>-->
                    
                    <div class="card-body table-responsive">
                        
                        <table id="myAdvancedTable" class="table p-3">
                            <thead>
                                <tr>
                                    <th>{{ __('Visit') }}</th>
                                    <th>{{ __('Outreach') }}</th>
                                    <th>{{ __('Calling') }}</th>
                                    <th>{{ __('Eac') }}</th>
                                </tr>
                            </thead>
                            <tbody>
                                @foreach($outreach_arr as $key=>$value)
                                <tr>
                                    
                                    <td>{{$key}}</td>
                                    <td>{{$outreach_arr[$key]}}</td>
                                    <td>{{$calling_arr[$key]}}</td>
                                    <td>{{$eac_arr[$key]}}</td>
                                </tr>
                                @endforeach
                            </tbody>
                        </table>
                    </div>
                </div> 
            </div>
        </div>
    </div>

    <!-- push external js -->
    @push('script')
    <script src="{{ asset('plugins/jquery-ui/jquery-ui.min.js') }}"></script>
    <script src="{{ asset('plugins/DataTables/datatables.min.js') }}"></script>
    <!--get editable datatable script-->
    <script src="{{ asset('js/editable-datatable.js') }}"></script>
    @endpush
@endsection
