CINXE.COM

[public] Supplier Database

<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>[public] Supplier Database</title><!-- cdf-bootstrap-script-includes --> <script language="javascript" type="text/javascript" src="/pentaho/api/repos/pentaho-cdf/js/cdf-bootstrap-script-includes.js?v=7658446f8f02b4a87a8b6a486dfd4e4b"></script> <!-- cdf-bootstrap-ie8script-includes --><!--[if lte IE 8]> <script language="javascript" type="text/javascript" src="/pentaho/api/repos/pentaho-cdf/js-legacy/lib/html5shiv/html5shiv.js?v=ee68da404bd6cbdab3adb3bf9219c207"></script> <![endif]--> <!-- cdf-bootstrap-style-includes --> <link href="/pentaho/api/repos/pentaho-cdf/css/cdf-bootstrap-style-includes.css?v=03158ba83947ccd1bb690f59456f3133" rel="stylesheet" type="text/css" /> <!-- bootstrap.css.map --><!-- cdf-bootstrap-ie8scriptAfterLink-includes --><!--[if lte IE 8]> <script language="javascript" type="text/javascript" src="/pentaho/api/repos/pentaho-cdf/js-legacy/lib/respond/respond.js?v=c03b5dcc8955c34fa65e59e7e7daacf0"></script> <![endif]--> <!-- cdf-cdf-dashboard-script-includes --> <script language="javascript" type="text/javascript" src="/pentaho/api/repos/pentaho-cdf/js-legacy/lib/sparkline/jquery.sparkline.js?v=c7638b825bc7deb1cf58c990825d35b2"></script> <!-- cdf-cdf-dashboard-style-includes --> <script language="javascript" type="text/javascript" src="/pentaho/api/repos/pentaho-cdf-dd/js/CDF.js?v=cda4f5550529801f526967e28a33c184"></script> <link href="/pentaho/api/repos/pentaho-cdf-dd/css/CDF-CSS.css?v=68c579622444ce29beb75d01b69ff0e1" rel="stylesheet" type="text/css" /> <script language="javascript" type="text/javascript"> Dashboards.context = { "locale": "en_US", "params": {}, "path": "/public/Supplier Database/Dashboard.wcdf", "queryData": {}, "roles": ["Anonymous"], "serverLocalDate": 1744055798425, "serverUTCDate": 1744048598425, "sessionAttributes": {}, "sessionTimeout": 7200, "user": "anonymousUser" } Dashboards.initialStorage = {} </script> </head> <body> <script language="javascript"> // Init jQuery i18n plugin loadMessageBundles = function(lang) { jQuery.i18n.properties({ name:'messages', path:'/pentaho/api/repos/pentaho-cdf-dd/tmp/.cache/public/Supplier Database/', mode:'both', language:(lang == 'browser' ? jQuery.i18n.browserLang() : lang), callback: function() { } }); Dashboards.setI18nSupport('en-US', jQuery.i18n); } $(document).ready(function(){ // Initialize jquery.i18n plugin - load message files var userLocale = 'en-US'; var formProvider = cdo.format.language(userLocale); cdo.format.language(formProvider); moment.locale(userLocale); loadMessageBundles(userLocale); }); </script> <div class='container'> <script language="javascript" type="text/javascript" src="/pentaho/plugin/pentaho-cdf-dd/api/resources/public/Supplier%20Database/../resources/js/vendor.min.js?v=1744048598326"></script> <script language="javascript" type="text/javascript" src="/pentaho/plugin/pentaho-cdf-dd/api/resources/public/Supplier%20Database/../resources/js/fap-ctools-libraries.v3.min.js?v=1744048598326"></script> <script language="javascript" type="text/javascript"> $(function(){ fap.setColorParams(); fap.registerAddIns(); Dashboards.registerAddIn("Table", "colType", new AddIn($.extend(true, {}, fap.addIns.boolean, { name: 'isSupplier', label: 'Is Supplier' }))); }); </script> <link rel="stylesheet" type="text/css" href="/pentaho/plugin/pentaho-cdf-dd/api/resources/public/Supplier%20Database/../resources/css/cern_base.min.css?v=1744048598326" /> <style> <!-- #input_procurement_code { width: 100%; margin-bottom: 1ex; } #input_procurement_code input { width: 100%; box-shadow: 0px 1px 4px rgba(0,0,0,.15) inset; border: 1px solid #aaa; padding: .25em; box-sizing: border-box; } #tbl_sourcing_by_article th, #tbl_sourcing_by_supplier th { font-size: .8em; text-align: center; vertical-align: top; } .tooltip-cell, .link--hide-text, td.flag { text-align: center; } select { width: 100%; } .select2-container { width:100%; } --> </style> <div id='Header' class='row clearfix ' > <div class='col-xs-12 col-sm-9 col-md-6 col-print-12 last'><div id='Title_Column' > <div id="cern-logo"> <img src="/pentaho/plugin/pentaho-cdf-dd/api/resources/public/Supplier%20Database/../resources/img/logo.png?v=1744048598326"> </div> <h1> <small>[Public]</small> Supplier Database </h1> </div></div> </div> <div id='__Header_Break__' class='row clearfix ' > <div class='col-xs-12 last'><div id='4215b788-7d11-bd19-b68b-ab34ae50cadc' > <hr> </div></div> </div> <div id='Country_Title_Row' class='row clearfix ' > <div class='col-xs-12 col-sm-6 col-md-4 col-xs-push-12 col-sm-push-0 last'><div id='Country_Title_Column' > <h3 id='Country_Title' > Country Selection <span class='description hidden description hidden ' ><p>If you wish to search the list of firms registered by country(ies) at CERN, select one or more countries below.</p> </span> </h3> </div></div> </div> <div id='Country_Language_Row' class='row clearfix ' > <div class='col-xs-12 col-sm-5 col-md-6 col-lg-8 col-sm-push-7 col-md-push-6 col-lg-push-4'><div id='Language_Column' > <div id='Language_Wrapper' class='pull-right ' > <div id='Language_Title' class='filter-title ' > Language </div> <div id='multi_language' > </div> </div> </div></div> <div class='col-xs-12 col-sm-7 col-md-6 col-lg-4 col-sm-pull-5 col-md-pull-6 col-lg-pull-8 last'><div id='Country_General_Column' > <div id='Country_General_Wrapper' > <span id='Country_General_Title' class='filter-title ' > <span class='small small ' >Countries </span> </span> <div id='sel_countries_filter' > </div> <span class='help small help small ' ><em>You can select more than one country. Leave the box empty to select all countries.</em> </span> </div> </div></div> </div> <div id='ProcurementCode_Title_Row' class='row clearfix ' > <div class='col-xs-12 col-sm-6 col-md-4 last'><div id='ProcurementCode_Title_Column' > <h3 id='ProcurementCode_Title' > Procurement Code Selection <span class='description hidden description hidden ' ><p>If you wish to search the list of firms registered by procurement codes, either type keywords in the box below or select using the fields named Family, Group and Sub-Group below and chose the relevant codes displayed.</p> </span> </h3> </div></div> </div> <div id='SelectProcurementCode_Row' class='row clearfix ' > <div class='col-xs-12 last'><div id='d5323ab2-18aa-18db-1f9c-ee64306c420c' > <div id='input_procurement_code' class='input-group ' > </div> </div></div> </div> <div id='SelectFamily_Row' class='cdfdd-dog_tr row clearfix ' > <div class='col-xs-12 col-lg-4'><div id='SelFamily_Column' > <div id='SelFamily_Title' class='filter-title ' style='margin-top:1em'> Family </div> <div id='sel_family' > </div> </div></div> <div class='col-xs-12 col-lg-4'><div id='SelGroup_Column' > <div id='SelGroup_Title' class='filter-title ' style='margin-top:1em'> Group </div> <div id='sel_group' > </div> </div></div> <div class='col-xs-12 col-lg-4 last'><div id='SelSubGroup_Column' > <div id='SelSubGroup_Title' class='filter-title ' style='margin-top:1em'> Sub-Group </div> <div id='sel_sub_group' > </div> </div></div> </div> <div id='SelProcurementCode_Row' class='row clearfix ' > <div class='col-xs-12 last'><div id='SelProcurementCode_Column' > <div id='SelProcurementCode_Title' class='filter-title ' style='margin-top:2em'> Procurement Codes List </div> <div id='sel_procurement_code' > </div> </div></div> </div> <hr id='__HR_1__' > </hr> <div id='Suppliers_Title_Row' class='row clearfix ' > <div class='col-xs-6 col-md-9 col-lg-10'><div id='Suppliers_Title_Column' > <h3 id='Suppliers_Title' class='pptx-text ' > Suppliers Available </h3> <hr id='__HR_2__' > </hr> </div></div> <div class='col-xs-6 col-md-2 col-lg-2'><div id='Excel_Column' class='pull-right ' > <div id='Excel_Wrapper' class='well well-sm clearfix ' > <span id='Excel_Pull_Right_Wrapper' class='pull-right ' > <p id='Excel_Title' class='filter-title hidden ' > Export to: </p> <div id='txt_excel' > </div> </span> </div> </div></div> <div class='col-xs-6 col-md-3 last'><div id='HIDDEN_Filter_Group_By_Supplier_Column' class='hidden ' > <div id='Filter_Group_By_Supplier_Wrapper' class='well well-sm ' > <p id='Filter_Group_By_Supplier_Title' class='filter-title ' > Group by Supplier </p> <span id='rad_group_by_supplier' > </span> <span class='description hidden description hidden ' ><p>When Group by Supplier is 'Yes', the table will list the suppliers, one per row, and whenever more than one Procurement Code can be supplied by each supplier, they will be aggregated on the columns <em>'Service Provider'</em>, <em>'Reseller'</em> and <em>'Manufacturer'</em>, depending on the capabilities of the supplier.</p> <p>When the option is set to 'No', the table will show one row per supplier and procurement code.</p> </span> </div> </div></div> </div> <div id='Country_Suppliers_Row' class='row clearfix ' > <div class='col-xs-12 last'><div id='Country_Suppliers_Column' > <div id='TblSourcingBySupplier_Wrapper' class='table-responsive ' > <div id='tbl_sourcing_by_supplier' class='pptx-table ' > </div> </div> <div id='TblSourcingByArticle_Wrapper' class='table-responsive hidden ' > <div id='tbl_sourcing_by_article' class='pptx-table ' > </div> </div> </div></div> </div> <hr id='__HR_3__' > </hr> </div> <script language="javascript" type="text/javascript"> wcdfSettings = { "author": "", "description": "List of Suppliers by Procurement Code and Country", "rendererType": "bootstrap", "require": false, "style": "Clean", "title": "[public] Supplier Database", "widget": false, "widgetName": "", "widgetParameters": [] }; var render_SelFamily = { type: "SelectMulti", name: "render_SelFamily", priority: 3, parameter: "pFamily", htmlObject: "sel_family", listeners: ["pLang"], parameters: [["P_LANG","pLang"]], postFetch: function seeData(data) { var debug = new fap.Debug(this.name); debug("Received", data); } , valuesArray: [], useFirstValue: false, valueAsId: false, externalPlugin: "select2", executeAtStart: true, postExecution: function addInfo() { var comp = new fap.ComponentWrapper(this); comp.addInfoButton($('#ProcurementCode_Title_Column'), { button: { class:'pull-right' }, prepend: true }); } , preChange: function selFamilyPreChange(data) { // Get only the first two digits return data.length ? data.map(function(v){ return v.replace(/^(\d{2}).*$/g, "$1"); }) : ['%']; } , queryDefinition: { dataAccessId: "DISTINCT_Families", outputIndexId: "1", path: "/public/Supplier Database/Datasources.cda", pushEnabled: false } }; var render_SelGroup = { type: "SelectMulti", name: "render_SelGroup", priority: 4, parameter: "pGroup", htmlObject: "sel_group", listeners: ["pFamily","pLang"], parameters: [["P_FAMILY","pFamily"],["P_LANG","pLang"]], valuesArray: [], useFirstValue: false, valueAsId: false, externalPlugin: "select2", executeAtStart: true, preChange: function preChange(val) { return val.length ? val.map(function(v){ // Get only the first four digits return v.replace(/^(\d{4}).*$/g, "$1"); }) : ['%']; } , queryDefinition: { dataAccessId: "DISTINCT_Groups", outputIndexId: "1", path: "/public/Supplier Database/Datasources.cda", pushEnabled: false } }; var render_SelSubGroup = { type: "SelectMulti", name: "render_SelSubGroup", priority: 5, parameter: "pSubGroup", htmlObject: "sel_sub_group", listeners: ["pFamily","pGroup","pLang"], parameters: [["P_FAMILY","pFamily"],["P_GROUP","pGroup"],["P_LANG","pLang"]], valuesArray: [], useFirstValue: false, valueAsId: false, externalPlugin: "select2", executeAtStart: true, preChange: function preChange(val) { // Prefix Family return val.length ? val.map(function(v){ // Get only the first six digits return v.replace(/^(\d{6}).*$/g, "$1"); }) : ['%']; } , queryDefinition: { dataAccessId: "DISTINCT_SubGroups", outputIndexId: "1", path: "/public/Supplier Database/Datasources.cda", pushEnabled: false } }; var render_SelProcurementCode = { type: "SelectMulti", name: "render_SelProcurementCode", priority: 6, parameter: "pProcurementCode", htmlObject: "sel_procurement_code", listeners: ["pFamily","pGroup","pSubGroup","pSearchProcCode","pLang"], parameters: [["P_FAMILY","pFamily"],["P_GROUP","pGroup"],["P_SUB_GROUP","pSubGroup"],["P_LANG","pLang"],["P_SEARCH_PROC_CODE","pSearchProcCode"]], valuesArray: [], useFirstValue: false, valueAsId: false, size: 10, executeAtStart: true, postExecution: function addButtons() { var select = new fap.Select(this) .addToggleButtons({ disableFireChange: true, multiple: true }); } , preChange: function preChange(val) { if (!val.length) { return [''] } else { if (val.length > 50) { //alert('Please select a maximum of 50 procurement codes. A large number may cause errors.'); return ['%']; } else { return val.map(function(v){ // Get only the first eight digits return v.replace(/^(\d{8}).*$/g, "$1"); }); } } } , queryDefinition: { dataAccessId: "DISTINCT_ProcurementCodes", outputIndexId: "1", path: "/public/Supplier Database/Datasources.cda", pushEnabled: false } }; var render_SelCountriesFilter = { type: "SelectMulti", name: "render_SelCountriesFilter", priority: 2, parameter: "pCountriesFilter", htmlObject: "sel_countries_filter", listeners: ["pLang"], parameters: [["P_LANG","pLang"],["P_MEMBER_STATE_TYPE_CODE","AM;MS;PM"]], postFetch: function autoSize(data){ data.resultset = data.resultset.map(function(item){ var country = item[1].split('|'); return [ item[0], [country[0],fap.toTitleCase(country[1])].join('|'), item[2] ]; }); this.size = data.resultset.length; var debug = new fap.Debug(this.name); debug("Received", data); return data; } , valuesArray: [], useFirstValue: false, valueAsId: false, externalPlugin: "select2", executeAtStart: true, postExecution: function addInfo() { var comp = new fap.ComponentWrapper(this); comp.addInfoButton($('#Country_Title_Column'), { button: { class:'pull-right' }, prepend: true }); } , preChange: function setDefault(countries){ console.debug(this.parameter, countries); if (countries === null || !countries.length) { countries = ['%']; } return countries; } , queryDefinition: { dataAccessId: "DISTINCT_Countries", outputIndexId: "1", path: "/public/Supplier Database/Datasources.cda", pushEnabled: false } }; var render_HIDDEN_RadGroupBySupplier = { type: "radio", name: "render_HIDDEN_RadGroupBySupplier", priority: 10, parameter: "pGroupBySupplier", htmlObject: "rad_group_by_supplier", listeners: [], parameters: [], valuesArray: [["y","Yes"],["n","No"]], valueAsId: false, executeAtStart: false, preExecution: function setToggle(){ this.toggle = fap.initToggle([ '#tbl_sourcing_by_supplier', '#tbl_sourcing_by_article' ], 'pGroupBySupplier', [ 'y', 'n' ]); } , postExecution: function beautify() { var radio = new fap.Radio(this).setStyle('pills'); this.toggle(); radio.addInfoButton($('#Filter_Group_By_Supplier_Wrapper'), { button: {class: 'pull-right'}, prepend: true }); } , postChange: function doToggle(){ this.toggle(); } , queryDefinition: { } }; var render_TblSourcingBySupplier = { type: "Table", name: "render_TblSourcingBySupplier", priority: 10, htmlObject: "tbl_sourcing_by_supplier", listeners: ["pCountriesFilter","pProcurementCode"], parameters: [["P_PROCUREMENT_CODE","pProcurementCode"],["P_COUNTRY","pCountriesFilter"],["P_GROUP_BY_SUPPLIER","y"],["P_MEMBER_STATE_TYPE_CODE","MS;AM;PM"],["P_FAMILY","pFamily"],["P_GROUP","pGroup"],["P_SUB_GROUP","pSubGroup"]], executeAtStart: true, postFetch: function flattenSuppliers(data) { // Remove the right part of the 1st column, containing the supplier name // data.resultset = data.resultset.map(function (item) { // item[1] = item[1].split('|').shift(); // return item; // }); // Check the list to find duplicated suppliers and concatenate their procurement codes // (this is a limitation coming from the Oracle DB: https://aistools-prod.cern.ch/jira/browse/TPRMI-753) data.resultset = data.resultset.reduce(function (reduced, next, idx, resultset) { var lastItem = idx > 0 ? reduced[idx - 1] : null; // Remove the right part of the 1st column, containing the supplier name next[1] = next[1].split('|').shift(); // Check if next item is the same supplier as the last one if ( lastItem // Check first we have a last item, ie. this is not the first one && lastItem[0] === next[0] && lastItem[1] === next[1] && lastItem[2] === next[2] ) { // In such case, combine the columns related to procurement codes // (unless they are null, in which case they coerce to null) [4,5,6].forEach(function (col) { lastItem[col] = (lastItem[col] ? lastItem[col] + '|' : null) + (next[col] ? next[col] : null) || null; }); // Not adding the combined row to the reduced array } else { // Otherwise just accumulate it reduced.push(next); } return reduced; }, []); } , preExecution: function setDashboardLink() { this.setAddInOptions("colType", "link", { icon:'globe', hideText: true }); this.setAddInOptions("colType", "listTooltip", { icon: 'check' }); this.setAddInOptions("colType", "isSupplier", { background: true, showFalse: true }); } , postExecution: function beautify(){ var table = new fap.Table(this).beautify().removeBorders('vertical'), $emptyCell = table.$table.find('.dataTables_empty'); if (!this.rawData.resultset.length) { $emptyCell.text(''); fap.ui.alert( pLang === 'en' ? "There are no registered suppliers for the selected Procurement Code(s)" : "Il y a aucun fournisseur enregistr茅 pour le(s) Code(s) d'Achat selectionn茅(s)", { where: $emptyCell } ); } table.addInfoButton($('th.isSupplier'), { prepend: true, button: {class: 'pull-right'}, text: "Firms that have received a CERN order or a contract in the past" }); } , clearsBeforePreExecution: true, extraOptions: [], expandParameters: [], expandOnClick: false, chartDefinition: { dataAccessId: "Sourcing_BY_Countries_AND_ProcurementCodes", outputIndexId: "1", path: "/public/Supplier Database/Datasources.cda", pushEnabled: false, colHeaders: [], colTypes: ["flag","string","hidden","listTooltip","listTooltip","listTooltip","link","isSupplier"], colFormats: [], colWidths: ["10%","26%","0%","14%","14%","14%","10%","10%"], colSortable: [], colSearchable: ["1","2"], paginate: true, paginateServerside: false, paginationType: "simple_numbers", filter: true, info: true, sort: true, sortBy: [], lengthChange: true, oLanguage: "{\n sSearch: 'Search by Supplier:'\n} " }, lifecycle: { silent: false } }; var render_TblSourcingByArticle = { type: "Table", name: "render_TblSourcingByArticle", priority: 10, htmlObject: "tbl_sourcing_by_article", listeners: ["pCountriesFilter","pProcurementCode"], parameters: [["P_PROCUREMENT_CODE","pProcurementCode"],["P_COUNTRY","pCountriesFilter"],["P_GROUP_BY_SUPPLIER","n"],["P_MEMBER_STATE_TYPE_CODE","MS;AM;PM"],["P_FAMILY","pFamily"],["P_GROUP","pGroup"],["P_SUB_GROUP","pSubGroup"]], executeAtStart: true, postFetch: function discardSupplierName(data) { // Remove the right part of the 1st column, containing the supplier name data.resultset = data.resultset.map(function (item) { item[1] = item[1].split('|').shift(); return item; }); } , preExecution: function setDashboardLink() { this.setAddInOptions("colType", "link", { icon:'globe', hideText: true }); this.setAddInOptions("colType", "isSupplier", { background: true, showFalse: true }); } , postExecution: function beautify(){ var table = new fap.Table(this).beautify().removeBorders('vertical'), $emptyCell = table.$table.find('.dataTables_empty'); if (!this.rawData.resultset.length) { $emptyCell.text(''); fap.ui.alert( pLang === 'en' ? "There are no registered suppliers for the selected Procurement Code(s)" : "Il y a aucun fournisseur enregistr茅 pour le(s) Code(s) d'Achat selectionn茅(s)", { where: $emptyCell } ); } } , clearsBeforePreExecution: true, extraOptions: [], expandParameters: [], expandOnClick: false, chartDefinition: { dataAccessId: "Sourcing_BY_Countries_AND_ProcurementCodes", outputIndexId: "1", path: "/public/Supplier Database/Datasources.cda", pushEnabled: false, colHeaders: [], colTypes: ["flag","string","string","boolean","boolean","boolean","link","isSupplier"], colFormats: [], colWidths: ["8%","26%","10%","10%","10%","10%","16%","10%"], colSortable: [], colSearchable: ["1"], paginate: true, paginateServerside: false, paginationType: "simple_numbers", filter: true, info: true, sort: true, sortBy: [], lengthChange: true, oLanguage: "{sSearch: 'Search by Supplier:'} " }, lifecycle: { silent: false } }; Dashboards.addParameter("pLang", function() { return 'en' }()); Dashboards.addParameter("pCountriesFilter", function() { return ['%'] }()); Dashboards.addParameter("pFamily", function() { return ['%'] }()); Dashboards.addParameter("pGroup", function() { return ['%'] }()); Dashboards.addParameter("pSubGroup", function() { return ['%'] }()); Dashboards.addParameter("pProcurementCode", function() { return ['%'] }()); Dashboards.addParameter("pSearchProcCode", ""); Dashboards.setParameterViewMode("pSearchProcCode", "unused"); Dashboards.addParameter("pGroupBySupplier", "y"); Dashboards.setParameterViewMode("pGroupBySupplier", "unused"); var render_InputSearchProcurementCode = { type: "textInput", name: "render_InputSearchProcurementCode", priority: 5, parameter: "pSearchProcCode", listeners: ["pLang"], htmlObject: "input_procurement_code", executeAtStart: true, postChange: function notifySearchProcurementCode(value) { var debug = new fap.Debug(this.name); debug('Search happened', value); } , postExecution: function addPlaceHolder() { var msg = this.dashboard.getParam('pLang') === 'en' ? 'Type a procurement code or keyword and press <ENTER> to search in the list below.' : "Saisir un code d'achat ou un mot cl茅 et presser sur <ENTR脡E> pour lancer la recherche."; $('#' + this.htmlObject).find('input') .attr('placeholder', msg); } }; var render_MultiLanguage = { type: "multiButton", name: "render_MultiLanguage", priority: 1, parameter: "pLang", htmlObject: "multi_language", listeners: [], parameters: [], valuesArray: [["en","EN"],["fr","FR"]], valueAsId: false, isMultiple: false, executeAtStart: true, postExecution: function beautify(){ var multi = new fap.MultiButton(this).beautify(); } , queryDefinition: { } }; var render_ExpSuppliersCsv = { type: "exportButton", name: "render_ExpSuppliersCsv", priority: 5, executeAtStart: true, label: "Excel", htmlObject: "exp_suppliers_csv", componentName: "TblSourcingByArticle", parameters: [], outputType: "xls", exportPage: true, postExecution: function onPostExecution() { console.debug(this, 'postExec'); var $button = $(document.getElementById(this.htmlObject)).find('.exportButton'); $button .toggleClass('exportButton', false).addClass('btn btn-success') .prepend([$('<i/>', {class: 'fas fa-file-excel'}), '&ensp;']); // Disable button when no proc. codes are selected, or they aren't initialised var isDisabled = ( pProcurementCode && ( !pProcurementCode.length || pProcurementCode[0] === '' ) ); $button.toggleClass('disabled', isDisabled); } , listeners: ["pProcurementCode"] }; var render_TxtExcel = { type: "textComponent", name: "render_TxtExcel", priority: 10, expression: function draw() { var selector = '#' + this.htmlObject; if (!pProcurementCode || !pProcurementCode.length) { return '<span class="btn btn-sm btn-success" disabled>Excel</span>'; } var report = new fap.Report( undefined, "Supplier Database.prpt" ).mapParameters({ pCountriesFilter: 'P_COUNTRY', pLang: 'P_LANG', pFamily: 'P_FAMILY', pGroup: 'P_GROUP', pSubGroup: 'P_SUB_GROUP', pProcurementCode: 'P_PROCUREMENT_CODE' }); $(selector).html(''); report.addDownloadButton(selector, {class: 'btn-xs'}); } , htmlObject: "txt_excel", listeners: ["pLang","pCountriesFilter","pFamily","pGroup","pSubGroup","pProcurementCode"], executeAtStart: false }; Dashboards.addComponents([render_SelFamily, render_SelGroup, render_SelSubGroup, render_SelProcurementCode, render_SelCountriesFilter, render_HIDDEN_RadGroupBySupplier, render_TblSourcingBySupplier, render_TblSourcingByArticle, render_InputSearchProcurementCode, render_MultiLanguage, render_ExpSuppliersCsv, render_TxtExcel]); Dashboards.init(); </script> <script type="text/javascript"> $( function(){ //$(".round").corner(); $(".cdfdd-round").corner(); $(".cdfdd-bevel").corner("bevel"); $(".cdfdd-notch").corner("notch"); $(".cdfdd-bite").corner("bite"); $(".cdfdd-bevel_top").corner("bevel top"); $(".cdfdd-dog_tr").corner("dog tr"); } ) ; </script> </body> </html>