imports/vx/both/code/util.js
/**
     * Return the parameter definitions of a given report type.
     *
     * @param {string} reportType Report type.
     * @return {object} Parameter definitions object or undefined if no parameters.
     */
Return the parameter definitions of a given report type.
@param {string} reportType Report type.
@return {object} Parameter definitions object or undefined if no parameters.
Return the parameter definitions of a given report type . @param { string } reportType Report type . @return { object } Parameter definitions object or undefined if no parameters .
reportParameterDefinitions(reportType) {
        let reportTypeObject = Meteor.i18nMessages.codes.reportType[reportType]
        if (!reportTypeObject) {
            OLog.error("util.js reportParameterDefinitions could not find reportType=" + reportType)
            return
        }
        if (!reportTypeObject.parameterDefinitions) {
            return
        }
        return _.map(reportTypeObject.parameterDefinitions, (reportParameterDefinition, fieldName) => {
            reportParameterDefinition.fieldName = fieldName
            reportParameterDefinition.fieldNameLocalized = Util.i18n("codes.reportType." + reportType + ".parameterDefinitions." + fieldName)
            return reportParameterDefinition
        })
    }
reportParameterDefinitions ( reportType ) { let reportTypeObject = Meteor . i18nMessages . codes . reportType [ reportType ] if ( ! reportTypeObject ) { OLog . error ( "util.js reportParameterDefinitions could not find reportType=" + reportType ) return } if ( ! reportTypeObject . parameterDefinitions ) { return } return _ . map ( reportTypeObject . parameterDefinitions , ( reportParameterDefinition , fieldName ) => { reportParameterDefinition . fieldName = fieldName reportParameterDefinition . fieldNameLocalized = Util . i18n ( "codes.reportType." + reportType + ".parameterDefinitions." + fieldName ) return reportParameterDefinition } ) }
Return the parameter definitions of a given report type.
Return the parameter definitions of a given report type .