File manager - Edit - /home/autoph/public_html/projects/tickets-autohub/storage/framework/views/a10e93aff7a0899ee5925ecbe17e221131e486bb.php
Back
<!DOCTYPE html> <head> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous"> <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" /> <link rel="stylesheet" href="<?php echo e(asset('css/select2-bootstrap-5-theme-1.3.0/select2-bootstrap-5-theme.css')); ?>"> <link rel="stylesheet" href="<?php echo e(asset('css/select2-bootstrap-5-theme-1.3.0/select2-bootstrap-5-theme.min.css')); ?>"> <link rel="stylesheet" href="<?php echo e(asset('css/select2-bootstrap-5-theme-1.3.0/select2-bootstrap-5-theme.rtl.min.css')); ?>"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> </head> <br> <div class="modal fade" id="loading-modal" data-bs-backdrop="static" data-bs-keyboard="false" data-backdrop="static" data-keyboard="false" tabindex="-1" aria-labelledby="loading-modalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h1 class="modal-title fs-5" id="loading-modalLabel"></h1> <button type="button" class="btn-close close-modal-btn" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <div class="progress"> <div id="progrss-loading-bar" class="progress-bar progress-bar-striped" role="progressbar" aria-valuemin="0" aria-valuemax="100"> </div> </div> <br> <button class="btn btn-xs btn-outline-danger" style="display:none;border:none;color:#343a40;" title="Pdf view" id="btn-pdf"><i class="fa fa-file-pdf-o" style="font-size:30px"></i> <span>Pdf view</span></button> <button class="btn btn-xs btn-outline-success" style="display:none;border:none;color:#343a40;" title="Export Excel File" id="btn-table"><i class="fa fa-file-excel-o" style="font-size:30px" aria-hidden="true"></i> <span> Export excel</span></button> </div> </div> </div> </div> <div class="tickets_masterfile" style="width: 98%; padding:10px;"> <center> <h4>Tickets Summary Masterfile</h4> </center> <hr> <form class="tcktsForm" id="tcktsForm" target="_blank" method="post" action="<?php echo e(url('reports/get/tickets_masterfile')); ?>" novalidate> <div class="row ml-3"> <div class="col"> <div class="row mb-3"> <div class="form-group div-company"> <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>"> <label for="company" class="form-label">Company</label> <select class="form-select" name="comp_code[]" id="multiple-select-clear-field-company" data-placeholder="Select Company" multiple> <?php $__currentLoopData = $companies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $c): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <small> <option style="margin-left:50px;" value="<?php echo e($c->comp_code); ?>" selected> <?php echo e($c->comp_code . ' - ' . $c->comp_name); ?></option> </small> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> <div class="form-group div-dealer"> <label for="company" class="form-label">Dealer</label> <select class="form-select" name="dealer_code[]" id="multiple-select-clear-field-dealer" data-placeholder="Select Dealer" multiple> <small> <?php $__currentLoopData = $dealers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $dealer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <small> <option style="margin-left:50px;" value="<?php echo e($dealer->dealer_code); ?>" selected> <?php echo e($dealer->dealer_name); ?></option> </small> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </small> </select> </div> </div> <div class="row mb-3"> <div class="col"> <div class="form-group"> <label class="form-label" for="from_date">Start Date: </label> <input class="form-control" type="date" value="<?= date('Y-m-d') ?>" name="from_date" id="from_date"> </div> </div> <div class="col"> <div class="form-group"> <label class="form-label"for="to_date">End Date: </label> <input class="form-control" value="<?= date('Y-m-d') ?>" type="date" name="to_date" id="to_date"> </div> </div> </div> <button class="btn btn-primary btn-md mt-3 btn-submit">SUBMIT</button> </div> </div> </form> </div> </html> <script src="https://unpkg.com/jspdf@latest/dist/jspdf.umd.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.5.15/jspdf.plugin.autotable.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"> </script> <script src="<?php echo e(asset('js/js_v2/swal.js')); ?>"></script> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.17.4/xlsx.full.min.js"></script> <script src="<?php echo e(asset('js/authentication/report/TicketMasterfileReport.js')); ?>"></script> <script> const employee_name = "<?php echo e(auth()->user()->f_name . ' ' . auth()->user()->l_name); ?>"; const logo = "<?php echo e(asset('files/img/ahg_logo.png')); ?>"; </script> <?php /* // $(document).ready(function() { // window.jsPDF = window.jspdf.jsPDF; // $('#multiple-select-clear-field-company').select2({ // theme: "bootstrap-5", // width: $(this).data('width') ? $(this).data('width') : $(this).hasClass('w-100') ? '100%' : // 'style', // placeholder: $(this).data('placeholder'), // closeOnSelect: false, // allowClear: true, // }); // $('#multiple-select-clear-field-dealer').select2({ // theme: "bootstrap-5", // width: $(this).data('width') ? $(this).data('width') : $(this).hasClass('w-100') ? '100%' : // 'style', // placeholder: $(this).data('placeholder'), // closeOnSelect: false, // allowClear: true, // }); // $("#multiple-select-clear-field-company").on('change', function() { // const comArr = $(this).val(); // $.ajax({ // url: "/roles/fetchDealers/", // type: "POST", // data: { // com_id: comArr // }, // headers: { // 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') // }, // success: function(result) { // $('#multiple-select-clear-field-dealer').empty(); // $.each(result[0], function(index, dealer) { // let optSelected = (result[1].includes(dealer.id) ? // 'selected' : ''); // $('#multiple-select-clear-field-dealer').append( // '<option value="' + dealer.id + '" ' + optSelected + // '>' + dealer.dealer_name + '</option>'); // }); // }, // error: function(error) { // console.log(error); // } // }); // }); // var data_set = []; // var date_from = ''; // var date_to = ''; // var totalRecords = 0; // var totalClosedTicket = 0; // var totalOngoingTicket = 0; // var total_sla = 0; // $('.btn-submit').click(function(e) { // e.preventDefault(); // $('#progrss-loading-bar').css('width', 0 + '%'); // $('#progrss-loading-bar').text(0 + '%'); // $('#progrss-loading-bar').attr('aria-valuenow', 0); // $("#btn-pdf").hide(); // $("#btn-table").hide(); // data_set = []; // let comp_code = $("#multiple-select-clear-field-company").val(); // let dealer_code = $("#multiple-select-clear-field-dealer").val(); // let from_date = $("#from_date").val(); // let to_date = $("#to_date").val(); // $.ajax({ // url: "/reports/get/tickets_masterfile2?page=1", // type: "POST", // data: { // comp_code: comp_code, // dealer_code: dealer_code, // from_date: from_date, // to_date: to_date // }, // headers: { // 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') // }, // success: function(result) { // console.log(result); // totalRecords = 0; // totalClosedTicket = 0; // totalOngoingTicket = 0; // total_sla = 0; // data_set.push(...result.data); // date_from = result.date_from; // date_to = result.date_to; // totalRecords = result.total_records; // totalClosedTicket = result.total_closed_ticket; // totalOngoingTicket = result.total_ongoing_ticket; // total_sla = result.total_sla_ticket; // $('#loading-modal').modal('show'); // if (result.total_records == 0) { // $('#progrss-loading-bar').css('width', 100 + '%'); // $('#progrss-loading-bar').text(100 + '%'); // return; // } // fetchData(result.total_page,comp_code,dealer_code,from_date,to_date); // // var incPercent = 0; // // for (var i = 1; i <= result.total_page; i++) { // // if (i != 0 && i != 1) { // // $.ajax({ // // url: "/reports/get/tickets_masterfile2?page=" + i, // // type: "POST", // // data: { // // comp_code: comp_code, // // dealer_code: dealer_code, // // from_date: from_date, // // to_date: to_date // // }, // // headers: { // // 'X-CSRF-TOKEN': $('meta[name="csrf-token"]') // // .attr('content') // // }, // // success: function(response) { // // var loadingPercentage = // // computeLoadingPercentage(response // // .currentPage, response // // .total_records, response.total_page, // // response.perPage); // // // console.log(loadingPercentage); // // incPercent = loadingPercentage; // // $('#progrss-loading-bar').attr( // // 'aria-valuenow', loadingPercentage // // .toFixed(2)); // // $('#progrss-loading-bar').css('width', // // loadingPercentage.toFixed(2) + '%'); // // $('#progrss-loading-bar').text( // // loadingPercentage + '%'); // // data_set.push(...response.data); // // if (loadingPercentage == 100) { // // isDone = true; // // $("#btn-pdf").show(); // // $("#btn-table").show(); // // // $("#btn-pdf").prop("disabled", false); // // // $("#btn-table").attr('disabled',false); // // } // // } // // }); // // } // // } // }, // error: function(xhr, status, error) { // // Hide loading indicator // // Handle error response // console.error(xhr.responseText); // alert('Error processing data. Please try again.'); // } // }); // $("#close-moda-btn").on('click', function() { // data_set = []; // }); // }); // async function collectData(page,comp_code,dealer_code,from_date,to_date) { // return new Promise(function(resolve, reject) { // $.ajax({ // url: "/reports/get/tickets_masterfile2?page=" + page, // type: "POST", // data: { // comp_code: comp_code, // dealer_code: dealer_code, // from_date: from_date, // to_date: to_date // }, // headers: { // 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') // }, // success: function(response) { // resolve(response); // }, // error: function(xhr, status, error) { // reject(error); // } // }); // }); // } // async function fetchData(totalPages,comp_code,dealer_code,from_date,to_date) { // for (var i = 1; i <= totalPages; i++) { // if (i != 0 && i != 1) { // try { // const response = await collectData(i,comp_code,dealer_code,from_date,to_date); // var loadingPercentage = computeLoadingPercentage(response.currentPage, response // .total_records, response.total_page, response.perPage); // incPercent = loadingPercentage; // console.log(incPercent); // $('#progrss-loading-bar').attr('aria-valuenow', loadingPercentage.toFixed(2)); // $('#progrss-loading-bar').css('width', loadingPercentage.toFixed(2) + '%'); // $('#progrss-loading-bar').text(loadingPercentage + '%'); // data_set.push(...response.data); // if (loadingPercentage == 100) { // isDone = true; // $("#btn-pdf").show(); // $("#btn-table").show(); // } // } catch (error) { // console.error(error); // } // } // } // } // function computeLoadingPercentage(currentPage, totalRows, totalPageCount, rowsPerPage) { // totalPageCount = Math.ceil(totalRows / rowsPerPage); // const loadedPageCount = Math.min(currentPage, totalPageCount); // return (loadedPageCount / totalPageCount) * 100; // } // $("#btn-pdf").on('click', function() { // generatePDFtable(data_set); // }); // $("#btn-table").on('click', function() { // generateExcel(data_set); // }); // // //WORKING IN LOCAL // // function generatePDFtable(data) { // // var doc = new jsPDF({ // // orientation: 'landscape', // Set orientation to landscape // // // unit: 'mm', // Set unit to millimeters // // format: 'a4' // Set format to A4 // // }); // // var imgWidth = 40; // // var imgHeight = 30; // // // Add the image to the PDF // // doc.addImage("{{ asset('files/img/ahg_logo.png') }}", 'PNG', 240, 1, imgWidth, imgHeight); // // var addFooter = function() { // // var totalPages = doc.internal.getNumberOfPages(); // // doc.setFontSize(10); // // for (var i = 1; i <= totalPages; i++) { // // doc.setPage(i); // // if (i === totalPages) { // // doc.text('Page ' + i + ' of ' + totalPages, doc.internal.pageSize.getWidth() - 160, doc.internal.pageSize.getHeight() - 8); // // } // // else // // { // // doc.text('Page ' + i + ' of ' + totalPages, doc.internal.pageSize.getWidth() - 160, doc.internal.pageSize.getHeight() - 3); // // } // // } // // }; // // var startXtitle = 10; // // doc.setFont('sans serif', 'bold'); // // doc.setFontSize(20); // // doc.text('Ticket Masterfile Report',startXtitle, 10); // // doc.setFont('sans serif', 'normal') // // doc.setFontSize(10); // // const setDateFrom = new Date(date_from); // // const DateFrom_formattedDateTime = setDateFrom.toLocaleString('en-US', { // // // weekday: 'long', // // year: 'numeric', // // month: 'long', // // day: 'numeric', // // // hour: 'numeric', // // // minute: 'numeric', // // // second: 'numeric', // // // hour12: true // Include AM/PM indicator // // }); // // const setDateTo = new Date(date_to); // // const DateTo_formattedDateTime = setDateTo.toLocaleString('en-US', { // // // weekday: 'long', // // year: 'numeric', // // month: 'long', // // day: 'numeric', // // }); // // doc.text('Date from '+DateFrom_formattedDateTime +' to '+DateTo_formattedDateTime,startXtitle, 16); // // doc.text('Prepared by :',startXtitle, 19); // // doc.setFont('sans serif', 'italic'); // // doc.text(employee_name,30, 19); // // doc.setFont('sans serif', 'normal') // // doc.text('Prepared date :',startXtitle, 22); // // doc.setFont('sans serif', 'italic'); // // let now = new Date(); // // const formattedDateTime = now.toLocaleString('en-US', { // // weekday: 'long', // // year: 'numeric', // // month: 'long', // // day: 'numeric', // // hour: 'numeric', // // minute: 'numeric', // // second: 'numeric', // // hour12: true // Include AM/PM indicator // // }); // // doc.text(formattedDateTime,32, 22); // // doc.setFont('sans serif', 'normal'); // // doc.text('Total Records :',startXtitle, 26); // // doc.setFont('sans serif', 'italic'); // // doc.text(totalRecords.toString(),32, 26); // // var startY = 28; // // var startX = 10; // // var lineHeight = 8; // // var cellWidth = 20; // // var cellHeight =10; // // var headers = [ // // 'No.', // // 'Ticket No', // // 'Sender', // // 'Company', // // 'Dealer', // // 'Category', // // 'Sub Category', // // 'Date created', // // 'Date started', // // 'Date ended', // // 'Support Personel', // // 'Position', // // 'SLA', // // 'Status' // // ]; // // // Define the widths of each column // // var cellWidths = [12, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20]; // Adjust the width of the first column // // doc.setFont('helvetica', 'bold'); // // doc.setFillColor(200, 200, 200); // Light gray background color // // // Calculate the total width of the headers // // var totalHeaderWidth = cellWidths.reduce((acc, curr) => acc + curr, 0); // // // Draw background rectangle for the header row // // doc.rect(startX, startY, totalHeaderWidth, cellHeight, 'F'); // // doc.setFontSize(8); // // // Draw headers with adjusted column widths // // var currentX = startX; // Track the current X position // // headers.forEach(function(header, i) { // // var splitValue = doc.splitTextToSize(header, cellWidths[i] - 7); // Adjust width as needed // // doc.text(currentX + cellWidths[i] / 2, startY + cellHeight / 2, splitValue, null, null, 'center'); // // currentX += cellWidths[i]; // Move to the next column // // }); // // // Draw data rows with adjusted column widths // // var startY = 23; // // doc.setFont('helvetica', 'normal'); // // var lineHeight = 15; // Adjusted line height // // doc.setFillColor(255, 255, 255); // Reset background color // // cellHeight = 10; // // doc.setFontSize(7); // // data.forEach(function(item, rowIndex) { // // startY += lineHeight; // // if (startY > doc.internal.pageSize.height - 20) { // // doc.addPage(); // Add a new page if startY exceeds the height // // startY = 20; // Reset startY for the new page // // } // // var currentX = startX; // Track the current X position // // Object.values(item).forEach(function(value, colIndex) { // // var splitValue = doc.splitTextToSize(value, cellWidths[colIndex] - 5); // Adjust width as needed // // splitValue = (splitValue == 'null' || splitValue == 'null' || splitValue == 'NULL' ? '' : splitValue); // // doc.rect(currentX, startY, cellWidths[colIndex], 15); // // doc.text(currentX + cellWidths[colIndex] / 2, startY + cellHeight / 2, splitValue, null, null, 'center'); // // currentX += cellWidths[colIndex]; // Move to the next column // // }); // // }); // // addFooter(); // // var pdfData = doc.output('datauristring'); // // window.open(pdfData); // // } // function generatePDFtable(data) { // console.log(data); // var doc = new jsPDF({ // orientation: 'landscape', // format: 'a4' // }); // var imgWidth = 40; // var imgHeight = 30; // doc.addImage("{{ asset('files/img/ahg_logo.png') }}", 'PNG', 240, 1, imgWidth, imgHeight); // var addFooter = function() { // var totalPages = doc.internal.getNumberOfPages(); // doc.setFontSize(10); // for (var i = 1; i <= totalPages; i++) { // doc.setPage(i); // if (i === totalPages) { // doc.text('Page ' + i + ' of ' + totalPages, doc.internal.pageSize.getWidth() - 160, // doc.internal.pageSize.getHeight() - 8); // } else { // doc.text('Page ' + i + ' of ' + totalPages, doc.internal.pageSize.getWidth() - 160, // doc.internal.pageSize.getHeight() - 3); // } // } // }; // var startXtitle = 10; // doc.setFont('sans serif', 'bold'); // doc.setFontSize(20); // doc.text('Ticket Masterfile Report', startXtitle, 10); // doc.setFont('sans serif', 'normal') // doc.setFontSize(8); // const setDateFrom = new Date(date_from); // const DateFrom_formattedDateTime = setDateFrom.toLocaleString('en-US', { // // weekday: 'long', // year: 'numeric', // month: 'long', // day: 'numeric', // // hour: 'numeric', // // minute: 'numeric', // // second: 'numeric', // // hour12: true // Include AM/PM indicator // }); // const setDateTo = new Date(date_to); // const DateTo_formattedDateTime = setDateTo.toLocaleString('en-US', { // // weekday: 'long', // year: 'numeric', // month: 'long', // day: 'numeric', // }); // doc.text('Date range:', startXtitle, 15); // doc.text(DateFrom_formattedDateTime + ' to ' + DateTo_formattedDateTime, 28, 15); // doc.setFont('sans serif', 'normal') // doc.text('Closed :', 90, 15); // doc.setFont('sans serif', 'italic'); // doc.text(totalClosedTicket.toString(), 107, 15); // // doc.setFont('sans serif', 'normal') // // doc.text('Prepared by :',startXtitle, 19); // // doc.setFont('sans serif', 'italic'); // // doc.text(employee_name,28, 19); // doc.setFont('sans serif', 'normal') // doc.text('Prepared date :', startXtitle, 19); // doc.setFont('sans serif', 'italic'); // let now = new Date(); // const formattedDateTime = now.toLocaleString('en-US', { // weekday: 'long', // year: 'numeric', // month: 'long', // day: 'numeric', // hour: 'numeric', // minute: 'numeric', // second: 'numeric', // hour12: true // Include AM/PM indicator // }); // doc.text(formattedDateTime, 28, 19); // doc.setFont('sans serif', 'normal') // doc.text('Ongoing :', 90, 19); // doc.setFont('sans serif', 'italic'); // doc.text(totalOngoingTicket.toString(), 107, 19); // doc.setFont('sans serif', 'normal') // doc.text('Total SLA :', 90, 23); // doc.setFont('sans serif', 'italic'); // // doc.setFont(undefined, 'bold'); set italic to bold // doc.text((total_sla / 60).toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + ' hrs.', // 107, 23); // doc.setFont('sans serif', 'normal') // doc.text('Prepared by :', startXtitle, 23); // doc.setFont('sans serif', 'italic'); // doc.text(employee_name, 28, 23); // doc.setFont('sans serif', 'normal'); // doc.text('Total Records :', startXtitle, 27); // doc.setFont('sans serif', 'italic'); // doc.text(totalRecords.toString(), 28, 27); // doc.setFontSize(10); // var startY = 28; // var startX = 10; // var lineHeight = 8; // var cellWidth = 20; // var cellHeight = 10; // var headers = [ // 'No.', // 'Ticket No', // 'Sender', // 'Company', // 'Dealer', // 'Category', // 'Sub Category', // 'Date created', // 'Date started', // 'Date ended', // 'Support Personel', // 'Position', // 'SLA', // 'Status' // ]; // // Define the widths of each column // var cellWidths = [12, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, // 20 // ]; // Adjust the width of the first column // doc.setFont('helvetica', 'bold'); // doc.setFillColor(200, 200, 200); // Light gray background color // // Calculate the total width of the headers // var totalHeaderWidth = cellWidths.reduce((acc, curr) => acc + curr, 0); // // Draw background rectangle for the header row // doc.rect(startX, startY, totalHeaderWidth, cellHeight, 'F'); // doc.setFontSize(8); // // Draw headers with adjusted column widths // var currentX = startX; // Track the current X position // headers.forEach(function(header, i) { // var splitValue = doc.splitTextToSize(header, cellWidths[i] - // 7); // Adjust width as needed // doc.text(currentX + cellWidths[i] / 2, startY + cellHeight / 2, splitValue, null, null, // 'center'); // currentX += cellWidths[i]; // Move to the next column // }); // // Draw data rows with adjusted column widths // var startY = 23; // doc.setFont('helvetica', 'normal'); // var lineHeight = 15; // Adjusted line height // doc.setFillColor(255, 255, 255); // Reset background color // cellHeight = 10; // doc.setFontSize(7); // var counter = 1; // Counter variable for the first column // data.forEach(function(item, rowIndex) { // startY += lineHeight; // if (startY > doc.internal.pageSize.height - 20) { // doc.addPage(); // Add a new page if startY exceeds the height // startY = 20; // Reset startY for the new page // } // var currentX = startX; // Track the current X position // doc.text(14, startY + 11 / 2, counter.toString(), null, null, 'center'); // counter++; // Increment the counter // Object.values(item).forEach(function(value, colIndex) { // var splitValue = doc.splitTextToSize(value, cellWidths[colIndex] - // 5); // Adjust width as needed // splitValue = (splitValue == 'null' || splitValue == 'null' || splitValue == // 'NULL' ? '' : splitValue); // doc.rect(currentX, startY, cellWidths[colIndex], 15); // doc.text(currentX + cellWidths[colIndex] / 2, startY + cellHeight / 2, // splitValue, null, null, 'center'); // currentX += cellWidths[colIndex]; // Move to the next column // }); // }); // addFooter(); // var pdfData = doc.output('datauristring'); // // window.open(pdfData); // // var link = document.createElement('a'); // // link.href = pdfData; // // link.target = '_blank'; // Open link in new tab // // link.innerHTML = 'Open PDF'; // Link text // // document.body.appendChild(link); // Append link to the body // // link.click(); // Simulate click event to open the PDF // var pdfData = doc.output('blob'); // var blobUrl = URL.createObjectURL(pdfData); // window.open(blobUrl); // } // function generateExcel(data) { // var headers = [ // 'Ticket No', // 'Sender', // 'Company', // 'Dealer', // 'Category', // 'Sub Category', // 'Date created', // 'Date started', // 'Date ended', // 'Support Personel', // 'Position', // 'SLA', // 'Status' // ]; // var dataArray = []; // // Convert data to array of arrays // var dataArray = [headers]; // data.forEach(function(item) { // var row = []; // headers.forEach(function(header) { // var key = header.toLowerCase().replace(/\s/g, '_'); // var value = String(item[key]); // Convert value to string // row.push(value); // // row.push(item[header.toLowerCase().replace(/\s/g, '_')]); // Adjusted to match keys in data // }); // dataArray.push(row); // }); // // Create a worksheet // var worksheet = XLSX.utils.aoa_to_sheet(dataArray); // // Create a workbook // var workbook = XLSX.utils.book_new(); // XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1'); // // Convert the workbook to a binary Excel file // var excelFile = XLSX.write(workbook, { // bookType: 'xlsx', // type: 'binary' // }); // // Convert the binary Excel data to a Blob // var blob = new Blob([s2ab(excelFile)], { // type: 'application/octet-stream' // }); // // Create a download link // var url = window.URL.createObjectURL(blob); // var a = document.createElement('a'); // a.href = url; // const dateTime = new Date().toLocaleString(); // a.download = 'Ticket Masterfile Report ' + dateTime + '.xlsx'; // // Trigger a click event to download the file // a.click(); // window.URL.revokeObjectURL(url); // } // // Helper function to convert string to array buffer // function s2ab(s) { // var buf = new ArrayBuffer(s.length); // var view = new Uint8Array(buf); // for (var i = 0; i < s.length; i++) view[i] = s.charCodeAt(i) & 0xFF; // return buf; // } // }); // </script> // <script> // const form = document.getElementById('tcktsForm'); // const rbt = document.getElementsByName('type'); // let radioButtonsChecked = false; // form.addEventListener('submit', function(e) { // e.preventDefault(); // for (let i = 0; i < rbt.length; i++) { // if (rbt[i].checked) { // radioButtonsChecked = true; // break; // } // } // if (!radioButtonsChecked) { // swal.fire({ // icon: 'error', // title: 'Oops...', // text: 'Kindly choose which type of report you want to generate', // }); // } else { // form.submit(); // } // }); </script> */ ?> <?php /**PATH C:\laragon\www\DEVELOPMENT\autohub-ticketing\resources\views/layouts/authentication/admin/report/tickets_masterfile.blade.php ENDPATH**/ ?>
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0 |
proxy
|
phpinfo
|
Settings