Commit cfbaf446 authored by Riri Novita's avatar Riri Novita

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into riri

parents d38c5bc1 ffb15871
......@@ -96,7 +96,8 @@ export default class CashFlowMR extends Component {
"periode": this.props.periode,
"company_id": this.props.company.company_id,
"monthly_report_id": this.props.monthlyReportId,
"months": this.props.month.month_id
"months": this.props.month.month_id,
"get_for": "edit"
}
api.create().getHierarkiMontlyReportCF(payload).then(response => {
......
......@@ -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
:
......@@ -1576,6 +1576,7 @@ export default class CorporateAnnualTargetMR extends Component {
style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 75, backgroundColor: 'transparent' }}
type="text"
placeholder=""
multiline={true}
defaultValue={value}
disabled={this.state.get_for == 'view'}
onBlur={(event) => {
......@@ -1811,7 +1812,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 +1829,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 +1894,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 +1915,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 +1954,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 +1971,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