Commit 74e00f82 authored by rifkaki's avatar rifkaki

issue excel cat

parent 3dcaf866
......@@ -128,7 +128,7 @@ export default class CorporateAnnualTargetMR extends Component {
api.create().getParameterByGroupName({
"group_name" : 'ACHIEVEMENT_KPI'
}).then((response) => {
console.log(response.data.data)
// console.log(response.data.data)
if (response.data) {
this.setState({parameterScore: response.data.data})
}
......@@ -146,7 +146,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
// console.log(payload)
api.create().getLastestUpdateMR(payload).then(response => {
console.log(JSON.stringify(response))
// console.log(JSON.stringify(response))
if (response.data) {
if (response.data.status === "success") {
this.setState({
......@@ -193,7 +193,7 @@ export default class CorporateAnnualTargetMR extends Component {
if (indexIDzz === -1) {
let parentTrue = item.parent_name == 'INTERNAL BUSINESS PROCESS PERSPECTIVE' || item.parent_name == 'CUSTOMER PERSPECTIVE'
let weight = String(item.corporate_annual_target.weight).substr(0,String(item.corporate_annual_target.weight).length-1)
console.log(weight)
// console.log(weight)
dataTable.push([
item.type_report_id,
item.id,
......@@ -601,7 +601,7 @@ export default class CorporateAnnualTargetMR extends Component {
let total = 0
let perfomanceScore = ''
let dataTable2 = this.state.dataTable
console.log(dataTable2)
// console.log(dataTable2)
dataTable2.map((item,index) => {
let value = String(item[15]) == 'NaN' || String(item[15]) == ''? 0 : Number(item[15])
total += value
......@@ -1240,7 +1240,7 @@ export default class CorporateAnnualTargetMR extends Component {
type="text"
placeholder=""
suffix={"%"}
value={value}
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}
......@@ -1533,7 +1533,7 @@ export default class CorporateAnnualTargetMR extends Component {
value={Number(value).toFixed(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}
/>
:
<NumberFormat
......@@ -1560,7 +1560,7 @@ export default class CorporateAnnualTargetMR extends Component {
),
customBodyRender: (value, tableMeta) => {
return (
<div style={{ width: 75 }}>
<div style={{ width: 150 }}>
{tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null
:
......@@ -1811,7 +1811,7 @@ export default class CorporateAnnualTargetMR extends Component {
this.setState({ alert: true, messageAlert: 'Data Incomplete', tipeAlert: 'error' })
:
this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1 }, () => {
this.setState({ handleTekTekTek: 1, loading: true }, () => {
this.backToMonthlyReport('draft')
})
}
......@@ -1828,7 +1828,7 @@ export default class CorporateAnnualTargetMR extends Component {
this.setState({ alert: true, messageAlert: 'Data Incomplete', tipeAlert: 'error' })
:
this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1 }, () => {
this.setState({ handleTekTekTek: 1, loading: true }, () => {
this.backToMonthlyReport('submitted')
})}
style={{
......@@ -1893,7 +1893,7 @@ export default class CorporateAnnualTargetMR extends Component {
</div>
</div>
</div>
<div className="grid grid-2x" style={{ marginTop: 10, padding: 20 }}>
<div className="grid grid-2x" style={{ marginTop: 10, padding: 20, paddingLeft: 0, paddingRight: 0 }}>
<div className="col-1" style={{paddingLeft: 0}}>
<button
type="button"
......@@ -1914,7 +1914,7 @@ export default class CorporateAnnualTargetMR extends Component {
</div>
</button>
</div>
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 5 }}>
<button
className="button"
type="button"
......@@ -1953,7 +1953,7 @@ export default class CorporateAnnualTargetMR extends Component {
this.setState({ alert: true, messageAlert: 'Data Incomplete', tipeAlert: 'error' })
:
this.state.handleTekTekTek === 1 ? null :
this.setState({ handleTekTekTek: 1 }, () => {
this.setState({ handleTekTekTek: 1, loading: true }, () => {
this.uploadCATMR('draft')
})
}
......@@ -1970,7 +1970,7 @@ export default class CorporateAnnualTargetMR extends Component {
this.setState({ alert: true, messageAlert: 'Data Incomplete', tipeAlert: 'error' })
:
this.state.handleTekTekTek === 1 ? null :
this.setState({ handleTekTekTek: 1 }, () => {
this.setState({ handleTekTekTek: 1, loading: true }, () => {
this.uploadCATMR('submitted')
})}
style={{
......
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