- fixed bug in JS;

This commit is contained in:
Vitalii Kiiko
2025-08-29 09:16:32 +02:00
parent 252bd97c55
commit b2020d2072
2 changed files with 4 additions and 4 deletions

View File

@@ -3,13 +3,15 @@ import getNumberFormatted from '../../../../../../../helpers/getNumberFormatted'
const LastRowCell = ({columnId, lastRowCfg, columnMeta = {}, tableValue = []}) => { const LastRowCell = ({columnId, lastRowCfg, columnMeta = {}, tableValue = []}) => {
const cellData = head(lastRowCfg.filter(o => !isNil(o[columnId]))); const cellData = head(lastRowCfg.filter(o => !isNil(o[columnId])));
console.log('LastRowCell Rendered', {columnId, lastRowCfg, columnMeta, tableValue});
console.log('cellData', cellData)
let cellValue = cellData[columnId]; let cellValue = cellData[columnId];
if (columnMeta.enableFormula) { if (columnMeta.enableFormula) {
cellValue = pathOr(0, ['total'], tableValue); cellValue = pathOr(0, ['total'], tableValue);
} }
return <td>{is(Number, cellValue) ? getNumberFormatted(cellValue) : cellValue}</td>; return <td>{cellValue && is(Number, cellValue) ? getNumberFormatted(cellValue) : cellValue}</td>;
}; };
export default LastRowCell; export default LastRowCell;

View File

@@ -243,8 +243,6 @@ const DomandeTablePreInstructorAsync = ({ userId = null, statuses = [] }) => {
} }
}, [lazyState]); }, [lazyState]);
console.log(items)
return ( return (
<div className="appPageSection__table"> <div className="appPageSection__table">
<DataTable <DataTable