remover parametros que no se utilizan, quitar texto en nulo, aplicar formato a totales
This commit is contained in:
parent
12aa058e95
commit
49b567ca2d
@ -263,7 +263,7 @@ function makeRenderer() {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
var getFormatedValue = function getFormatedValue(aggregator, rowKey, colKey) {
|
var getFormatedValue = function getFormatedValue(aggregator) {
|
||||||
var valToFormat = aggregator.value();
|
var valToFormat = aggregator.value();
|
||||||
var resultValue = aggregator.format(valToFormat);
|
var resultValue = aggregator.format(valToFormat);
|
||||||
var keyColumnaCalculo = isNotNullish(_this2.props.vals) && _this2.props.vals.length ? _this2.props.vals[0] : null;
|
var keyColumnaCalculo = isNotNullish(_this2.props.vals) && _this2.props.vals.length ? _this2.props.vals[0] : null;
|
||||||
@ -271,9 +271,9 @@ function makeRenderer() {
|
|||||||
var _definition = _this2.props.headersDefinitions[keyColumnaCalculo];
|
var _definition = _this2.props.headersDefinitions[keyColumnaCalculo];
|
||||||
if (isNotNullish(_definition) && isNotNullish(_definition.value)) {
|
if (isNotNullish(_definition) && isNotNullish(_definition.value)) {
|
||||||
if (_definition.value.startsWith('count_') || _definition.value.startsWith('countd_')) {
|
if (_definition.value.startsWith('count_') || _definition.value.startsWith('countd_')) {
|
||||||
resultValue = isNotNullish(_this2.props.functions) ? _this2.props.functions.formatedValue(valToFormat, '0,0', 'number', true, '') : resultValue;
|
resultValue = isNotNullish(_this2.props.functions) ? _this2.props.functions.formatedValue(valToFormat, '0,0', 'number', false) : resultValue;
|
||||||
} else if (isNotNullish(_definition.format) && _definition.format !== '') {
|
} else if (isNotNullish(_definition.format) && _definition.format !== '') {
|
||||||
resultValue = isNotNullish(_this2.props.chartFunctions) ? _this2.props.chartFunctions.formatedValue(valToFormat, getFinalFormat(_definition), _definition.type, true, '', getLocaleConfig(_definition)) : resultValue;
|
resultValue = isNotNullish(_this2.props.chartFunctions) ? _this2.props.chartFunctions.formatedValue(valToFormat, getFinalFormat(_definition), _definition.type, false, null, getLocaleConfig(_definition)) : resultValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -376,8 +376,7 @@ function makeRenderer() {
|
|||||||
onClick: getClickHandler && getClickHandler(aggregator.value(), rowKey, colKey),
|
onClick: getClickHandler && getClickHandler(aggregator.value(), rowKey, colKey),
|
||||||
style: valueCellColors(rowKey, colKey, aggregator.value())
|
style: valueCellColors(rowKey, colKey, aggregator.value())
|
||||||
},
|
},
|
||||||
!(j < 10) && aggregator.format(aggregator.value()),
|
getFormatedValue(aggregator)
|
||||||
j < 10 && getFormatedValue(aggregator, rowKey, colKey)
|
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
_react2.default.createElement(
|
_react2.default.createElement(
|
||||||
@ -387,7 +386,7 @@ function makeRenderer() {
|
|||||||
onClick: getClickHandler && getClickHandler(totalAggregator.value(), rowKey, [null]),
|
onClick: getClickHandler && getClickHandler(totalAggregator.value(), rowKey, [null]),
|
||||||
style: colTotalColors(totalAggregator.value())
|
style: colTotalColors(totalAggregator.value())
|
||||||
},
|
},
|
||||||
totalAggregator.format(totalAggregator.value())
|
getFormatedValue(totalAggregator)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
@ -413,7 +412,7 @@ function makeRenderer() {
|
|||||||
onClick: getClickHandler && getClickHandler(totalAggregator.value(), [null], colKey),
|
onClick: getClickHandler && getClickHandler(totalAggregator.value(), [null], colKey),
|
||||||
style: rowTotalColors(totalAggregator.value())
|
style: rowTotalColors(totalAggregator.value())
|
||||||
},
|
},
|
||||||
totalAggregator.format(totalAggregator.value())
|
getFormatedValue(totalAggregator)
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
_react2.default.createElement(
|
_react2.default.createElement(
|
||||||
@ -422,7 +421,7 @@ function makeRenderer() {
|
|||||||
onClick: getClickHandler && getClickHandler(grandTotalAggregator.value(), [null], [null]),
|
onClick: getClickHandler && getClickHandler(grandTotalAggregator.value(), [null], [null]),
|
||||||
className: 'pvtGrandTotal'
|
className: 'pvtGrandTotal'
|
||||||
},
|
},
|
||||||
grandTotalAggregator.format(grandTotalAggregator.value())
|
getFormatedValue(grandTotalAggregator)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "v-react-pivottable",
|
"name": "v-react-pivottable",
|
||||||
"version": "0.11.27",
|
"version": "0.11.28",
|
||||||
"description": "A React-based pivot table",
|
"description": "A React-based pivot table",
|
||||||
"main": "PivotTableUI.js",
|
"main": "PivotTableUI.js",
|
||||||
"files": [
|
"files": [
|
||||||
|
Loading…
Reference in New Issue
Block a user