KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.41 (Ubuntu)
System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
User : www-data ( 33)
PHP Version : 8.2.12
Disable Function : NONE
Directory :  /var/www/leadai/leadai.co.in/storage/framework/views/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/leadai/leadai.co.in/storage/framework/views/49f7ad9eb1c4c2be79096822f57bba1393a3aff0.php
<?php $__env->startSection('content'); ?>
    <main class="main-content">
        <div class="container">
            <?php if (isset($component)) { $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\FlashMessage::class, []); ?>
<?php $component->withName('flashMessage'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74)): ?>
<?php $component = $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74; ?>
<?php unset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74); ?>
<?php endif; ?>
            <!-- begin::page header -->
            <div class="page-header d-md-flex align-items-center justify-content-between">
                <div>
                    <h3>Dashboard</h3>
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item"><a href="#">Dashboard</a></li>
                            <li class="breadcrumb-item active" aria-current="page">Sales</li>
                        </ol>
                    </nav>
                </div>
                <div class="form-group mt-3 d-flex">
                    <form class="pipeline_filter_form" action="<?php echo e(asset('dashboard')); ?>" method="get">
                        <select class="form-control form-control-sm change_pipeline" name="change_pipeline">
                            <option selected disabled>Select Pipeline</option>
                            <?php if(!empty($pipelines)): ?>
                                <?php $__currentLoopData = $pipelines; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $pipeline): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($pipeline->id); ?>"
                                        <?php echo e(isset($_GET['change_pipeline']) ? ($pipeline->id == $_GET['change_pipeline'] ? 'selected' : '') : ''); ?>>
                                        <?php echo e($pipeline->name); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php endif; ?>
                        </select>
                    </form>

                    <form class="dashboard-date-form" action="<?php echo e(asset('dashboard')); ?>" method="get">
                        <div class="d-flex">
                            <div id="reportrange" class="reportrange btn btn-outline-light m-r-5">
                                <input type="hidden" name="start_date" class="start-date-input">
                                <input type="hidden" name="end_date" class="end-date-input">
                                <i class="ti-calendar m-r-10"></i>
                                <span class="selected-date"></span>
                                <i class="ti-angle-down m-l-10"></i>
                            </div>
                            <div class="dropdown m-r-5">
                                <button class="btn btn-success"><i class="fa fa-filter"></i> </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div>
                <div class="row">
                    <div class="col-md-3">
                        <div class="card">
                            <div class="card-header">
                                <h5 class="p-0 m-0"> Leads</h5>
                            </div>
                            <div class="card-body"><?php echo e($leads); ?></div>
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="card">
                            <div class="card-header">
                                <h5 class="p-0 m-0"> Deals</h5>
                            </div>
                            <div class="card-body"><?php echo e($deals); ?></div>
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="card">
                            <div class="card-header">
                                <h5 class="p-0 m-0"> Won</h5>
                            </div>
                            <div class="card-body"><?php echo e($won); ?></div>
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="card">
                            <div class="card-header">
                                <h5 class="p-0 m-0"> Loss</h5>
                            </div>
                            <div class="card-body"><?php echo e($loss); ?></div>
                        </div>
                    </div>
                </div>
                <div class="row mb-3">
                    <div class="col-md-12">
                        <div class="chart_div" id="chart_div"></div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-md-12">
                        <div class="card">
                            <div class="card-header">
                                <h4>Employee Status</h4>
                            </div>
                            <div class="card-body">
                                <table class="table table-striped">
                                    <thead>
                                        <tr>

                                            <th><?php echo e(__('message.sno')); ?></th>

                                            <th><?php echo e(__('message.name')); ?></th>
                                            <th>Lead Assigned</th>
                                            <th>Converted</th>
                                            <th>Non Converted</th>

                                            

                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php if(!empty($leads_dashboard)): ?>
                                            <?php $__currentLoopData = $leads_dashboard; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                                            <?php

                                               $total_convert =  App\Helpers\Frontend::leadConverted($value->user_id);
                                        ?>
                                            <tr>


                                               <td><?php echo e(++$key); ?></td>

                                               <td>

                                                        <?php echo e($value->name); ?>


                                                </td>
                                                <td>
                                                    <span class="btn btn-outline-primary btn-sm text-capitalize">
                                                       <?php echo e($value->total_lead); ?>

                                                    </span>
                                                </td>
                                               <td><?php echo e($total_convert); ?></td>
                                               <td><?php echo e($value->total_lead - $total_convert); ?></td>





                                            </tr>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                        <?php endif; ?>
                                    </tbody>
                                </table>
                                <div class="d-flex justify-content-end">
                                    <a class="btn btn-outline-primary btn-sm" href="<?php echo e(asset('lead-dashboard-list')); ?>">View
                                        More...</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-md-12">
                        <div class="card">
                            <div class="card-header">
                                <h4>Recent Task</h4>
                            </div>
                            <div class="card-body">
                                <table class="table table-striped">
                                    <thead>
                                        <tr class="text-bold">
                                            <th>Date</th>
                                            
                                            <th>Type</th>
                                            <th>Task Name</th>
                                            <th>Allotted To</th>
                                            <th>Status</th>
                                            <th>Priority</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php $__currentLoopData = $tasks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $task): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td><?php echo e(date('d-m-Y', strtotime($task->date))); ?></td>
                                                
                                                <td><?php echo e($task->type); ?></td>
                                                <td class="text-capitalize"><?php echo e($task->name); ?></td>
                                                <td><?php echo e(isset($task->user_details) ? $task->user_details->name : ''); ?></td>
                                                <td><?php echo e($task->status); ?></td>
                                                <td><?php echo e($task->priority); ?></td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </tbody>
                                </table>
                                <div class="d-flex justify-content-end">
                                    <a class="btn btn-outline-primary btn-sm" href="<?php echo e(asset('leads/task-list')); ?>">View
                                        More...</a>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>



                <div class="row">
                    <div class="col-md-7">



                        <div class="card">
                            <div class="card-header">
                                <h4>Latest Activity</h4>
                            </div>
                            <div class="card-body">
                                <?php
                                    $alertClasses = ['alert-success', 'alert-danger', 'alert-warning', 'alert-info']; // Add as many classes as you want
                                ?>
                                <?php $__currentLoopData = $activity; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $ac): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <?php
                                        $alertClass = $alertClasses[$index % count($alertClasses)];
                                    ?>
                                    <div class="border mb-1 p-2 alert <?php echo e($alertClass); ?>">
                                        <p class="m-0">Date : <?php echo e($ac->created_at); ?> </p>
                                        <strong><?php echo e(json_decode($ac->remark)->title); ?></strong>
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </div>
                        </div>


                    </div>

                    <div class="col-md-5">
                        <div class="card">
                            <div class="card-header">
                                <h4>How To Use Software</h4>
                            </div>
                            <div class="card-body">
                                <video width="100%" controls>
                                    <source src="<?php echo e(asset('public/demo.mp4')); ?>" type="video/mp4">
                                    Your browser does not support the video tag.
                                </video>
                            </div>
                        </div>
                    </div>

                </div>


            </div>
        </div>
    </main>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('footer-script'); ?>
    <script src="https://cdn.jsdelivr.net/npm/html2canvas@1.0.0-rc.7/dist/html2canvas.min.js"></script>
    <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js"></script>
    <script type="text/javascript" src="https://cdn.jsdelivr.net/jquery/latest/jquery.min.js"></script>
    <script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
    <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
    <script>
         $(".change_pipeline").on("change",function(){
                $(".pipeline_filter_form").submit();
            });
        //date picker
        $(function() {
            var start = moment().subtract(29, 'days');
            var end = moment();

            function cb(start, end) {
                $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
                filterByDate(start, end);
            }
            $('#reportrange').daterangepicker({
                startDate: start,
                endDate: end,
                ranges: {
                    'Today': [moment(), moment()],
                    'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
                    'Last 7 Days': [moment().subtract(6, 'days'), moment()],
                    'Last 30 Days': [moment().subtract(29, 'days'), moment()],
                    'This Month': [moment().startOf('month'), moment().endOf('month')],
                    'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1,
                        'month').endOf('month')]
                }
            }, cb);
            cb(start, end);
        });

        function filterByDate(start_date, end_date) {
            //$(".dashboard-date-form").submit();
            var s_date = new Date(start_date);
            var n_date = new Date(end_date);
            $(".start-date-input").val(s_date.toISOString());
            $(".end-date-input").val(n_date.toISOString());
        }
        var role = $(".has-role").attr("roledata");
        var leads = <?php echo json_encode($total_leads, 15, 512) ?>;
        console.log(leads);
        //console.log(hosts);
        var title_date = new Date();
        var year = title_date.getFullYear();
        var month = ('0' + (title_date.getMonth() + 1)).slice(-2); // Adding leading zero if needed
        var day = ('0' + title_date.getDate()).slice(-2); // Adding leading zero if needed
        // Concatenate the year, month, and day with hyphens
        var c_date = year + '-' + month + '-' + day;
        var date = new Date();
        var options = {
            year: 'numeric',
            month: 'long'
        };
        var formattedDate = date.toLocaleDateString('en-US', options);
        //console.log(formattedDate);
        google.charts.load('current', {
            packages: ['corechart', 'bar']
        });
        google.charts.setOnLoadCallback(drawChart);

        function drawChart() {
            var dataArray = [
                ['Month', 'Leads', 'Deals', 'Won', 'Loss']
            ];
            var monthNames = [
                'January', 'February', 'March', 'April', 'May', 'June',
                'July', 'August', 'September', 'October', 'November', 'December'
            ];
            for (var i = 0; i < leads.length; i++) {
                var monthIndex = leads[i].month; // Assuming month is a number from 1 to 12
                var monthName = monthNames[monthIndex - 1]; // Adjust for zero-based index
                dataArray.push([monthName, leads[i].total_leads, Number(leads[i].total_deals), Number(leads[i].won_deals),
                    Number(leads[i].closed_leads)
                ]);
            }
            var data = google.visualization.arrayToDataTable(dataArray);
            var options = {
                title: 'Total Leads And Deals in the Last 6 Months',
                hAxis: {
                    title: 'Month'
                },
                vAxis: {
                    title: 'Leads And Deals'
                },
                bars: 'vertical',
                colors: ['#f97316', '#38bdf8', '#22c55e', '#dc2626'],
            };
            var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
            chart.draw(data, options);
        }
    </script>
    <!-- Canvas -->
    <script>
        var xValues = ["Italy", "France", "Spain", "USA", "Argentina"];
        var yValues = [55, 49, 44, 24, 15];
        var barColors = [
            "#b91d47",
            "#00aba9",
            "#2b5797",
            "#e8c3b9",
            "#1e7145"
        ];
        new Chart("myChart", {
            type: "doughnut",
            data: {
                labels: xValues,
                datasets: [{
                    backgroundColor: barColors,
                    data: yValues
                }]
            },
            options: {
                title: {
                    display: false,
                }
            }
        });
    </script>
    <script>
        var xValues = ["Italy", "France", "Spain", "USA", "Argentina"];
        var yValues = [55, 49, 44, 24, 15];
        var barColors = [
            "#b91d47",
            "#00aba9",
            "#2b5797",
            "#e8c3b9",
            "#1e7145"
        ];
        new Chart("myChart2", {
            type: "doughnut",
            data: {
                datasets: [{
                    backgroundColor: barColors,
                    data: yValues
                }]
            },
            options: {
                title: {
                    display: false,
                }
            }
        });
    </script>
    <script>
        var xValues = ["Italy", "France", "Spain", "USA", "Argentina"];
        var yValues = [55, 49, 44, 24, 15];
        var barColors = [
            "#b91d47",
            "#00aba9",
            "#2b5797",
            "#e8c3b9",
            "#1e7145"
        ];
        new Chart("myChart3", {
            type: "doughnut",
            data: {
                labels: xValues,
                datasets: [{
                    backgroundColor: barColors,
                    data: yValues
                }]
            },
            options: {
                title: {
                    display: false,
                }
            }
        });
    </script>
    <script>
        var xValues = [];
        var yValues = [];
        generateData("Math.sin(x)", 0, 10, 0.5);
        new Chart("myChart5", {
            type: "line",
            data: {
                labels: xValues,
                datasets: [{
                    fill: false,
                    pointRadius: 2,
                    borderColor: "rgba(0,0,255,0.5)",
                    data: yValues
                }]
            },
            options: {
                legend: {
                    display: false
                },
                title: {
                    display: true,
                    text: "y = sin(x)",
                    fontSize: 16
                }
            }
        });

        function generateData(value, i1, i2, step = 1) {
            for (let x = i1; x <= i2; x += step) {
                yValues.push(eval(value));
                xValues.push(x);
            }
        }
    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/leadai/leadai.co.in/resources/views/dashboard/dashboard.blade.php ENDPATH**/ ?>

Anon7 - 2021