@extends('layouts.master')
  @section('page_title')
      @if(isset($page_title))
          {{ $page_title }}
      @endif
  @endsection
@section('css')
<!-- JQVMap -->

@endsection
@section('content')
  <div class="">
      <div class="page-title">
        <div class="title_left">
          <div class="title_left">
            <ol class="breadcrumb">
              <li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
              <!-- <li class=""><a href=""> Reports</a></li> -->
              <li class="active">Client Payments</li>
            </ol>
          </div>
        </div>

        <div class="title_right">
          <div class="row">
            <form method="GET" action="{!! url('clientpaymentreports') !!}">
              <div class="col-md-5 col-sm-5 col-xs-12 form-group">
                <div style="margin-top:1px; margin-right:-90px;" class="top_search">
                </div>
              </div>
              <div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search" style="margin-top: -2px;">
                <div class="input-group">
                  <input type="text" name="keyword" class="form-control" id="keywordField" placeholder="Keyword here...">
                  <span class="input-group-btn">
                    <button type="submit" class="btn btn-primary" style="color: #fff;" type="button">Go!</button>
                  </span>
                </div>
              </div>
            </form>
          </div>
        </div>
      </div>

      <div class="clearfix"></div>
      <div class="row">
        @include('commons.notifications')
        <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_panel">
          <div class="x_title">
            <h2> Testing </h2>
            <div class="clearfix"></div>
          </div>

          <div class="x_content">
              <div class="row">
              <div class="col-md-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2>Transaction Summary <small>Weekly progress</small></h2>
                    <div class="filter">
                      <div id="reportrange" class="pull-right" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc">
                        <i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
                        <span>December 30, 2014 - January 28, 2015</span> <b class="caret"></b>
                      </div>
                    </div>
                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content">
                    <div class="col-md-9 col-sm-12 col-xs-12">
                      <div class="demo-container" style="height:280px">
                        <div id="chart_plot_02" class="demo-placeholder"></div>
                      </div>
                      <div class="tiles">
                        <div class="col-md-4 tile">
                          <span>Total Sessions</span>
                          <h2>231,809</h2>
                          <span class="sparkline11 graph" style="height: 160px;">
                               <canvas width="200" height="60" style="display: inline-block; vertical-align: top; width: 94px; height: 30px;"></canvas>
                          </span>
                        </div>
                        <div class="col-md-4 tile">
                          <span>Total Revenue</span>
                          <h2>$231,809</h2>
                          <span class="sparkline22 graph" style="height: 160px;">
                                <canvas width="200" height="60" style="display: inline-block; vertical-align: top; width: 94px; height: 30px;"></canvas>
                          </span>
                        </div>
                        <div class="col-md-4 tile">
                          <span>Total Sessions</span>
                          <h2>231,809</h2>
                          <span class="sparkline11 graph" style="height: 160px;">
                                 <canvas width="200" height="60" style="display: inline-block; vertical-align: top; width: 94px; height: 30px;"></canvas>
                          </span>
                        </div>
                      </div>

                    </div>

                    <div class="col-md-3 col-sm-12 col-xs-12">
                      <div>
                        <div class="x_title">
                          <h2>Top Profiles</h2>
                          <ul class="nav navbar-right panel_toolbox">
                            <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                            </li>
                            <li class="dropdown">
                              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
                              <ul class="dropdown-menu" role="menu">
                                <li><a href="#">Settings 1</a>
                                </li>
                                <li><a href="#">Settings 2</a>
                                </li>
                              </ul>
                            </li>
                            <li><a class="close-link"><i class="fa fa-close"></i></a>
                            </li>
                          </ul>
                          <div class="clearfix"></div>
                        </div>

                      </div>
                    </div>

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


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

@endsection

@section('javascript')



<script type="text/javascript">
  $(document).ready(function(){

    // $('#financeServicesStore').change(function(evtt){
      console.log('we have changed');
      var currentServices =['USSD', 'SMS', 'IVR', 'Hosting', 'Ninped'];
      console.log(currentServices);
      // var myarr = ["USSD", "like", "turtles"];
      var selected_services = ["USSD", "SMS"]
      // var checkArray = $.inArray(selected_services, currentServices) > -1;
      // console.log(checkArray);
      // var success = selected_services.every(function(val) {
      //     return currentServices.indexOf(val) !== -1;
      // });
      // var success = $.grep(currentServices, function(v,i) {
      //     return $.inArray(v, selected_services) !== -1;
      // }).length === selected_services.length;
      let success = selected_services.every((val) => currentServices.includes(val));
      console.log(success);
    // });
    //

  });
</script>
@endsection
