Файловый менеджер - Редактировать - /home/clickysoft/public_html/calvary-p2.clickysoft.net/storage/framework/views/0e52029f007ad1abdf48696bfa2f9424.php
Назад
<?php $__env->startSection('title', 'Hot Lunch Reports'); ?> <?php $__env->startPush('admin-styles'); ?> <link rel="stylesheet" href="<?php echo e(asset('assets/admin/vendor/libs/datatables-bs5/datatables.bootstrap5.css')); ?>" /> <link rel="stylesheet" href="<?php echo e(asset('assets/admin/vendor/libs/datatables-responsive-bs5/responsive.bootstrap5.css')); ?>" /> <?php $__env->stopPush(); ?> <?php $__env->startSection('content'); ?> <div class="m-3 flex-grow-1 container-p-y"> <div class="card"> <div class="card-header"> <h3 class="float-start">Hot Lunch Reports</h3> <select name="hot_lunch" class="form-control float-end" id="hot_lunch" style="width: 30%"> <option value="">--Select Lunch--</option> <?php $__currentLoopData = $hot_lunches; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lunch): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option <?php if(request()->get('hot_lunch', null) == $lunch->id): echo 'selected'; endif; ?> value="<?php echo e($lunch->id); ?>"><?php echo e($lunch->title); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> <div class="card-body"> <div class="row"> <div class="col-md-6"> <div id="orders-by-vendor"></div> </div> <div class="col-md-6"> <div id="orders-by-grade"></div> </div> </div> </div> </div> <div class="card mt-3"> <div class="row"> <div class="col-sm-3"> <div class="card h-100"> <div class="card-body"> <h5 class="card-title">Orders</h5> <p class="card-text"> <strong>No. of order : <span id="order-quantity">0</span></strong> </p> <p class="card-text"> <strong> Amount : <span class="text-success" id="order-total">$0.00</span> </strong> </p> </div> </div> </div> <div class="col-sm-3"> <div class="card h-100"> <div class="card-body"> <h5 class="card-title">School directories</h5> <p class="card-text"> <strong>Quantity : <span id="school-dir-quantity">10</span></strong> </p> <p class="card-text"> <strong>Amount : <span class="text-success" id="school-dir-total">$250</span></strong> </p> </div> </div> </div> <div class="col-sm-3"> <div class="card h-100"> <div class="card-body"> <h5 class="card-title">Class funds</h5> <p class="card-text" id="class-fund-total"> <strong>Total : <span class="text-success">$0.00</span></strong> </p> </div> </div> </div> <div class="col-sm-3"> <div class="card h-100"> <div class="card-body"> <h5 class="card-title">Annual dues</h5> <p class="card-text" id="annual-dues-total"> <strong>Total : <span class="text-success">$0.00</span></strong> </p> </div> </div> </div> </div> </div> <div class="card mt-3"> <div class="card-header"> <h3 class="float-start">Summary</h3> <div class="btn-group float-end"> <button class="btn btn-sm btn-success float-end" id="generate-excel" style="width: 35%;"> Master Financial Report </button> <button class="btn btn-sm btn-info float-end" id="generate-vendor-excel" style="width: 35%;"> Vendor Report </button> <button class="btn btn-sm btn-primary float-end" id="generate-order-excel" style="width: 35%;"> Order Report </button> <button class="btn btn-sm btn-info float-end" id="generate-t-shirt-report" style="width: 35%;"> T-Shirt Report </button> <button class="btn btn-sm btn-success float-end" id="generate-directory-report" style="width: 35%;"> Directory Report </button> </div> </div> <div class="card-body"> <div class="row"> <div class="col-md-6"> <h4 id="vendors-total">Vendors total amount : <span class="text-success">$0.00</span></h4> <table id="vendor-summary" class="table table-bordered table-responsive"></table> </div> <div class="col-md-6"> <h4 id="grades-total">Grade wise total amount : <span class="text-success">$0.00</span></h4> <table id="grade-summary" class="table table-bordered table-responsive"></table> </div> </div> </div> </div> </div> <?php $__env->stopSection(); ?> <?php $__env->startPush('admin-scripts'); ?> <script src="<?php echo e(asset('assets/admin/vendor/libs/datatables/jquery.dataTables.js')); ?>"></script> <script src="<?php echo e(asset('assets/admin/vendor/libs/datatables-bs5/datatables-bootstrap5.js')); ?>"></script> <script src="<?php echo e(asset('assets/admin/vendor/libs/datatables-responsive/datatables.responsive.js')); ?>"></script> <script src="<?php echo e(asset('assets/admin/vendor/libs/datatables-responsive-bs5/responsive.bootstrap5.js')); ?>"></script> <script src="<?php echo e(asset('assets/admin/js/axios.min.js')); ?>"></script> <script src="<?php echo e(asset('assets/admin/js/sweetalert.min.js')); ?>"></script> <script src="https://cdn.jsdelivr.net/npm/apexcharts"></script> <script> let hotLunch = null $(document).ready(function() { const urlParams = new URLSearchParams(window.location.search); hotLunch = urlParams.get('hot_lunch') orderByVendor(hotLunch) orderByGrade(hotLunch) vendorSummary(hotLunch) gradeSummary(hotLunch) vendorSummaryTotal(hotLunch) gradeSummaryTotal(hotLunch) orderSummary(hotLunch) }) $(document).on('change', '#hot_lunch', function() { let url = `<?php echo e(route('manage.hl-reports')); ?>` const hot_lunch = $(this).val() if (hot_lunch !== "") { url += `?hot_lunch=${hot_lunch}` } window.location = url }) $(document).on('click', '#generate-excel', function() { vendorOrderSummeryExcel(hotLunch) }) $(document).on('click', '#generate-vendor-excel', function() { vendorOrderGradeSummeryExcel(hotLunch) }) $(document).on('click', '#generate-order-excel', function() { $(this).attr('disabled', true) orderWiseSummeryExcel(hotLunch) }) $(document).on('click', '#generate-t-shirt-report', function() { tShirtReportSummary(hotLunch) }) $(document).on('click', '#generate-directory-report', function() { directoryReportSummary(hotLunch) }) //Orders by vendor Axios Request function orderByVendor(hotLunch) { let route = "" if (hotLunch) { var fullPath = "<?php echo e(route('vendor.orders', ':path')); ?>"; route = fullPath.replace(':path', hotLunch); } else { route = "<?php echo e(route('vendor.orders')); ?>"; } axios.get(route) .then(function(response) { let data = response.data renderChart("orders-by-vendor", data.title, data.labels, data.series) }) .catch(function(error) { console.log(error) }); } function orderByGrade(hotLunch) { let route = "" if (hotLunch) { var fullPath = "<?php echo e(route('grade.orders', ':path')); ?>"; route = fullPath.replace(':path', hotLunch); } else { route = "<?php echo e(route('grade.orders')); ?>"; } axios.get(route) .then(function(response) { let data = response.data renderChart("orders-by-grade", data.title, data.labels, data.series) }) .catch(function(error) { console.log(error) }); } //Chart Rendering function renderChart(element, title, labels, series) { const options = { series: series.length > 0 ? series : [0], chart: { width: 420, type: 'pie', }, labels: labels.length > 0 ? labels : ['No Data'], title: { text: title, }, responsive: [{ breakpoint: 480, options: { chart: { width: 200, minHeight: 300, }, } }] }; (new ApexCharts(document.querySelector(`#${element}`), options)).render(); } function vendorSummary(hotLunch) { let route = "" if (hotLunch) { var fullPath = "<?php echo e(route('vendor.order-summary', ':path')); ?>"; route = fullPath.replace(':path', hotLunch); } else { route = "<?php echo e(route('vendor.order-summary')); ?>"; } $('#vendor-summary').DataTable({ "processing": true, "serverSide": true, "iDisplayLength": 50, "orderMulti": true, "scrollX": true, "ajax": route, "columns": [{ "data": "vendor", "title": "Vendor", "orderable": false, "searchable": false }, { "data": "order_count", "title": "Total Orders", "orderable": false, "searchable": false }, { "data": "order_total", "title": "Total Amount", "orderable": false, "searchable": false }, ] }); } function gradeSummary(hotLunch) { let route = "" if (hotLunch) { const fullPath = "<?php echo e(route('grade.order-summary', ':path')); ?>"; route = fullPath.replace(':path', hotLunch); } else { route = "<?php echo e(route('grade.order-summary')); ?>"; } $('#grade-summary').DataTable({ "processing": true, "serverSide": true, "iDisplayLength": 50, "orderMulti": true, "scrollX": true, "ajax": route, "columns": [{ "data": "grade", "title": "Grade", "orderable": false, "searchable": false }, { "data": "order_count", "title": "Total Orders", "orderable": false, "searchable": false }, { "data": "order_total", "title": "Total Amount", "orderable": false, "searchable": false }, ] }); } function vendorSummaryTotal(hotLunch) { let route = "" if (hotLunch) { const fullPath = "<?php echo e(route('vendor.order-summary-total', ':path')); ?>"; route = fullPath.replace(':path', hotLunch); } else { route = "<?php echo e(route('vendor.order-summary-total')); ?>"; } axios.get(route) .then(function(response) { let data = response.data $(document).find('#vendors-total span').text(`$${data}`) }) .catch(function(error) { console.log(error) }); } function gradeSummaryTotal(hotLunch) { let route = "" if (hotLunch) { const fullPath = "<?php echo e(route('grade.order-summary-total', ':path')); ?>"; route = fullPath.replace(':path', hotLunch); } else { route = "<?php echo e(route('grade.order-summary-total')); ?>"; } axios.get(route) .then(function(response) { let data = response.data $(document).find('#grades-total span').text(`$${data}`) }) .catch(function(error) { console.log(error) }); } function vendorOrderSummeryExcel(hotLunch) { let route = "" if (hotLunch) { const fullPath = "<?php echo e(route('vendor.order-summary-excel', ':path')); ?>"; route = fullPath.replace(':path', hotLunch); } else { route = "<?php echo e(route('vendor.order-summary-excel')); ?>"; } window.location = route; } function vendorOrderGradeSummeryExcel(hotLunch) { let route = "" if (hotLunch) { const fullPath = "<?php echo e(route('grade.order-summary-excel', ':path')); ?>"; route = fullPath.replace(':path', hotLunch); } else { route = "<?php echo e(route('grade.order-summary-excel')); ?>"; } window.location = route; } function orderWiseSummeryExcel(hotLunch) { let route = "" if (hotLunch) { const fullPath = "<?php echo e(route('order-wise-summary-excel', ':path')); ?>"; route = fullPath.replace(':path', hotLunch); } else { route = "<?php echo e(route('order-wise-summary-excel')); ?>"; } window.location = route; //Disable the button until response comes setTimeout(() => { $('#generate-order-excel').attr('disabled', false) }, 1000 * 55); } function tShirtReportSummary(hotLunch) { let route = "" if (hotLunch) { const fullPath = "<?php echo e(route('t-shirt-summary-excel', ':path')); ?>"; route = fullPath.replace(':path', hotLunch); } else { route = "<?php echo e(route('t-shirt-summary-excel')); ?>"; } window.location = route; } function directoryReportSummary(hotLunch) { let route = "" if (hotLunch) { const fullPath = "<?php echo e(route('directory-summary-excel', ':path')); ?>"; route = fullPath.replace(':path', hotLunch); } else { route = "<?php echo e(route('directory-summary-excel')); ?>"; } window.location = route; } function orderSummary(hotLunch) { let route = "" if (hotLunch) { const fullPath = "<?php echo e(route('order-summary', ':path')); ?>"; route = fullPath.replace(':path', hotLunch); } else { route = "<?php echo e(route('order-summary')); ?>"; } axios.get(route) .then(function(response) { let data = response.data $(document).find('#order-quantity').text(`${data.orders.total_orders}`) $(document).find('#order-total').text(`$${data.orders.total_amount}`) $(document).find('#school-dir-quantity').text(`${data.school_directories.total_quantity}`) $(document).find('#school-dir-total').text(`$${data.school_directories.total_price}`) $(document).find('#class-fund-total span').text(`$${data.class_funds}`) $(document).find('#annual-dues-total span').text(`$${data.annual_dues}`) }) .catch(function(error) { console.log(error) }); } </script> <?php $__env->stopPush(); ?> <?php echo $__env->make('admin.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/clickysoft/public_html/calvary-p2.clickysoft.net/resources/views/admin/hot-lunch-reports/index.blade.php ENDPATH**/ ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка