dtable-statistic 5.0.38-alpha.2 → 5.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -22,7 +22,6 @@ const isSummaryDateColumn = summaryColumn => {
|
|
|
22
22
|
return type !== _dtableUtils.CellType.LINK && (0, _dtableUtils.isDateColumn)(summaryColumn);
|
|
23
23
|
};
|
|
24
24
|
const getValidValueForColumn = (column, value) => {
|
|
25
|
-
value = Array.isArray(value) && value.length !== 0 ? value[0][1] : value;
|
|
26
25
|
if (!column) return '';
|
|
27
26
|
const {
|
|
28
27
|
type,
|
|
@@ -607,7 +606,6 @@ const updateTwoDimensionToTable = _ref6 => {
|
|
|
607
606
|
updateTable,
|
|
608
607
|
statisticalResult
|
|
609
608
|
} = _ref6;
|
|
610
|
-
console.log('updateTwoDimensionToTable');
|
|
611
609
|
const {
|
|
612
610
|
pivotResult,
|
|
613
611
|
groupbyColumn
|
|
@@ -662,20 +660,16 @@ const updateTwoDimensionToTable = _ref6 => {
|
|
|
662
660
|
const totalColumn = columnMap['total'];
|
|
663
661
|
if (row) {
|
|
664
662
|
// update old row
|
|
665
|
-
console.log(11);
|
|
666
663
|
const rowId = row._id;
|
|
667
664
|
let updatedRow = {};
|
|
668
665
|
let oldRow = {}; // op used
|
|
669
666
|
const validTotalCellValue = getValidValueForColumn(totalColumn, total);
|
|
670
|
-
console.log('22validTotalCellValue', validTotalCellValue);
|
|
671
667
|
if (totalColumn && (0, _cellValue.isCellValueChanged)(row[totalColumn.key], validTotalCellValue, totalColumn.type)) {
|
|
672
|
-
console.log('33', validTotalCellValue);
|
|
673
668
|
updatedRow[totalColumn.key] = validTotalCellValue;
|
|
674
669
|
oldRow[totalColumn.key] = row[totalColumn.key];
|
|
675
670
|
}
|
|
676
671
|
const keys = Object.keys(cells);
|
|
677
672
|
if (keys.length === 0) {
|
|
678
|
-
console.log('44', updateColumns);
|
|
679
673
|
updateColumns.forEach(column => {
|
|
680
674
|
const {
|
|
681
675
|
key,
|
|
@@ -688,12 +682,10 @@ const updateTwoDimensionToTable = _ref6 => {
|
|
|
688
682
|
}
|
|
689
683
|
});
|
|
690
684
|
} else {
|
|
691
|
-
console.log('55', cells);
|
|
692
685
|
keys.forEach(key => {
|
|
693
686
|
const columnName = isEmptyName(key) ? _reactIntlUniversal.default.get(_constants.EMPTY_NAME) : key;
|
|
694
687
|
const column = columnMap[columnName];
|
|
695
688
|
let validCellValue = getValidValueForColumn(column, cells[key].total);
|
|
696
|
-
console.log('66', validCellValue);
|
|
697
689
|
if (column && (0, _cellValue.isCellValueChanged)(row[column.key], validCellValue, column.type)) {
|
|
698
690
|
updatedRow[column.key] = validCellValue;
|
|
699
691
|
oldRow[column.key] = row[column.key];
|
|
@@ -736,7 +728,6 @@ const updateTwoDimensionWithSummaryColumnsToTable = _ref7 => {
|
|
|
736
728
|
updateTable,
|
|
737
729
|
statisticalResult
|
|
738
730
|
} = _ref7;
|
|
739
|
-
console.log('updateTwoDimensionWithSummaryColumnsToTable');
|
|
740
731
|
const {
|
|
741
732
|
groupbyColumn
|
|
742
733
|
} = statisticalResult;
|