<?php $__env->startSection('icerik'); ?>


            <div class="pagetitle">
              <h1>Yönetici Paneli</h1>
              <nav>
                <ol class="breadcrumb">
                  <li class="breadcrumb-item"><a href="/">Site</a></li>
                  <li class="breadcrumb-item active">Yönetici Paneli</li>
                </ol>
              </nav>
            </div><!-- End Page Title -->

        <section class="section dashboard">
            <div class="row">

                <!-- Left side columns -->
                <div class="col-lg-8">
                    <div class="row">

                        <!-- Sales Card -->
                        <div class="col-xxl-4 col-md-6">
                            <div class="card info-card sales-card">

                                <div class="filter">
                                    <a class="icon" href="transfer-talepleri" data-bs-toggle=""><i class="bi bi-three-dots"></i></a>

                                </div>

                                <div class="card-body">
                                    <h5 class="card-title">Transfer Talepleri <span>| Bugün</span></h5>

                                    <div class="d-flex align-items-center">
                                        <div class="card-icon rounded-circle d-flex align-items-center justify-content-center">
                                            <i class="bi bi-bus-front"></i>
                                        </div>
                                        <div class="ps-3">
                                            <h6><?php echo e($transfer); ?> <small>Adet</small></h6>

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

                            </div>
                        </div><!-- End Sales Card -->

                        <!-- Revenue Card -->
                        <div class="col-xxl-4 col-md-6">
                            <div class="card info-card revenue-card">

                                <div class="filter">
                                    <a class="icon" href="kiralama-talepleri" data-bs-toggle=""><i class="bi bi-three-dots"></i></a>

                                </div>

                                <div class="card-body">
                                    <h5 class="card-title">Kiralama Talepleri <span>| Bu Ay</span></h5>

                                    <div class="d-flex align-items-center">
                                        <div class="card-icon rounded-circle d-flex align-items-center justify-content-center">
                                            <i class="bi bi-car-front"></i>
                                        </div>
                                        <div class="ps-3">
                                            <h6><?php echo e($kiralama); ?>  <small>Talep</small> </h6>


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

                            </div>
                        </div><!-- End Revenue Card -->

                        <!-- Customers Card -->
                        <div class="col-xxl-4 col-xl-12">

                            <div class="card info-card customers-card">

                                <div class="filter">
                                    <a class="icon" href="musteriler" data-bs-toggle=""><i class="bi bi-three-dots"></i></a>
                                    <ul class="dropdown-menu dropdown-menu-end dropdown-menu-arrow">

                                    </ul>
                                </div>

                                <div class="card-body">
                                    <h5 class="card-title">Müşteriler <span>| Bu  Yıl</span></h5>

                                    <div class="d-flex align-items-center">
                                        <div class="card-icon rounded-circle d-flex align-items-center justify-content-center">
                                            <i class="bi bi-people"></i>
                                        </div>
                                        <div class="ps-3">
                                            <h6><?php echo e($musteri); ?> <small>Kişi</small></h6>


                                        </div>
                                    </div>

                                </div>
                            </div>

                        </div><!-- End Customers Card -->

                        <!-- Reports -->
                        <div class="col-12">
                            <div class="card">



                                <div class="card-body">
                                    <h5 class="card-title">Aylık Rapor <span>| Bu ay</span></h5>

                                    <div id="reportsChart" style="max-width: 100%; overflow:hidden!important;"></div>

                                    <!-- Gerekli ApexCharts kütüphanesini dahil edin -->
                                    <script src="https://cdn.jsdelivr.net/npm/apexcharts@latest"></script>

                                    <!-- Verileri blade'den alıp grafik oluşturun -->
                                    <script>

                                        document.addEventListener("DOMContentLoaded", () => {
                                            var salesData = <?php echo $sales; ?>;
                                            var revenueData = <?php echo $revenue; ?>;
                                            var customersData = <?php echo $customers; ?>;
                                            new ApexCharts(document.querySelector("#reportsChart"), {
                                                series: [
                                                    {
                                                        name: 'Transfer Talebi',
                                                        data: salesData.map(item => item.count),
                                                    },
                                                    {
                                                        name: 'Kiralama Talebi',
                                                        data: revenueData.map(item => item.count),
                                                    },
                                                    {
                                                        name: 'Müşteri Kaydı',
                                                        data: customersData.map(item => item.count),
                                                    }
                                                ],
                                                chart: {
                                                    height: 350,
                                                    type: 'area',
                                                    toolbar: {
                                                        show: false
                                                    },
                                                },
                                                markers: {
                                                    size: 4
                                                },
                                                colors: ['#4154f1', '#2eca6a', '#ff771d'],
                                                fill: {
                                                    type: "gradient",
                                                    gradient: {
                                                        shadeIntensity: 1,
                                                        opacityFrom: 0.3,
                                                        opacityTo: 0.4,
                                                        stops: [0, 90, 100]
                                                    }
                                                },
                                                dataLabels: {
                                                    enabled: false
                                                },
                                                stroke: {
                                                    curve: 'smooth',
                                                    width: 2
                                                },
                                                xaxis: {
                                                    type: 'datetime',
                                                    categories: salesData.map(item => item.date),
                                                },
                                                tooltip: {
                                                    x: {
                                                        format: 'dd/MM/yy HH:mm'
                                                    },
                                                }
                                            }).render();
                                        });
                                    </script>

                                </div>

                            </div>
                        </div><!-- End Reports -->





                    </div>
                </div><!-- End Left side columns -->

                <!-- Right side columns -->
                <div class="col-lg-4">

                    <!-- Recent Activity -->
                    <div class="card">
                        <div class="filter">
                            <a class="icon" href="musteriler" data-bs-toggle=""><i class="bi bi-three-dots"></i></a>
                        </div>

                        <div class="card-body">
                            <h5 class="card-title">Son Müşteriler <span></span></h5>

                            <div class="activity">



                                <?php $__currentLoopData = $musteriler; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="activity-item d-flex">
                                    <div class="activite-label" style="font-size: 11px!important;"><?php echo e(@\Illuminate\Support\Carbon::createFromDate($item->utarih)->diffForHumans()); ?></div>
                                    <i class='bi bi-circle-fill activity-badge text-success align-self-start'></i>
                                    <div class="activity-content">
                                        <b><?php echo e($item->name); ?></b>  Üye Oldu.
                                    </div>
                                </div><!-- End activity item-->
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                            </div>

                        </div>
                    </div><!-- End Recent Activity -->




                </div><!-- End Right side columns -->

            </div>
        </section>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('panel.index', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/ucretsizscript/transferpro2.ucretsizscript.net/resources/views/admin/index.blade.php ENDPATH**/ ?>