Commit d109e747 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'faisal' into 'master'

update FR

See merge request !644
parents cf98c4e1 8c299cb3
...@@ -504,6 +504,7 @@ export default class SubHolding extends Component { ...@@ -504,6 +504,7 @@ export default class SubHolding extends Component {
item.formula, item.formula,
item.level, item.level,
item.description, item.description,
item.uom,
item.ratio.total_actual_before === null ? "0.0" : item.ratio.total_actual_before === "" ? "0.0" : item.ratio.total_actual_before, item.ratio.total_actual_before === null ? "0.0" : item.ratio.total_actual_before === "" ? "0.0" : item.ratio.total_actual_before,
Number(item.ratio.january).toFixed(1), Number(item.ratio.january).toFixed(1),
Number(item.ratio.february).toFixed(1), Number(item.ratio.february).toFixed(1),
...@@ -517,7 +518,6 @@ export default class SubHolding extends Component { ...@@ -517,7 +518,6 @@ export default class SubHolding extends Component {
Number(item.ratio.october).toFixed(1), Number(item.ratio.october).toFixed(1),
Number(item.ratio.november).toFixed(1), Number(item.ratio.november).toFixed(1),
Number(item.ratio.december).toFixed(1), Number(item.ratio.december).toFixed(1),
Number(item.ratio.total_current_year).toFixed(1),
Number(item.ratio.total_next_year).toFixed(1), Number(item.ratio.total_next_year).toFixed(1),
Number(item.ratio.total_more_year).toFixed(1), Number(item.ratio.total_more_year).toFixed(1),
item.order, item.order,
...@@ -541,6 +541,7 @@ export default class SubHolding extends Component { ...@@ -541,6 +541,7 @@ export default class SubHolding extends Component {
item.formula, item.formula,
item.level, item.level,
item.description, item.description,
item.oum,
item.ratio.total_actual_before === null ? "0.0" : item.ratio.total_actual_before === "" ? "0.0" : item.ratio.total_actual_before, item.ratio.total_actual_before === null ? "0.0" : item.ratio.total_actual_before === "" ? "0.0" : item.ratio.total_actual_before,
Number(item.ratio.january).toFixed(1), Number(item.ratio.january).toFixed(1),
Number(item.ratio.february).toFixed(1), Number(item.ratio.february).toFixed(1),
...@@ -554,7 +555,6 @@ export default class SubHolding extends Component { ...@@ -554,7 +555,6 @@ export default class SubHolding extends Component {
Number(item.ratio.october).toFixed(1), Number(item.ratio.october).toFixed(1),
Number(item.ratio.november).toFixed(1), Number(item.ratio.november).toFixed(1),
Number(item.ratio.december).toFixed(1), Number(item.ratio.december).toFixed(1),
Number(item.ratio.total_current_year).toFixed(1),
Number(item.ratio.total_next_year).toFixed(1), Number(item.ratio.total_next_year).toFixed(1),
Number(item.ratio.total_more_year).toFixed(1), Number(item.ratio.total_more_year).toFixed(1),
item.order, item.order,
......
...@@ -2920,7 +2920,7 @@ export default class TableSubHolding extends Component { ...@@ -2920,7 +2920,7 @@ export default class TableSubHolding extends Component {
name: "Account", name: "Account",
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell key={columnMeta.index} style={{ ...style, top: 0, zIndex: 103, backgroundColor: '#1c71b8', width: 300 }}> <TableCell key={columnMeta.index} style={{ ...style, top: 0, zIndex: 103, backgroundColor: '#1c71b8' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'left' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'left' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
...@@ -2928,7 +2928,6 @@ export default class TableSubHolding extends Component { ...@@ -2928,7 +2928,6 @@ export default class TableSubHolding extends Component {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
return ( return (
<div style={{ width: 300 }}> <div style={{ width: 300 }}>
{ console.log(tableMeta) }
{ {
tableMeta.rowData[4] == 0 ? tableMeta.rowData[4] == 0 ?
<span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span> <span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
...@@ -2952,48 +2951,12 @@ export default class TableSubHolding extends Component { ...@@ -2952,48 +2951,12 @@ export default class TableSubHolding extends Component {
setCellProps: () => ({ style2 }), setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div> <div style={{ width: 90, textAlign: 'center' }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 4 ?
null : null :
<FormControlLabel <div>
style={{ margin: 0 }} <span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : value}</span>
// value={value} </div>
control={
// !handleAction(tableMeta.rowData[2], tableMeta.rowData[0]) ?
// <Input
// disableUnderline={true}
// style={{ fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent', marginTop: -10 }}
// type="text"
// placeholder=""
// defaultValue={value}
// color={"#5198ea"}
// disabled={true}
// onBlur={(event) => {
// // // console.log(event.target.value)
// // updateValue(event.target.value)
// handleChangeText(event.target.value, tableMeta)
// // // console.log(dataTable2)
// }}
// /> :
<MuiThemeProvider theme={getMuiTheme()}>
<Input
disableUnderline={true}
style={{ fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent', marginBottom: -5 }}
type="text"
placeholder=""
defaultValue={value}
color={"#5198ea"}
// disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false ? false : !handleAction(tableMeta.rowData[2]))}
onBlur={(event) => {
// // console.log(event.target.value)
// updateValue(event.target.value)
// handleChangeText(event.target.value, tableMeta)
// // console.log(dataTable2)
}}
/>
</MuiThemeProvider>
}
/>
} }
</div> </div>
) )
...@@ -3078,7 +3041,7 @@ export default class TableSubHolding extends Component { ...@@ -3078,7 +3041,7 @@ export default class TableSubHolding extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[7]).toFixed(2)} value={Number(tableMeta.rowData[8]).toFixed(2)}
/> />
} }
/> />
...@@ -3101,7 +3064,7 @@ export default class TableSubHolding extends Component { ...@@ -3101,7 +3064,7 @@ export default class TableSubHolding extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[8]).toFixed(2)} value={Number(tableMeta.rowData[9]).toFixed(2)}
/> />
} }
/> />
...@@ -3124,7 +3087,7 @@ export default class TableSubHolding extends Component { ...@@ -3124,7 +3087,7 @@ export default class TableSubHolding extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[9]).toFixed(2)} value={Number(tableMeta.rowData[10]).toFixed(2)}
/> />
} }
/> />
...@@ -3147,7 +3110,7 @@ export default class TableSubHolding extends Component { ...@@ -3147,7 +3110,7 @@ export default class TableSubHolding extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[10]).toFixed(2)} value={Number(tableMeta.rowData[11]).toFixed(2)}
/> />
} }
/> />
...@@ -3172,7 +3135,7 @@ export default class TableSubHolding extends Component { ...@@ -3172,7 +3135,7 @@ export default class TableSubHolding extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[11]).toFixed(2)} value={Number(tableMeta.rowData[12]).toFixed(2)}
/> />
} }
/> />
...@@ -3195,7 +3158,7 @@ export default class TableSubHolding extends Component { ...@@ -3195,7 +3158,7 @@ export default class TableSubHolding extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[12]).toFixed(2)} value={Number(tableMeta.rowData[13]).toFixed(2)}
/> />
} }
/> />
...@@ -3218,7 +3181,7 @@ export default class TableSubHolding extends Component { ...@@ -3218,7 +3181,7 @@ export default class TableSubHolding extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[13]).toFixed(2)} value={Number(tableMeta.rowData[14]).toFixed(2)}
/> />
} }
/> />
...@@ -3241,7 +3204,7 @@ export default class TableSubHolding extends Component { ...@@ -3241,7 +3204,7 @@ export default class TableSubHolding extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[14]).toFixed(2)} value={Number(tableMeta.rowData[15]).toFixed(2)}
/> />
} }
/> />
...@@ -3266,7 +3229,7 @@ export default class TableSubHolding extends Component { ...@@ -3266,7 +3229,7 @@ export default class TableSubHolding extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[15]).toFixed(2)} value={Number(tableMeta.rowData[16]).toFixed(2)}
/> />
} }
/> />
...@@ -3289,7 +3252,7 @@ export default class TableSubHolding extends Component { ...@@ -3289,7 +3252,7 @@ export default class TableSubHolding extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[16]).toFixed(2)} value={Number(tableMeta.rowData[17]).toFixed(2)}
/> />
} }
/> />
...@@ -3312,7 +3275,7 @@ export default class TableSubHolding extends Component { ...@@ -3312,7 +3275,7 @@ export default class TableSubHolding extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[17]).toFixed(2)} value={Number(tableMeta.rowData[18]).toFixed(2)}
/> />
} }
/> />
...@@ -3335,7 +3298,7 @@ export default class TableSubHolding extends Component { ...@@ -3335,7 +3298,7 @@ export default class TableSubHolding extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[18]).toFixed(2)} value={Number(tableMeta.rowData[19]).toFixed(2)}
/> />
} }
/> />
......
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