Commit 8100ad19 authored by fahrur huzain's avatar fahrur huzain

Merge branch 'ENV-PROD' into 'ENV-DEPLOYMENT-PROD'

Env prod

See merge request !2349
parents e3b4f99e f9a3ad42
......@@ -505,8 +505,8 @@ export default class CorporateAnnualTargetMR extends Component {
jenis_kpi: i[8] == null ? "" : i[8],
max_ach: i[9] == null ? "" : i[9],
formula_ytd: i[10] == null ? "" : i[10],
actual_monthly: String(fixNumber(Number(i[11]), 1)),
target_monthly: String(fixNumber(Number(i[12]), 1)),
actual_monthly: String(Number(i[11])),
target_monthly: String(Number(i[12])),
achivement_monthly: String(fixNumber(Number(i[13]), 1)),
score: String(fixNumber(Number(i[14]), 0)),
score_x_weight: String(fixNumber(Number(i[15]), 2)),
......@@ -681,8 +681,8 @@ export default class CorporateAnnualTargetMR extends Component {
"jenis_kpi": i[8] == null ? "" : i[8],
"max_ach": i[9] == null ? "" : i[9],
"formula_ytd": i[10] == null ? "" : i[10],
"actual_monthly": i[11] == null || i[11] == "" ? 0.0 : String(fixNumber(Number(i[11]), 1)),
"target_monthly": i[12] == null || i[12] == "" ? 0.0 : String(fixNumber(Number(i[12]), 1)),
"actual_monthly": i[11] == null || i[11] == "" ? 0.0 : String(Number(i[11])),
"target_monthly": i[12] == null || i[12] == "" ? 0.0 : String(Number(i[12])),
"achivement_monthly": String(fixNumber(Number(i[13]), 1)),
"score": String(fixNumber(Number(i[14]), 0)),
"score_x_weight": String(fixNumber(Number(i[15]), 2)),
......@@ -1745,26 +1745,26 @@ export default class CorporateAnnualTargetMR extends Component {
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={fixNumber(Number(value), 1) == 0 ? "0.0" : fixNumber(Number(value), 1)}
value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
// 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={true}
decimalScale={1}
decimalScale={2}
/>
:
<div style={{ flex: 1, textAlign: 'right' }}>
<FormControlLabel
style={{ margin: 0 }}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value)}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value)}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.state.get_for == 'view' ? "black" : handleAction(tableMeta.rowData[2], tableMeta.rowData[0], tableMeta) ? "#5198ea" : 'black', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ? fixNumber(Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex)), 1) : fixNumber(Number(value), 1)) : (tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ? (Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex)) == 0 ? "0.0" : Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex))) : Number(value) == 0 ? "0.0" : Number(value))}
value={this.props.defaultCurrency.id == 1 ? (tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ? fixNumber(Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex)), 2) : fixNumber(Number(value), 2)) : (tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ? (Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex)) == 0 ? "0.00" : Number(handleValueFormula(value, tableMeta, tableMeta.columnIndex))) : Number(value) == 0 ? "0.00" : Number(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.state.get_for == 'view' ? true : !handleAction(tableMeta.rowData[2], tableMeta.rowData[0], tableMeta)}
decimalScale={1}
decimalScale={2}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
......@@ -1792,17 +1792,29 @@ export default class CorporateAnnualTargetMR extends Component {
<div style={{ width: 75, textAlign: 'right' }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null :
this.state.get_for == 'view' ?
<NumberFormat
thousandSeparator={true}
style={{ color: "black", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={fixNumber(Number(value), 2) == 0 ? "0.00" : fixNumber(Number(value), 2)}
// 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={true}
decimalScale={2}
/>
:
<FormControlLabel
style={{ margin: 0 }}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 ? "0.00" : Number(value)}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 1) : Number(value) == 0 ? "0.0" : Number(value)}
decimalScale={1}
value={this.props.defaultCurrency.id == 1 ? Number(value) == 0 ? "0.00" : fixNumber(Number(value), 2) : Number(value) == 0 ? "0.00" : Number(value)}
decimalScale={2}
disabled={true}
/>
}
......
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