Commit 8c0a87b3 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'faisal' into 'master'

update mr cat

See merge request !655
parents 998401fe 087a67f5
...@@ -724,13 +724,13 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -724,13 +724,13 @@ export default class CorporateAnnualTargetMR extends Component {
name: `Actual ${this.props.month.month_value} ${Number(this.props.periode)}`, name: `Actual ${this.props.month.month_value} ${Number(this.props.periode)}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 60, borderLeft: '1px #fff solid' }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 75, borderLeft: '1px #fff solid' }}>
<Typography style={{ color: '#fff', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: '#fff', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
customBodyRender: (value, tableMeta) => { customBodyRender: (value, tableMeta) => {
return ( return (
<div style={{ width: 60 }}> <div style={{ width: 75 }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null null
: :
...@@ -765,13 +765,13 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -765,13 +765,13 @@ export default class CorporateAnnualTargetMR extends Component {
name: `Target ${this.props.month.month_value} ${Number(this.props.periode)}`, name: `Target ${this.props.month.month_value} ${Number(this.props.periode)}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 60, borderLeft: '1px #fff solid' }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 75, borderLeft: '1px #fff solid' }}>
<Typography style={{ color: '#000', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: '#000', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
customBodyRender: (value, tableMeta) => { customBodyRender: (value, tableMeta) => {
return ( return (
<div style={{ width: 60 }}> <div style={{ width: 75 }}>
{/* {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ? {/* {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null : null :
<FormControlLabel <FormControlLabel
...@@ -804,13 +804,13 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -804,13 +804,13 @@ export default class CorporateAnnualTargetMR extends Component {
name: `Achivement ${this.props.month.month_value} ${Number(this.props.periode)} (%)`, name: `Achivement ${this.props.month.month_value} ${Number(this.props.periode)} (%)`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 60, borderLeft: '1px #fff solid' }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 75, borderLeft: '1px #fff solid' }}>
<Typography style={{ color: '#000', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: '#000', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
customBodyRender: (value, tableMeta) => { customBodyRender: (value, tableMeta) => {
return ( return (
<div style={{ width: 60 }}> <div style={{ width: 75 }}>
{/* {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ? {/* {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null : null :
<FormControlLabel <FormControlLabel
...@@ -843,13 +843,13 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -843,13 +843,13 @@ export default class CorporateAnnualTargetMR extends Component {
name: `Score (Scale 1-5)`, name: `Score (Scale 1-5)`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 60, borderLeft: '1px #fff solid' }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 70, borderLeft: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
customBodyRender: (value, tableMeta) => { customBodyRender: (value, tableMeta) => {
return ( return (
<div style={{ width: 60 }}> <div style={{ width: 70 }}>
{/* {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ? {/* {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null : null :
<FormControlLabel <FormControlLabel
...@@ -882,13 +882,13 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -882,13 +882,13 @@ export default class CorporateAnnualTargetMR extends Component {
name: `Score x Weight`, name: `Score x Weight`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 60, borderLeft: '1px #fff solid' }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 75, borderLeft: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
customBodyRender: (value, tableMeta) => { customBodyRender: (value, tableMeta) => {
return ( return (
<div style={{ width: 60 }}> <div style={{ width: 75 }}>
{/* {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ? {/* {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null : null :
<FormControlLabel <FormControlLabel
...@@ -897,7 +897,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -897,7 +897,7 @@ export default class CorporateAnnualTargetMR extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 60, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 75, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={Number(handleTotal(tableMeta)).toFixed(1)} value={Number(handleTotal(tableMeta)).toFixed(1)}
...@@ -921,38 +921,36 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -921,38 +921,36 @@ export default class CorporateAnnualTargetMR extends Component {
name: `Notes`, name: `Notes`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 60, borderLeft: '1px #fff solid' }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 75, borderLeft: '1px #fff solid' }}>
<Typography style={{ color: '#fff', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: '#fff', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> </TableCell>
), ),
customBodyRender: (value, tableMeta) => { customBodyRender: (value, tableMeta) => {
return ( return (
<div style={{ width: 60 }}> <div style={{ width: 75 }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null null
: :
<div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
value={value}
control={ control={
<NumberFormat <ThemeProvider theme={theme}>
thousandSeparator={true} <Input
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 60, backgroundColor: 'transparent' }} disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 75, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={Number(value).toFixed(1)} defaultValue={value}
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)} 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}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// // console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
</ThemeProvider>
} }
/> />
</div>
} }
</div> </div>
) )
...@@ -961,7 +959,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -961,7 +959,7 @@ export default class CorporateAnnualTargetMR extends Component {
} }
] ]
let data = [ let data = [
["Total Assets", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" ], ["Revenue", "0%", "Rp Bio", "HIG", "unlimited", "SUM", "input", "result", "result", "result", "result", "Lorem ipsum" ],
// ["Total Assets", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22" ] // ["Total Assets", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22" ]
] ]
......
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