dtable-statistic 5.0.38-alpha.0 → 5.0.38-alpha.2
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,6 +22,7 @@ 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;
|
|
25
26
|
if (!column) return '';
|
|
26
27
|
const {
|
|
27
28
|
type,
|
|
@@ -666,12 +667,15 @@ const updateTwoDimensionToTable = _ref6 => {
|
|
|
666
667
|
let updatedRow = {};
|
|
667
668
|
let oldRow = {}; // op used
|
|
668
669
|
const validTotalCellValue = getValidValueForColumn(totalColumn, total);
|
|
670
|
+
console.log('22validTotalCellValue', validTotalCellValue);
|
|
669
671
|
if (totalColumn && (0, _cellValue.isCellValueChanged)(row[totalColumn.key], validTotalCellValue, totalColumn.type)) {
|
|
672
|
+
console.log('33', validTotalCellValue);
|
|
670
673
|
updatedRow[totalColumn.key] = validTotalCellValue;
|
|
671
674
|
oldRow[totalColumn.key] = row[totalColumn.key];
|
|
672
675
|
}
|
|
673
676
|
const keys = Object.keys(cells);
|
|
674
677
|
if (keys.length === 0) {
|
|
678
|
+
console.log('44', updateColumns);
|
|
675
679
|
updateColumns.forEach(column => {
|
|
676
680
|
const {
|
|
677
681
|
key,
|
|
@@ -684,10 +688,12 @@ const updateTwoDimensionToTable = _ref6 => {
|
|
|
684
688
|
}
|
|
685
689
|
});
|
|
686
690
|
} else {
|
|
691
|
+
console.log('55', cells);
|
|
687
692
|
keys.forEach(key => {
|
|
688
693
|
const columnName = isEmptyName(key) ? _reactIntlUniversal.default.get(_constants.EMPTY_NAME) : key;
|
|
689
694
|
const column = columnMap[columnName];
|
|
690
695
|
let validCellValue = getValidValueForColumn(column, cells[key].total);
|
|
696
|
+
console.log('66', validCellValue);
|
|
691
697
|
if (column && (0, _cellValue.isCellValueChanged)(row[column.key], validCellValue, column.type)) {
|
|
692
698
|
updatedRow[column.key] = validCellValue;
|
|
693
699
|
oldRow[column.key] = row[column.key];
|
|
@@ -701,7 +707,6 @@ const updateTwoDimensionToTable = _ref6 => {
|
|
|
701
707
|
}
|
|
702
708
|
} else {
|
|
703
709
|
// insert new row
|
|
704
|
-
console.log(22);
|
|
705
710
|
let newRow = {};
|
|
706
711
|
newRow[nameColumnKey] = name;
|
|
707
712
|
if (totalColumn) {
|