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 { ...@@ -96,7 +96,8 @@ export default class CashFlowMR extends Component {
"periode": this.props.periode, "periode": this.props.periode,
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
"monthly_report_id": this.props.monthlyReportId, "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 => { api.create().getHierarkiMontlyReportCF(payload).then(response => {
......
...@@ -128,7 +128,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -128,7 +128,7 @@ export default class CorporateAnnualTargetMR extends Component {
api.create().getParameterByGroupName({ api.create().getParameterByGroupName({
"group_name" : 'ACHIEVEMENT_KPI' "group_name" : 'ACHIEVEMENT_KPI'
}).then((response) => { }).then((response) => {
console.log(response.data.data) // console.log(response.data.data)
if (response.data) { if (response.data) {
this.setState({parameterScore: response.data.data}) this.setState({parameterScore: response.data.data})
} }
...@@ -146,7 +146,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -146,7 +146,7 @@ export default class CorporateAnnualTargetMR extends Component {
} }
// console.log(payload) // console.log(payload)
api.create().getLastestUpdateMR(payload).then(response => { api.create().getLastestUpdateMR(payload).then(response => {
console.log(JSON.stringify(response)) // console.log(JSON.stringify(response))
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.setState({ this.setState({
...@@ -193,7 +193,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -193,7 +193,7 @@ export default class CorporateAnnualTargetMR extends Component {
if (indexIDzz === -1) { if (indexIDzz === -1) {
let parentTrue = item.parent_name == 'INTERNAL BUSINESS PROCESS PERSPECTIVE' || item.parent_name == 'CUSTOMER PERSPECTIVE' 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) 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([ dataTable.push([
item.type_report_id, item.type_report_id,
item.id, item.id,
...@@ -601,7 +601,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -601,7 +601,7 @@ export default class CorporateAnnualTargetMR extends Component {
let total = 0 let total = 0
let perfomanceScore = '' let perfomanceScore = ''
let dataTable2 = this.state.dataTable let dataTable2 = this.state.dataTable
console.log(dataTable2) // console.log(dataTable2)
dataTable2.map((item,index) => { dataTable2.map((item,index) => {
let value = String(item[15]) == 'NaN' || String(item[15]) == ''? 0 : Number(item[15]) let value = String(item[15]) == 'NaN' || String(item[15]) == ''? 0 : Number(item[15])
total += value total += value
...@@ -1240,7 +1240,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1240,7 +1240,7 @@ export default class CorporateAnnualTargetMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
suffix={"%"} suffix={"%"}
value={value} value={Number(value).toFixed(1)}
disabled={true} 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)} // 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} decimalScale={1}
...@@ -1533,7 +1533,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1533,7 +1533,7 @@ export default class CorporateAnnualTargetMR extends Component {
value={Number(value).toFixed(2)} 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={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} disabled={true}
decimalScale={1} decimalScale={2}
/> />
: :
<NumberFormat <NumberFormat
...@@ -1560,7 +1560,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1560,7 +1560,7 @@ export default class CorporateAnnualTargetMR extends Component {
), ),
customBodyRender: (value, tableMeta) => { customBodyRender: (value, tableMeta) => {
return ( return (
<div style={{ width: 75 }}> <div style={{ width: 150 }}>
{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
: :
...@@ -1576,6 +1576,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -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' }} style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 75, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
multiline={true}
defaultValue={value} defaultValue={value}
disabled={this.state.get_for == 'view'} disabled={this.state.get_for == 'view'}
onBlur={(event) => { onBlur={(event) => {
...@@ -1811,7 +1812,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1811,7 +1812,7 @@ export default class CorporateAnnualTargetMR extends Component {
this.setState({ alert: true, messageAlert: 'Data Incomplete', tipeAlert: 'error' }) this.setState({ alert: true, messageAlert: 'Data Incomplete', tipeAlert: 'error' })
: :
this.state.handleTekTekTek == 1 ? null : this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1 }, () => { this.setState({ handleTekTekTek: 1, loading: true }, () => {
this.backToMonthlyReport('draft') this.backToMonthlyReport('draft')
}) })
} }
...@@ -1828,7 +1829,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1828,7 +1829,7 @@ export default class CorporateAnnualTargetMR extends Component {
this.setState({ alert: true, messageAlert: 'Data Incomplete', tipeAlert: 'error' }) this.setState({ alert: true, messageAlert: 'Data Incomplete', tipeAlert: 'error' })
: :
this.state.handleTekTekTek == 1 ? null : this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1 }, () => { this.setState({ handleTekTekTek: 1, loading: true }, () => {
this.backToMonthlyReport('submitted') this.backToMonthlyReport('submitted')
})} })}
style={{ style={{
...@@ -1893,7 +1894,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1893,7 +1894,7 @@ export default class CorporateAnnualTargetMR extends Component {
</div> </div>
</div> </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}}> <div className="col-1" style={{paddingLeft: 0}}>
<button <button
type="button" type="button"
...@@ -1914,7 +1915,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1914,7 +1915,7 @@ export default class CorporateAnnualTargetMR extends Component {
</div> </div>
</button> </button>
</div> </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 <button
className="button" className="button"
type="button" type="button"
...@@ -1953,7 +1954,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1953,7 +1954,7 @@ export default class CorporateAnnualTargetMR extends Component {
this.setState({ alert: true, messageAlert: 'Data Incomplete', tipeAlert: 'error' }) this.setState({ alert: true, messageAlert: 'Data Incomplete', tipeAlert: 'error' })
: :
this.state.handleTekTekTek === 1 ? null : this.state.handleTekTekTek === 1 ? null :
this.setState({ handleTekTekTek: 1 }, () => { this.setState({ handleTekTekTek: 1, loading: true }, () => {
this.uploadCATMR('draft') this.uploadCATMR('draft')
}) })
} }
...@@ -1970,7 +1971,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1970,7 +1971,7 @@ export default class CorporateAnnualTargetMR extends Component {
this.setState({ alert: true, messageAlert: 'Data Incomplete', tipeAlert: 'error' }) this.setState({ alert: true, messageAlert: 'Data Incomplete', tipeAlert: 'error' })
: :
this.state.handleTekTekTek === 1 ? null : this.state.handleTekTekTek === 1 ? null :
this.setState({ handleTekTekTek: 1 }, () => { this.setState({ handleTekTekTek: 1, loading: true }, () => {
this.uploadCATMR('submitted') this.uploadCATMR('submitted')
})} })}
style={{ 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