@extends('template')

@section('title')
    Tableau de bord
@endsection

@section('main-content')

    <style>
        h3{
            border-bottom: 1px solid #89b1d5;
        }
    </style>
    <div class="row">
        <div class="col-xs-12">
            <div class="page-title-box">
                <h4 class="page-title">Tableau de bord</h4>
                <ol class="breadcrumb p-0 m-0">
                    <li>
                        <a href="#">{{config('app.name')}}</a>
                    </li>
                    <li>
                        <a href="#">Tableau de bord</a>
                    </li>
                    <li class="active">
                        Tableau de bord
                    </li>
                </ol>
                <div class="clearfix"></div>
            </div>
        </div>
    </div>


    <!-- end row -->
    <style>
        .tilebox-two i{
            font-size: 30px;
        }

        .rounded-circle {
            border-radius: 50%!important;
        }
    </style>

    <div class="row">
        <div class="col-lg-3 col-md-6">
            <div class="card-box tilebox-two tilebox-success">
                <i class="fa fa-file-archive-o pull-right text-dark"></i>
                <h6 class="text-success text-uppercase m-b-15 m-t-10">Factures scannées</h6>
                <h4 class="m-b-10"><span data-plugin="counterup">0</span></h4>
            </div>
        </div>

        <div class="col-lg-3 col-md-6">
            <div class="card-box tilebox-two tilebox-purple">
                <i class="fa fa-tags pull-right text-dark"></i>
                <h6 class="text-purple text-uppercase m-b-15 m-t-10">Points gagnés</h6>
                <h4 class="m-b-10"><span data-plugin="counterup">0</span></h4>
            </div>
        </div>


        <div class="col-lg-3 col-md-6">
            <div class="card-box tilebox-two tilebox-primary">
                <i class="fa fa-smile-o pull-right text-dark"></i>
                <h6 class="text-primary text-uppercase m-b-15 m-t-10">Points utilisés</h6>
                <h4 class="m-b-10" data-plugin="counterup">0</h4>
            </div>
        </div>



        <div class="col-lg-3 col-md-6">
            <div class="card-box tilebox-two tilebox-custom">
                <i class="fa fa-users pull-right text-dark"></i>
                <h6 class="text-custom text-uppercase m-b-15 m-t-10">Clients</h6>
                <h4 class="m-b-10"><span data-plugin="counterup">0</span></h4>
            </div>
        </div>

    </div>

    <div class="row">
        <div class="col-sm-12">
            <div class="card-box table-responsive">
                <h3 class="panel-title m-b-10 p-b-5">Nouveaux utilisateurs (<small>Aujourd'hui</small>)</h3>

                <table class="table table table-hover m-0 table-bordered">
                    <thead>
                    <tr>

                        <th>Nom</th>
                        <th>Prénom</th>
                        <th>Adresse mail</th>
                        <th>Téléphone</th>
                        <th>Heure</th>
                    </tr>
                    </thead>
                    <tbody>

                    <?php
                    $clients=\App\Models\User::select('*')->where('role_id',2)
                        ->where('created_at','>=',''.date('Y-m-d 00:00:00').'')
                        ->where('created_at','<=',''.date('Y-m-d 23:59:00').'')
                        ->get(); ?>
                    @foreach($clients as $client)
                        <tr>
                            <td style="padding: 7px 10px">{{$client->nom}}</td>
                            <td style="padding: 7px 10px">{{$client->prenom}}</td>
                            <td style="padding: 7px 10px">{{$client->email}} </td>
                            <td style="padding: 7px 10px">{{$client->phone}} </td>
                            <td style="padding: 7px 10px">xxx</td>
                        </tr>
                    @endforeach

                    @if(1)
                        <tr>
                            <td colspan="5" align="center" style="padding:  10px">Aucun nouvel utilisateur aujourd'hui</td>
                        </tr>
                    @endif

                    </tbody>
                </table>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-6">
            <div class="card-box table-responsive">
                <h3 class="panel-title m-b-10 p-b-5">Scan de facture</h3>
                <table class="table table table-hover m-0">
                    <thead>
                    <tr>
                        <th width="20%">Date</th>
                        <th width="45%">Client</th>
                        <th width="25%">N° Facture</th>
                        <th width="15%">Point</th>
                    </tr>
                    </thead>
                    <tbody>

                   

                    </tbody>
                </table>
            </div>
        </div>

        <div class="col-sm-6">


            <div class="card-box table-responsive">
                <h3 class="panel-title m-b-10 p-b-5">Utilisation des points</h3>

                <table class="table table table-hover m-0">
                    <thead>
                    <tr>

                        <th>Date</th>
                        <th>Client</th>
                        <th>Cadeaux</th>
                    </tr>
                    </thead>
                    <tbody>

                    

                    </tbody>
                </table>
            </div>
        </div>
    </div>


@endsection

@section('my-scripts')

@endsection