<?php if (isset($component)) { $__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\AdminPanelLayout::class, []); ?>
<?php $component->withName('admin-panel-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('title'); ?> 
        پیشخوان
     <?php $__env->endSlot(); ?>
     <?php $__env->slot('main'); ?> 
        <!-- Checked checkbox -->
        <div class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1 class="m-0 text-dark">پیشخوان</h1>
                    </div><!-- /.col -->
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-left">
                            
                            <li class="breadcrumb-item">پیشخوان</li>
                            
                        </ol>
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.container-fluid -->
        </div>
        <section class="content mt-sm-3">

            <?php if(auth()->user()->hasPermissionTo(\Mehrab\RolePermission\Models\Permission::PERMISSION_ORDER_SERVICE_OPERATOR)): ?>
                <div class="d-flex flex-wrap justify-content-around align-items-stretch  align-content-stretch">

                    <div class="p-1 col-6 col-sm-3 mb-3">
                        <div class="card border-primary">
                            <div class="card-header text-center">سفارشات در انتظار شما</div>
                            <div class="card-body text-primary">
                                <h5 class="card-title text-center">
                                    <span><?php echo e($all_orders_active_operator); ?></span>
                                </h5>
                            </div>
                        </div>
                    </div>
                    <div class="p-1 col-6 col-sm-3 mb-3">
                        <div class="card border-primary">
                            <div class="card-header text-center">سفارشات کنسلی در انتظار شما</div>
                            <div class="card-body text-primary">
                                <h5 class="card-title text-center">
                                    <span><?php echo e($all_orders_cancel_request_operator); ?></span>
                                </h5>
                            </div>
                        </div>
                    </div>
                    <div class="p-1 col-6 col-sm-3 mb-3">
                        <div class="card border-primary">
                            <div class="card-header text-center">تایید نهایی کنسلی مربوط به شما</div>
                            <div class="card-body text-primary">
                                <h5 class="card-title text-center">
                                    <span><?php echo e($all_orders_final_approved_cancel_operator); ?></span>
                                </h5>
                            </div>
                        </div>
                    </div>
                    <div class="p-1 col-6 col-sm-3 mb-3">
                        <div class="card border-primary">
                            <div class="card-header text-center">کل سفارشات مربوط به شما</div>
                            <div class="card-body text-primary">
                                <h5 class="card-title text-center">
                                    <span><?php echo e($all_orders_operator); ?></span>
                                </h5>
                            </div>
                        </div>
                    </div>


                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check(\Mehrab\RolePermission\Models\Permission::PERMISSION_EXPERT)): ?>
                    <div class="card col-12">
                        <div class="card-body p-0">
                            <figure class="highcharts-figure">
                                <div id="container"></div>
                            </figure>

                        </div>
                    </div>
                    <?php endif; ?>


                </div>
            <?php endif; ?>

            <?php if(auth()->user()->hasPermissionTo(\Mehrab\RolePermission\Models\Permission::PERMISSION_SUPER_ADMIN)): ?>
                <div class="d-flex flex-wrap justify-content-around align-items-stretch  align-content-stretch">

                    <div class="p-1 col-6 col-sm-3 mb-3">
                        <div class="card border-primary">
                            <div class="card-header text-center">سفارشات امروز</div>
                            <div class="card-body text-primary">
                                <h5 class="card-title text-center">
                                    <span><?php echo e($get_Orders_today); ?></span>
                                </h5>
                            </div>
                        </div>
                    </div>
                    <div class="p-1 col-6 col-sm-3 mb-3">
                        <div class="card border-primary">
                            <div class="card-header text-center">سفارشات ۷ روز گذشته</div>
                            <div class="card-body text-primary">
                                <h5 class="card-title text-center">
                                    <span><?php echo e($past_7_days_orders); ?></span>
                                </h5>
                            </div>
                        </div>
                    </div>
                    <div class="p-1 col-6 col-sm-3 mb-3">
                        <div class="card border-primary">
                            <div class="card-header text-center">سفارشات ۳۰ روز گذشته</div>
                            <div class="card-body text-primary">
                                <h5 class="card-title text-center">
                                    <span><?php echo e($past_30_days_orders); ?></span>
                                </h5>
                            </div>
                        </div>
                    </div>
                    <div class="p-1 col-6 col-sm-3 mb-3">
                        <div class="card border-primary">
                            <div class="card-header text-center">کل سفارشات</div>
                            <div class="card-body text-primary">
                                <h5 class="card-title text-center">
                                    <span><?php echo e($all_orders); ?></span>
                                </h5>
                            </div>
                        </div>
                    </div>

                    <div class="card col-12">
                        <div class="card-body p-0">
                            <figure class="highcharts-figure">
                                <div id="container"></div>
                            </figure>

                        </div>
                    </div>


                </div>
            <?php endif; ?>

            <?php if(auth()->user()->hasPermissionTo(\Mehrab\RolePermission\Models\Permission::PERMISSION_EXPERT)): ?>
                <div class="d-flex flex-wrap justify-content-around align-items-stretch  align-content-stretch">
                    <div class="p-1 col-6 col-sm-3 mb-3">
                        <div class="card border-primary">
                            <div class="card-header text-center">موجودی فعلی</div>
                            <div class="card-body text-primary">
                                <h5 class="card-title text-center">
                                    <span><?php echo e(auth()->user()->amount); ?></span>
                                    <small class="text-muted">تومان</small>
                                </h5>
                            </div>
                        </div>
                    </div>
                    <div class="p-1 col-6 col-sm-3 mb-3">
                        <div class="card border-primary">
                            <div class="card-header text-center">کل درآمد</div>
                            <div class="card-body text-primary">
                                <h5 class="card-title text-center">
                                    <span><?php echo e($total_sales); ?></span>
                                    <small class="text-muted">تومان</small>
                                </h5>
                            </div>
                        </div>
                    </div>
                    <div class="p-1 col-6 col-sm-3 mb-3">
                        <div class="card border-primary">
                            <div class="card-header text-center">کارمزد کسر شده</div>
                            <div class="card-body text-primary">
                                <h5 class="card-title text-center">
                                    <span><?php echo e($total_sales_site_share); ?></span>
                                    <small class="text-muted">تومان</small>
                                </h5>
                            </div>
                        </div>
                    </div>
                    <div class="p-1 col-6 col-sm-3 mb-3">
                        <div class="card border-primary">
                            <div class="card-header text-center">کل درآمد خالص</div>
                            <div class="card-body text-primary">
                                <h5 class="card-title text-center">
                                    <span><?php echo e($total_sales_Pure); ?></span>
                                    <small class="text-muted">تومان</small>
                                </h5>
                            </div>
                        </div>
                    </div>
                    <div class="p-1 col-6 col-sm-3 mb-3">
                        <div class="card border-primary">
                            <div class="card-header text-center">درآمد امروز</div>
                            <div class="card-body text-primary">
                                <h5 class="card-title text-center">
                                    <span><?php echo e($total_sales_pure_today); ?></span>
                                    <small class="text-muted">تومان</small>
                                </h5>
                            </div>
                        </div>
                    </div>
                    <div class="p-1 col-6 col-sm-3 mb-3">
                        <div class="card border-primary">
                            <div class="card-header text-center">درآمد ۳۰ روز گذشته</div>
                            <div class="card-body text-primary">
                                <h5 class="card-title text-center">
                                    <span><?php echo e($total_sales_pure_period); ?></span>
                                    <small class="text-muted">تومان</small>
                                </h5>
                            </div>
                        </div>
                    </div>
                    <div class="p-1 col-6 col-sm-3 mb-3">
                        <div class="card border-primary">
                            <div class="card-header text-center">تسویه حساب در حال انجام</div>
                            <div class="card-body text-primary">
                                <h5 class="card-title text-center">
                                    <span>۰</span>
                                    <small class="text-muted">تومان</small>
                                </h5>
                            </div>
                        </div>
                    </div>
                    <div class="p-1 col-6 col-sm-3 mb-3">
                        <div class="card border-primary">
                            <div class="card-header text-center">تراکنش موفق امروز(<?php echo e($total_sales_today_count); ?>)</div>
                            <div class="card-body text-primary">
                                <h5 class="card-title text-center">
                                    <span><?php echo e($total_sales_today); ?></span>
                                    <small class="text-muted">تومان</small>
                                </h5>
                            </div>
                        </div>
                    </div>

                    <div class="card col-12">
                        <div class="card-body p-0">
                            <figure class="highcharts-figure">
                                <div id="container"></div>
                            </figure>

                        </div>
                    </div>


                </div>
            <?php endif; ?>

        </section>

        <?php if(auth()->user()->hasPermissionTo(\Mehrab\RolePermission\Models\Permission::PERMISSION_SUPER_ADMIN)): ?>
            <script src="https://code.highcharts.com/highcharts.js"></script>
            <script src="https://code.highcharts.com/modules/series-label.js"></script>
            <script src="https://code.highcharts.com/modules/exporting.js"></script>
            <script src="https://code.highcharts.com/modules/export-data.js"></script>
            <script src="https://code.highcharts.com/modules/accessibility.js"></script>

            <script>
                Highcharts.chart('container', {
                    title: {
                        text: 'نمودار  ۳۰ روز گذشته'
                    },
                    tooltip: {
                        useHTML: true,
                        style: {
                            dir: 'ltr',
                            fontFamily: 'tahoma',
                        },
                        formatter: function () {
                            return (this.x ? 'تاریخ ' + this.x + '<br>' : '') + 'تعداد ' + this.y
                        }
                    },
                    xAxis: {
                        categories: [<?php $__currentLoopData = $datesOrder; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $date => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> "<?php echo e(IR_TimestampToDate($date,'Y-m-d')); ?>", <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>]
                    },
                    yAxis: {
                        title: {
                            text: 'عدد'
                        },
                        labels: {
                            formatter: function () {
                                return 'عدد' + this.value;
                            }
                        }
                    },
                    labels: {
                        items: [{
                            html: ' ',
                            style: {
                                left: '50px',
                                top: '18px',
                                color: ( // theme
                                    Highcharts.defaultOptions.title.style &&
                                    Highcharts.defaultOptions.title.style.color
                                ) || 'black'
                            }
                        }]
                    },
                    series: [
                        {
                            type: 'column',
                            name: 'سفارشات خدمات',
                            color: ' #58d68d ',
                            data: [<?php $__currentLoopData = $datesOrder; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $date => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($summeryOrderService->where('date',$date)->first()): ?> <?php echo e($summeryOrderService->where('date',$date)->first()->total); ?>, <?php else: ?> 0, <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>]
                        },
                        {
                            type: 'spline',
                            name: 'سفارشات خدمات spline',
                            data: [<?php $__currentLoopData = $datesOrder; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $date => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($summeryOrderService->where('date',$date)->first()): ?> <?php echo e($summeryOrderService->where('date',$date)->first()->total); ?>, <?php else: ?> 0, <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>],
                            marker: {
                                lineWidth: 2,
                                lineColor: '#5dade2',
                                fillColor: 'white'
                            }
                        },
                    ]
                })
                ;

            </script>
        <?php endif; ?>

        <?php if(auth()->user()->hasPermissionTo(\Mehrab\RolePermission\Models\Permission::PERMISSION_EXPERT)): ?>
            <script src="https://code.highcharts.com/highcharts.js"></script>
            <script src="https://code.highcharts.com/modules/series-label.js"></script>
            <script src="https://code.highcharts.com/modules/exporting.js"></script>
            <script src="https://code.highcharts.com/modules/export-data.js"></script>
            <script src="https://code.highcharts.com/modules/accessibility.js"></script>

            <script>
                Highcharts.chart('container', {
                    title: {
                        text: 'نمودار پرداخت ۳۰ روز گذشته'
                    },
                    tooltip: {
                        useHTML: true,
                        style: {
                            dir: 'ltr',
                            fontFamily: 'tahoma',
                        },
                        formatter: function () {
                            return (this.x ? 'تاریخ ' + this.x + '<br>' : '') + 'مبلغ ' + this.y
                        }
                    },
                    xAxis: {
                        categories: [<?php $__currentLoopData = $dates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $date => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> "<?php echo e(IR_TimestampToDate($date,'Y-m-d')); ?>", <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>]
                    },
                    yAxis: {
                        title: {
                            text: 'مبلغ'
                        },
                        labels: {
                            formatter: function () {
                                return 'تومان' + this.value;
                            }
                        }
                    },
                    labels: {
                        items: [{
                            html: ' ',
                            style: {
                                left: '50px',
                                top: '18px',
                                color: ( // theme
                                    Highcharts.defaultOptions.title.style &&
                                    Highcharts.defaultOptions.title.style.color
                                ) || 'black'
                            }
                        }]
                    },
                    series: [
                        {
                            type: 'column',
                            name: 'درصد سایت',
                            color: ' #58d68d ',
                            data: [<?php $__currentLoopData = $dates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $date => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($summery->where('date',$date)->first()): ?> <?php echo e($summery->where('date',$date)->first()->totalSiteShare); ?>, <?php else: ?> 0, <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>]
                        },
                        {
                            type: 'column',
                            color: ' #85929e ',
                            name: 'تراکنش موفق',
                            data: [<?php $__currentLoopData = $dates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $date => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($summery->where('date',$date)->first()): ?> <?php echo e($summery->where('date',$date)->first()->totalAmount); ?>, <?php else: ?> 0, <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>]
                        },
                        {
                            type: 'column',
                            name: 'درصد متخصص',
                            color: ' #f5b041 ',
                            data: [<?php $__currentLoopData = $dates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $date => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($summery->where('date',$date)->first()): ?> <?php echo e($summery->where('date',$date)->first()->totalSellerShare); ?>, <?php else: ?> 0, <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>]
                        },
                        {
                            type: 'spline',
                            name: 'فروش',
                            data: [<?php $__currentLoopData = $dates; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $date => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($summery->where('date',$date)->first()): ?> <?php echo e($summery->where('date',$date)->first()->totalAmount); ?>, <?php else: ?> 0, <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>],
                            marker: {
                                lineWidth: 2,
                                lineColor: '#5dade2',
                                fillColor: 'white'
                            }
                        },
                    ]
                })
                ;

            </script>
        <?php endif; ?>
     <?php $__env->endSlot(); ?>
 <?php if (isset($__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5)): ?>
<?php $component = $__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5; ?>
<?php unset($__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5); ?>
<?php endif; ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php /**PATH C:\xampp\htdocs\newer\Modules\Mehrab\Dashboard\Providers/../Resources/Views//Admin/dashboard.blade.php ENDPATH**/ ?>