@extends('layout.main')
@section('title', config('app.name') . ' | Welcome dashboard')
@section('content')
        <!-- main content start-->
<div id="page-wrapper">
    <div class="main-page">
        <div class="widget-shadow"> @include('partials.errors')
            @include('partials.success') </div>
        <div class="row-one">
            <div class="col-md-4 widget">
                <div class="stats-left ">
                    <h5>Today</h5>
                    <h4>Documents</h4>
                </div>
                <div class="stats-right">
                    @if(isset($tot_today)) <label> {{$tot_today}}</label>@endif
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="col-md-4 widget states-mdl">
                <div class="stats-left">
                    <h5>Total</h5>
                    <h4>Documents</h4>
                </div>
                <div class="stats-right">
                    @if(isset($totel_docs)) <label> {{$totel_docs}}</label>@endif
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="col-md-4 widget states-last">
                <div class="stats-left">
                    <h5>Total</h5>
                    <h4>Customers</h4>
                </div>
                <div class="stats-right">
                    @if(isset($tot_customer)) <label> {{$tot_customer}}</label>@endif
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="clearfix"></div>
        </div>
        <div class="row">
            <div class="col-md-4 stats-info widget">
                <div class="stats-title">
                    <h4 class="title">Previous Months</h4>
                </div>
                <div class="stats-body">
                    <ul class="list-unstyled">
                        <li>November <span class="pull-right">06 Documents</span>

                        </li>
                        <li>October <span class="pull-right">15 Documents</span>

                        </li>
                        <li>September <span class="pull-right">24 Documents</span>

                        </li>
                        <li>August <span class="pull-right">33 Documents</span>

                        </li>
                        <li>July <span class="pull-right">60 Documents</span>

                        </li>
                        <li class="last">June <span class="pull-right">51 Documents</span>

                        </li>
                    </ul>
                </div>
            </div>
            <div class="col-md-8 stats-info stats-last widget-shadow">
                <table class="table stats-table ">
                    <thead>
                    <tr>
                        <th>Serial No</th>
                        <th>Customer Id</th>
                        <th>Customer Name</th>
                        <th>Doc-id</th>
                        <th>Status</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php
                    $i = 1;
                    ?>
                    @if(isset($get_documents) && $get_documents)
                        @forelse($get_documents as $get_document)
                            <tr>
                                <th scope="row">{{$i++}}</th>
                                <td>{{$get_document->customer_id}}</td>
                                <td>{{$get_document->customer_name}}</td>
                                <td>
                                    {{$get_document->document_id}}</td>

                                <td><a href="/document-view/{{$get_document->id}}" class="badge badge-success"> View</a></td>
                            </tr>
                        @empty
                            <tr>
                                <td colspan="4">No Record Found!</td>
                            </tr>
                        @endforelse
                    @endif
                    </tbody>
                </table>
            </div>
            <div class="clearfix"></div>
        </div>

        {{--<div class="charts">--}}
        {{--<div class="col-md-4 charts-grids widget">--}}
        {{--<h4 class="title">Bar Chart Example</h4>--}}
        {{--<canvas id="bar" height="300" width="400"></canvas>--}}
        {{--</div>--}}
        {{--<div class="col-md-4 charts-grids widget states-mdl">--}}
        {{--<h4 class="title">Line Chart Example</h4>--}}
        {{--<canvas id="line" height="300" width="400"></canvas>--}}
        {{--</div>--}}
        {{--<div class="col-md-4 charts-grids widget">--}}
        {{--<h4 class="title">Pie Chart Example</h4>--}}
        {{--<canvas id="pie" height="300" width="400"></canvas>--}}
        {{--</div>--}}
        {{--<div class="clearfix"></div>--}}
        {{--<script>--}}
        {{--var barChartData = {--}}
        {{--labels: ["Jan", "Feb", "March", "April", "May", "June", "July"],--}}
        {{--datasets: [--}}
        {{--{--}}
        {{--fillColor: "rgba(233, 78, 2, 0.9)",--}}
        {{--strokeColor: "rgba(233, 78, 2, 0.9)",--}}
        {{--highlightFill: "#e94e02",--}}
        {{--highlightStroke: "#e94e02",--}}
        {{--data: [65, 59, 90, 81, 56, 55, 40]--}}
        {{--},--}}
        {{--{--}}
        {{--fillColor: "rgba(79, 82, 186, 0.9)",--}}
        {{--strokeColor: "rgba(79, 82, 186, 0.9)",--}}
        {{--highlightFill: "#4F52BA",--}}
        {{--highlightStroke: "#4F52BA",--}}
        {{--data: [40, 70, 55, 20, 45, 70, 60]--}}
        {{--}--}}
        {{--]--}}

        {{--};--}}
        {{--var lineChartData = {--}}
        {{--labels: ["Jan", "Feb", "March", "April", "May", "June", "July"],--}}
        {{--datasets: [--}}
        {{--{--}}
        {{--fillColor: "rgba(242, 179, 63, 1)",--}}
        {{--strokeColor: "#F2B33F",--}}
        {{--pointColor: "rgba(242, 179, 63, 1)",--}}
        {{--pointStrokeColor: "#fff",--}}
        {{--data: [70, 60, 72, 61, 75, 59, 80]--}}

        {{--},--}}
        {{--{--}}
        {{--fillColor: "rgba(97, 100, 193, 1)",--}}
        {{--strokeColor: "#6164C1",--}}
        {{--pointColor: "rgba(97, 100, 193,1)",--}}
        {{--pointStrokeColor: "#9358ac",--}}
        {{--data: [50, 65, 51, 67, 52, 64, 50]--}}

        {{--}--}}
        {{--]--}}

        {{--};--}}
        {{--var pieData = [--}}
        {{--{--}}
        {{--value: 90,--}}
        {{--color: "rgba(233, 78, 2, 1)",--}}
        {{--label: "Product 1"--}}
        {{--},--}}
        {{--{--}}
        {{--value: 50,--}}
        {{--color: "rgba(242, 179, 63, 1)",--}}
        {{--label: "Product 2"--}}
        {{--},--}}
        {{--{--}}
        {{--value: 60,--}}
        {{--color: "rgba(88, 88, 88,1)",--}}
        {{--label: "Product 3"--}}
        {{--},--}}
        {{--{--}}
        {{--value: 40,--}}
        {{--color: "rgba(79, 82, 186, 1)",--}}
        {{--label: "Product 4"--}}
        {{--}--}}

        {{--];--}}

        {{--new Chart(document.getElementById("line").getContext("2d")).Line(lineChartData);--}}
        {{--new Chart(document.getElementById("bar").getContext("2d")).Bar(barChartData);--}}
        {{--new Chart(document.getElementById("pie").getContext("2d")).Pie(pieData);--}}

        {{--</script>--}}

        {{--</div>--}}


        {{--<div class="row calender widget-shadow">--}}
        {{--<h4 class="title">Calender</h4>--}}
        {{--<div class="cal1">--}}

        {{--</div>--}}
        {{--</div>--}}
        <div class="clearfix"></div>
    </div>
</div>
<!--footer-->

@endsection