Commit 817a4bad authored by Hardiansyah's avatar Hardiansyah

Fix logic

parent 3138a75b
......@@ -22,19 +22,28 @@ const style2 = {
};
export default class TableSummaryTriputra extends Component {
getInputColor = ({ val, column = null }) => {
const COLUMN_RULE = {
MTD: 37,
YTD: 45,
CPSM: 49
};
const isEditable =
![0, 1].includes(val[2]) &&
!val[COLUMN_RULE[column]];
getInputColor = ({ val, column }) => {
// const COLUMN_INDEX = {
// MTD: 37,
// YTD: 45,
// CPSM: 49,
// };
// if (val[2] === 0 || val[2] === 1) {
// return Constant.COLORS_TEXT_COLUMNS.disabled;
// }
return isEditable ? Constant.COLORS_TEXT_COLUMNS.active : Constant.COLORS_TEXT_COLUMNS.disabled;
// const idx = COLUMN_INDEX[column];
// if (idx === undefined) {
// return Constant.COLORS_TEXT_COLUMNS.disabled;
// }
// return val[idx]
// ? Constant.COLORS_TEXT_COLUMNS.disabled
// : Constant.COLORS_TEXT_COLUMNS.active;
return Constant.COLORS_TEXT_COLUMNS.disabled
};
formattingNumber = (v, decimal = 1) => {
if (v === null || v === undefined || v === '') return '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment