Commit 44482621 authored by fahrur huzain's avatar fahrur huzain

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

Env prod

See merge request !2309
parents 2ad046ff b7a41996
......@@ -175,7 +175,7 @@ export default class CorporateAnnualTarget extends Component {
item.level,
"",
item.description,
item.type_report_id == 1 ? `${fixNumber(Number(item.weight) * 100)}%` : (String(item.cat.weight).includes('%') ? (String(Number(String(item.cat.weight).substr(0, String(item.cat.weight).length - 1))) + '%') : ((String(Number(item.cat.weight)) + '%') + '%')),
item.type_report_id == 1 ? `${fixNumber(Number(item.weight) * 100)}%` : (String(item.cat.weight).includes('%') ? (String(Number(String(item.cat.weight).substr(0, String(item.cat.weight).length - 1))) + '%') : ((String(Number(item.cat.weight)) + '%'))),
parentTrue ? item.cat.uom : item.uom,
parentTrue ? item.cat.kpi_type == "" ? null : { value: item.cat.kpi_type } : item.kpi_type == "" ? null : { value: item.kpi_type },
parentTrue ? item.cat.max_ach == "" ? null : { value: titleCase(item.cat.max_ach) } : item.max_ach == "" ? null : { value: titleCase(item.max_ach) },
......@@ -842,11 +842,11 @@ export default class CorporateAnnualTarget extends Component {
"status": "submitted",
"cat": data
}
// // // // console.log(totalWeight)
console.log(totalWeight)
// this.setState({dataTable: dataTampung})
if (handleKosongKPIMAXYTD) {
this.setState({ alert: true, messageAlert: 'KPI / Weight / KPI Type / Max Ach / Formula YTD / Cannot be Empty', tipeAlert: 'warning', loading: false, editable: true })
} else if (totalWeight < 100) {
} else if (totalWeight < 100 && totalWeight > 0) {
this.setState({ alert: true, messageAlert: 'Total weight less than 100%', tipeAlert: 'warning', loading: false, editable: true })
} else {
console.log(JSON.stringify(payload))
......@@ -1813,7 +1813,7 @@ export default class CorporateAnnualTarget extends Component {
placeholder=""
value={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)}
maxLength={4}
maxLength={5}
onBlur={(event) => {
// updateValue(some)
handleChangePercentage(event.target.value, tableMeta)
......
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