Project

General

Profile

Bug #3019

Fitur Export Hanya PDF di Menu ESS Payslip

Added by shofwan shiddiq about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Start date:
08/26/2024
Due date:
% Done:

0%

Estimated time:

Description

Sebelumnya Fitur export ada semua file type ( pdf, excel, word, csv dll.) sesuai dengan setting reporting service, berikut update supaya khusus menu ess payslip, export nya hanya pdf saja

UPDATE FILE PACKAGE
C:\Webserver\Easy\UI\app\controller\report\custom.rdlreport.js

UPDATE SCRIPT

setelah unmask di function view report, kasih function checkIframeContent (pnlReport), dan ubah time jadi 3000

// Function to check iframe content and modify export options
function checkIframeContent(pnlReport) {
var iframe = pnlReport.el.down('iframe').dom;

if (iframe) {
var iframeDocument = iframe.contentDocument || iframe.contentWindow.document;
if (iframeDocument) {
var exportSelect = iframeDocument.getElementById('ReportViewer1_ctl01_ctl05_ctl00');
if (exportSelect) {
var options = exportSelect.options;
for (var i = options.length - 1; i >= 0; i--) {
var value = options[i].value;
// Remove all options except "Select a format" and "PDF"
if (value !== 'Select a format' && value !== 'PDF') {
exportSelect.remove(i);
}
}
// Ensure that dropdown functionality remains
// Re-trigger change event to ensure it updates properly
var event = document.createEvent('HTMLEvents');
event.initEvent('change', true, false);
exportSelect.dispatchEvent(event);
} else {
// Retry if exportSelect is not found
setTimeout(function() {
checkIframeContent(pnlReport); // Retry
}, 500); // Retry every 500ms
}
} else {
// Retry if iframeDocument is not yet available
setTimeout(function() {
checkIframeContent(pnlReport); // Retry
}, 500); // Retry every 500ms
}
} else {
// Retry if iframe is not yet available
setTimeout(function() {
checkIframeContent(pnlReport); // Retry
}, 500); // Retry every 500ms
}
}

Files

clipboard-202408261719-abxqz.png (113 KB) clipboard-202408261719-abxqz.png shofwan shiddiq, 08/26/2024 05:19 PM
clipboard-202408261720-6o8ox.png (9.21 KB) clipboard-202408261720-6o8ox.png shofwan shiddiq, 08/26/2024 05:20 PM
#1

Updated by shofwan shiddiq about 1 month ago

  • Status changed from QA Test to Closed

Also available in: Atom PDF