Commit ed34d17e authored by Faisal Hamdi's avatar Faisal Hamdi

Merge branch 'faisal' into 'master'

update!

See merge request !1516
parents 41421ad8 84b3944d
...@@ -300,7 +300,7 @@ class ReportProgress extends Component { ...@@ -300,7 +300,7 @@ class ReportProgress extends Component {
// month={this.state.month.month_value} // month={this.state.month.month_value}
category={this.state.category ? this.state.category.value : 1} category={this.state.category ? this.state.category.value : 1}
reportType={this.state.reportType ? this.state.reportType.value : 0} reportType={this.state.reportType ? this.state.reportType.value : 0}
dataTable={this.state.category ? dataTableMBStatus : dataTableMB} dataTable={this.state.category.value == 'report-status' ? dataTableMBStatus : dataTableMB}
// dataTable={this.state.dataTable} // dataTable={this.state.dataTable}
periode={this.state.periode ? this.state.periode.periode : null} periode={this.state.periode ? this.state.periode.periode : null}
quarter={this.state.quarter.name} quarter={this.state.quarter.name}
......
...@@ -117,30 +117,8 @@ export default class TableProgressReport extends Component { ...@@ -117,30 +117,8 @@ export default class TableProgressReport extends Component {
</TableCell> </TableCell>
), ),
setCellProps: () => ({ style2 }), setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (val, tableMeta) => {
return ( return <div style={{ textAlign: "center" }}>{val}</div>;
<div style={{ textAlign: "center" }}>
{tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ? null : (
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "black", fontSize: 12, textAlign: "right", borderColor: "transparent", margin: 0, width: 96, backgroundColor: "transparent" }}
type="text"
placeholder=""
suffix={"%"}
value={Number(value).toFixed(1)}
disabled={true}
// disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
decimalScale={1}
/>
}
/>
)}
</div>
);
}, },
}, },
}, },
...@@ -155,7 +133,7 @@ export default class TableProgressReport extends Component { ...@@ -155,7 +133,7 @@ export default class TableProgressReport extends Component {
setCellProps: () => ({ style2 }), setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ width: 90, textAlign: "center" }}> <div style={{ textAlign: "center" }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 4 ? null : ( {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 4 ? null : (
<div> <div>
<span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : value}</span> <span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : value}</span>
......
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