@extends('backend.header')
@section('index-content')
<style>
  .table-responsive {
        width: 100%;
        height: 75vh;
    }
    table tr td{
      vertical-align: middle !important;
    }
    table .tr1 td:first-child {
        position: sticky;
        width: 50px;
        left: 0;
        background: #fff;
        color: #000;
        z-index: 9;
    }
    table .tr1 td:nth-child(2) {
        position: sticky;
        left: 50px;
        background: #fff;
        color: #000;
        z-index: 9;
    }
    table tr th:first-child {
        position: sticky;
        width: 50px;
        left: 0;
        /*   background: #fff;*/
        color: #000;
        z-index: 10;
    }
    table tr th:nth-child(2) {
        position: sticky;
        left: 50px;
        /*   background: #fff !important;*/
        color: #000;
        z-index: 10;
    }
    tr.table-success {
        position: sticky;
        left: 0;
        z-index: 10;
        background: #fff !important;
    }
    tr.table-success {
        top: 0px !important;
        position: sticky !important;
    }
    .table-success,
    .table-success > td,
    .table-success > th {
        background-color: #c3e6cb !important;
    } 
    </style>
<div class="row px-3">


  <section role="main" class="content-body">
    <header class="page-header">
    <div class="row">
      <div class="col-lg-5">
        <h2>PR Resolution Gram Wise Report</h2>  
      </div>
    
      <div class="col-lg-5">
        <ol class="breadcrumbs">
              <li>
                <a href="/">
                  <i class="fa fa-home"></i>
                </a>

              </li>
              
              <li> <a href="{{url('pr_distict_view')}}">
                <span>{{$district->parent_details->area_name}}</span> 
              </a>
            </li>
            <li> 
                <a href="{{url('mandal_pr_list')}}?id={{$district->parent_details->id}}">
                <span>{{$district->area_name}}</span>
              </a>
            </li>
              
            </ol>
      </div>
      <div class="col-lg-2">
        @if(!Session::has('dashboardurl')) 
              <div class="add-btn-div">
                <a href="{{url('add_prresolution')}}" class="btn btn-primary add-btn" style="margin-right: 25px;">Add </a>
              </div>
               @endif
               <button class="btn btn-primary back-btn" onclick="window.history.back()" style="margin-right:90px;">Back</button>
    </div>
  </div>
  </header>
      <!-- <header class="page-header">
        <h2>PR Resolution Gram Wise Report</h2>
      </header>
      <div class="row">
        <div class="col-xs-12">
          <div class="right-wrapper">
            <ol class="breadcrumbs">
              <li>
                <a href="/">
                  <i class="fa fa-home"></i>
                </a>

              </li>
              
              <li> <a href="{{url('pr_distict_view')}}">
                <span>{{$district->parent_details->area_name}}</span> 
              </a>
            </li>
                <li> 
                    <a href="{{url('mandal_pr_list')}}?id={{$district->parent_details->id}}">
                    <span>{{$district->area_name}}</span>
                  </a>
                </li>
                  
                </ol>
              </div>
            </div>
            <div class="col-xs-12 mt-3">
              <div>
                <button class="btn btn-primary" onclick="window.history.back()">Back</button>
              </div>
            </div>
          </div> -->

        <!-- start: page -->
        <section class="panel">
          <!-- <header class="panel-heading mb-5">
            <h4 class="my-0">PR Resolution Gram Wise Report</h4>
            @if(!Session::has('dashboardurl')) 
              <div class="add-btn-div">
                <a href="{{url('add_prresolution')}}" class="btn btn-primary add-btn">Add </a>
              </div>
               @endif

        </header> -->
        <div class="col-12 px-2">
          <table class="table table-bordered table-striped mb-none mt-0" id="datatable-default">
           <thead>
             <tr class="table-success">
               <th>S.NO</th>
               <th>Gram Name</th>
               <th>PR Resolution Count</th>
               <th>Total Lights Count</th>
               <th>18 W Count</th>
               <th>35 W Count</th>
               <th>70 W Count</th>
               <th>110 W Count</th>
               <th>190 W Count</th>

             </tr>
           </thead>
           <tbody>
             <?php $i=0;?>
            @foreach($gram_pr_list as $list)
            <?php $i++;?>
            <tr>
              <td>{{$i}}</td>
              <td><a href="{{url('gram_approve_list')}}?id={{$list['area_gram']['id']}}">{{$list['area_gram']['area_name']}}</a></td>
              <td>{{$list['count']}}</td>
              <td>{{$list['18w']+$list['35w']+$list['70w']+$list['110w']+$list['190w']}}</td>
              <td>{{$list['18w']}}</td>
              <td>{{$list['35w']}}</td>
              <td>{{$list['70w']}}</td>
              <td>{{$list['110w']}}</td>
              <td>{{$list['190w']}}</td>
            </tr>
            @endforeach

          </tbody>
        </table>
        <br>
      </div>
    </section>
  </section>
</div>
  @stop

