Commit e1084a51 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'faisal' into 'master'

update FAM

See merge request !311
parents afa6f4f4 8341df26
......@@ -670,7 +670,7 @@ export default class FixedAssetsMovement extends Component {
])
}
})
// console.log(dataTable);
console.log(dataTable);
this.setState({ dataTable, loading: false })
}
} else {
......@@ -853,6 +853,8 @@ export default class FixedAssetsMovement extends Component {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ width: 300 }}>
{console.log(val)}
{console.log(tableMeta)}
{tableMeta.rowData[4] == 0 ?
<span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
:
......@@ -865,7 +867,7 @@ export default class FixedAssetsMovement extends Component {
}
}
}, {
name: "31 Dec 2020 Actual",
name: "31 Dec 2020 Actual",
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}>
......@@ -897,7 +899,7 @@ export default class FixedAssetsMovement extends Component {
}
/>
</div> :
tableMeta.rowData[0] === 2 ?
tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
thousandSeparator={true}
......@@ -944,7 +946,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)}
/>
:
<span>validasi</span>
<span>-</span>
}
</div>
)
......@@ -983,7 +985,7 @@ export default class FixedAssetsMovement extends Component {
}
/>
</div> :
tableMeta.rowData[0] === 2 ?
tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
thousandSeparator={true}
......@@ -1005,7 +1007,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 5 ?
......@@ -1015,7 +1017,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 1 ?
......@@ -1030,7 +1032,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)}
/>
:
<span>validasi</span>
<span>-</span>
}
</div>
)
......@@ -1069,7 +1071,7 @@ export default class FixedAssetsMovement extends Component {
}
/>
</div> :
tableMeta.rowData[0] === 2 ?
tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
thousandSeparator={true}
......@@ -1091,7 +1093,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 5 ?
......@@ -1101,7 +1103,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 1 ?
......@@ -1116,7 +1118,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)}
/>
:
<span>validasi</span>
<span>-</span>
}
</div>
)
......@@ -1155,7 +1157,7 @@ export default class FixedAssetsMovement extends Component {
}
/>
</div> :
tableMeta.rowData[0] === 2 ?
tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
thousandSeparator={true}
......@@ -1177,7 +1179,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 5 ?
......@@ -1187,7 +1189,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 1 ?
......@@ -1202,7 +1204,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)}
/>
:
<span>validasi</span>
<span>-</span>
}
</div>
)
......@@ -1241,7 +1243,7 @@ export default class FixedAssetsMovement extends Component {
}
/>
</div> :
tableMeta.rowData[0] === 2 ?
tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
thousandSeparator={true}
......@@ -1263,7 +1265,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 5 ?
......@@ -1273,7 +1275,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 1 ?
......@@ -1288,7 +1290,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)}
/>
:
<span>validasi</span>
<span>-</span>
}
</div>
)
......@@ -1327,7 +1329,7 @@ export default class FixedAssetsMovement extends Component {
}
/>
</div> :
tableMeta.rowData[0] === 2 ?
tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
thousandSeparator={true}
......@@ -1349,7 +1351,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 5 ?
......@@ -1359,7 +1361,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 1 ?
......@@ -1374,7 +1376,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)}
/>
:
<span>validasi</span>
<span>-</span>
}
</div>
)
......@@ -1413,7 +1415,7 @@ export default class FixedAssetsMovement extends Component {
}
/>
</div> :
tableMeta.rowData[0] === 2 ?
tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
thousandSeparator={true}
......@@ -1435,7 +1437,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 5 ?
......@@ -1445,7 +1447,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 1 ?
......@@ -1460,7 +1462,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)}
/>
:
<span>validasi</span>
<span>-</span>
}
</div>
)
......@@ -1499,7 +1501,7 @@ export default class FixedAssetsMovement extends Component {
}
/>
</div> :
tableMeta.rowData[0] === 2 ?
tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
thousandSeparator={true}
......@@ -1521,7 +1523,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 5 ?
......@@ -1531,7 +1533,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 1 ?
......@@ -1546,7 +1548,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)}
/>
:
<span>validasi</span>
<span>-</span>
}
</div>
)
......@@ -1585,7 +1587,7 @@ export default class FixedAssetsMovement extends Component {
}
/>
</div> :
tableMeta.rowData[0] === 2 ?
tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
thousandSeparator={true}
......@@ -1607,7 +1609,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 5 ?
......@@ -1617,7 +1619,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 1 ?
......@@ -1632,7 +1634,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)}
/>
:
<span>validasi</span>
<span>-</span>
}
</div>
)
......@@ -1671,7 +1673,7 @@ export default class FixedAssetsMovement extends Component {
}
/>
</div> :
tableMeta.rowData[0] === 2 ?
tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
thousandSeparator={true}
......@@ -1693,7 +1695,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 5 ?
......@@ -1703,7 +1705,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 1 ?
......@@ -1718,7 +1720,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)}
/>
:
<span>validasi</span>
<span>-</span>
}
</div>
)
......@@ -1757,7 +1759,7 @@ export default class FixedAssetsMovement extends Component {
}
/>
</div> :
tableMeta.rowData[0] === 2 ?
tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
thousandSeparator={true}
......@@ -1779,7 +1781,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 5 ?
......@@ -1789,7 +1791,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 1 ?
......@@ -1804,7 +1806,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)}
/>
:
<span>validasi</span>
<span>-</span>
}
</div>
)
......@@ -1843,7 +1845,7 @@ export default class FixedAssetsMovement extends Component {
}
/>
</div> :
tableMeta.rowData[0] === 2 ?
tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
thousandSeparator={true}
......@@ -1865,7 +1867,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 5 ?
......@@ -1875,7 +1877,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 1 ?
......@@ -1890,7 +1892,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)}
/>
:
<span>validasi</span>
<span>-</span>
}
</div>
)
......@@ -1929,7 +1931,7 @@ export default class FixedAssetsMovement extends Component {
}
/>
</div> :
tableMeta.rowData[0] === 2 ?
tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
thousandSeparator={true}
......@@ -1951,7 +1953,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 5 ?
......@@ -1961,7 +1963,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 1 ?
......@@ -1976,7 +1978,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)}
/>
:
<span>validasi</span>
<span>-</span>
}
</div>
)
......@@ -2015,7 +2017,7 @@ export default class FixedAssetsMovement extends Component {
}
/>
</div> :
tableMeta.rowData[0] === 2 ?
tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
thousandSeparator={true}
......@@ -2037,7 +2039,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 5 ?
......@@ -2047,7 +2049,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 1 ?
......@@ -2062,7 +2064,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)}
/>
:
<span>validasi</span>
<span>-</span>
}
</div>
)
......@@ -2072,8 +2074,8 @@ export default class FixedAssetsMovement extends Component {
name: "31 Dec 2022 Total",
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#354960', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}>
<Typography style={{ color: 'black', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
setCellProps: () => ({ style2 }),
......@@ -2101,7 +2103,7 @@ export default class FixedAssetsMovement extends Component {
}
/>
</div> :
tableMeta.rowData[0] === 2 ?
tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
thousandSeparator={true}
......@@ -2123,7 +2125,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 5 ?
......@@ -2133,7 +2135,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 1 ?
......@@ -2148,7 +2150,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)}
/>
:
<span>validasi</span>
<span>-</span>
}
</div>
)
......@@ -2158,8 +2160,8 @@ export default class FixedAssetsMovement extends Component {
name: "31 Dec 2023 Total",
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#354960', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}>
<Typography style={{ color: 'black', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
setCellProps: () => ({ style2 }),
......@@ -2187,7 +2189,7 @@ export default class FixedAssetsMovement extends Component {
}
/>
</div> :
tableMeta.rowData[0] === 2 ?
tableMeta.rowData[0] === 5 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
thousandSeparator={true}
......@@ -2209,7 +2211,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 5 ?
......@@ -2219,7 +2221,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={handleValue(tableMeta)}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 1 ?
......@@ -2234,7 +2236,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value)}
/>
:
<span>validasi</span>
<span>-</span>
}
</div>
)
......@@ -2319,7 +2321,7 @@ export default class FixedAssetsMovement extends Component {
</div>
</div>
<div style={{ marginTop: 20, width: this.props.width - 200, height: this.props.height-200 }}>
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150), height: this.props.height - 200 }}>
<MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
data={dataTable2}
......
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