Commit f33cb776 authored by d.arizona's avatar d.arizona

update banyak

parent 1a040778
...@@ -615,7 +615,7 @@ export default class OutlookPA extends Component { ...@@ -615,7 +615,7 @@ export default class OutlookPA extends Component {
visibleCF: true, visibleCF: true,
visibleCAT: false visibleCAT: false
}) })
// } else if (item === 'Corporate Annual Target') { // } else if (item === 'Corporate Annual Target') {
} else if (item === 'CAT') { } else if (item === 'CAT') {
this.setState({ this.setState({
visibleOutlookPA: false, visibleOutlookPA: false,
...@@ -1125,7 +1125,7 @@ export default class OutlookPA extends Component { ...@@ -1125,7 +1125,7 @@ export default class OutlookPA extends Component {
} }
}) })
if(String(tableMeta[5]) == "Cost of Goods Sold (COGS)" && column == 20) { if (String(tableMeta[5]) == "Cost of Goods Sold (COGS)" && column == 20) {
console.log(splitFormula) console.log(splitFormula)
console.log(baru) console.log(baru)
console.log(anjay) console.log(anjay)
...@@ -1754,75 +1754,93 @@ export default class OutlookPA extends Component { ...@@ -1754,75 +1754,93 @@ export default class OutlookPA extends Component {
</div> </div>
)} )}
</div> </div>
{this.state.checkApprover === true ? {this.state.isAdmin && this.state.lastStatus == 'APPROVED' ?
this.state.lastStatus === 'WAITING FOR REVIEW' ? <div className="grid grid-2x" style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', }}>
<div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} > <div className="col-1" />
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button <button
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: 'pointer', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
marginRight: 20
}} }}
onClick={() => onClick={() => this.setState({ visibleRevision: true })}
this.approvalSubmission('review')
}
> >
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Review</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Revision</Typography>
</div> </div>
</button> </button>
</div> : (this.state.lastStatus === 'WAITING FOR YOUR APPROVAL' && this.state.btnApprove) ? {/* <button
<div className="grid grid-2x" style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', }}>
<div className="col-1">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.setState({ visibleRevision: true })}
>
<div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Revision</Typography>
</div>
</button>
</div>
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.approvalSubmission('approve')}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Approve</Typography>
</div>
</button>
</div>
</div> : null
:
(this.state.lastStatus === 'SUBMIT' || this.state.lastStatus === 'REVISION') && this.state.isSubmit === true ?
<div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} >
<button
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: 'pointer', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
}} }}
onClick={() => this.validate()} onClick={() => this.approvalSubmission('approve')}
> >
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Submit</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Approve</Typography>
</div> </div>
</button> </button> */}
</div> : </div>
this.state.lastStatus === 'SUBMITTED' && this.state.submitter ? </div>
:
this.state.checkApprover === true ?
this.state.lastStatus === 'WAITING FOR REVIEW' ?
<div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} >
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() =>
this.approvalSubmission('review')
}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Review</Typography>
</div>
</button>
</div> : (this.state.lastStatus === 'WAITING FOR YOUR APPROVAL' && this.state.btnApprove) ?
<div className="grid grid-2x" style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', }}>
<div className="col-1">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.setState({ visibleRevision: true })}
>
<div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Revision</Typography>
</div>
</button>
</div>
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.approvalSubmission('approve')}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Approve</Typography>
</div>
</button>
</div>
</div> : null
:
(this.state.lastStatus === 'SUBMIT' || this.state.lastStatus === 'REVISION') && this.state.isSubmit === true ?
<div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} > <div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} >
<button <button
style={{ style={{
...@@ -1831,13 +1849,29 @@ export default class OutlookPA extends Component { ...@@ -1831,13 +1849,29 @@ export default class OutlookPA extends Component {
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
}} }}
onClick={() => this.approvalSubmission('cancel')} onClick={() => this.validate()}
> >
<div style={{ backgroundColor: 'gray', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Cancel</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Submit</Typography>
</div> </div>
</button> </button>
</div> : null </div> :
this.state.lastStatus === 'SUBMITTED' && this.state.submitter ?
<div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} >
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.approvalSubmission('cancel')}
>
<div style={{ backgroundColor: 'gray', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Cancel</Typography>
</div>
</button>
</div> : null
} }
</Paper> </Paper>
...@@ -1954,7 +1988,7 @@ export default class OutlookPA extends Component { ...@@ -1954,7 +1988,7 @@ export default class OutlookPA extends Component {
isApprover={this.state.isApprover} isApprover={this.state.isApprover}
lastStatus={this.state.lastStatus} lastStatus={this.state.lastStatus}
prevRevision={this.state.isSubmit ? this.state.prevRevision : true} prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
PLBSFAMSubmitted={this.state.lastStatus == 'APPROVED'? true : false} PLBSFAMSubmitted={this.state.lastStatus == 'APPROVED' ? true : false}
/> />
)} )}
{this.state.visibleCAT && ( {this.state.visibleCAT && (
......
...@@ -89,7 +89,7 @@ export default class RollingOutlook extends Component { ...@@ -89,7 +89,7 @@ export default class RollingOutlook extends Component {
if (this.props.location.state !== undefined) { if (this.props.location.state !== undefined) {
console.log(this.props); console.log(this.props);
this.setState({ userType: this.props.location.state.userType, intent: 'Home', lastPeriod: this.props.location.state.rawData.periode, rawData: this.props.location.state.rawData }, () => { this.setState({ userType: this.props.location.state.userType, intent: 'Home', lastPeriod: this.props.location.state.rawData.periode, rawData: this.props.location.state.rawData }, () => {
this.getPermission() this.getPermission()
}) })
} else { } else {
this.getPermission() this.getPermission()
...@@ -265,7 +265,7 @@ export default class RollingOutlook extends Component { ...@@ -265,7 +265,7 @@ export default class RollingOutlook extends Component {
item.number, item.number,
item.report_name, item.report_name,
item.revision, item.revision,
this.state.quarter.value == 'q1' && !this.state.isApprovedMB? "CLOSED" : (this.state.quarter.value != 'q1' && !this.state.isApprovedRO ? "CLOSED" : (this.state.isSubmit === false ? "CLOSED" : item.current_status)), this.state.quarter.value == 'q1' && !this.state.isApprovedMB ? "CLOSED" : (this.state.quarter.value != 'q1' && !this.state.isApprovedRO ? "CLOSED" : (this.state.isSubmit === false ? "CLOSED" : item.current_status)),
item.report_id, item.report_id,
// Number(item.revision) > 0 ? (item.current_status == "not-yet" ? false : item.is_can_upload) : item.is_can_upload, // Number(item.revision) > 0 ? (item.current_status == "not-yet" ? false : item.is_can_upload) : item.is_can_upload,
item.report_name === "Cash Flow" ? item.is_can_upload : (Number(item.revision) > 0 ? (item.current_status == "not-yet" ? false : item.is_can_upload) : item.is_can_upload), item.report_name === "Cash Flow" ? item.is_can_upload : (Number(item.revision) > 0 ? (item.current_status == "not-yet" ? false : item.is_can_upload) : item.is_can_upload),
...@@ -330,7 +330,7 @@ export default class RollingOutlook extends Component { ...@@ -330,7 +330,7 @@ export default class RollingOutlook extends Component {
if (response.ok) { if (response.ok) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
// this.setState({ tempData: response.data.data, privileges: response.data.data.privileges }) // this.setState({ tempData: response.data.data, privileges: response.data.data.privileges })
// // // console.log(response.data.data) console.log(response.data.data)
if (String(response.data.data.role_name).toLocaleLowerCase() == 'superadmin') { if (String(response.data.data.role_name).toLocaleLowerCase() == 'superadmin') {
this.setState({ isAdmin: true }) this.setState({ isAdmin: true })
} }
...@@ -555,13 +555,13 @@ export default class RollingOutlook extends Component { ...@@ -555,13 +555,13 @@ export default class RollingOutlook extends Component {
} else { } else {
this.setState({ loading: false }) this.setState({ loading: false })
} }
api.create().getRollingOutlookIsApprover().then(response => { api.create().getRollingOutlookIsApprover().then(response => {
// console.log(response); // console.log(response);
if (response.data.data.is_approver === true) { if (response.data.data.is_approver === true) {
this.setState({ isApprover: true, checkApprover: true }) this.setState({ isApprover: true, checkApprover: true })
} else { } else {
this.setState({ isApprover: this.state.lastStatus == 'SUBMITTED'? true : false, checkApprover: false }) this.setState({ isApprover: this.state.lastStatus == 'SUBMITTED' ? true : false, checkApprover: false })
} }
}) })
...@@ -1183,7 +1183,7 @@ export default class RollingOutlook extends Component { ...@@ -1183,7 +1183,7 @@ export default class RollingOutlook extends Component {
} }
}) })
if(String(tableMeta[5]) == "Cost of Goods Sold (COGS)" && column == 20) { if (String(tableMeta[5]) == "Cost of Goods Sold (COGS)" && column == 20) {
console.log(splitFormula) console.log(splitFormula)
console.log(baru) console.log(baru)
console.log(anjay) console.log(anjay)
...@@ -1830,75 +1830,42 @@ export default class RollingOutlook extends Component { ...@@ -1830,75 +1830,42 @@ export default class RollingOutlook extends Component {
</div> </div>
)} )}
</div> </div>
{this.state.checkApprover === true ? {this.state.isAdmin && this.state.lastStatus == 'APPROVED' ?
this.state.lastStatus === 'WAITING FOR REVIEW' ? <div className="grid grid-2x" style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', }}>
<div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} > <div className="col-1" />
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button <button
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: 'pointer', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
marginRight: 20
}} }}
onClick={() => onClick={() => this.setState({ visibleRevision: true })}
this.approvalSubmission('review')
}
> >
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Review</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Revision</Typography>
</div> </div>
</button> </button>
</div> : (this.state.lastStatus === 'WAITING FOR YOUR APPROVAL' && this.state.btnApprove) ? {/* <button
<div className="grid grid-2x" style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', }}>
<div className="col-1">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.setState({ visibleRevision: true })}
>
<div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Revision</Typography>
</div>
</button>
</div>
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.approvalSubmission('approve')}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Approve</Typography>
</div>
</button>
</div>
</div> : null
:
(this.state.lastStatus === 'SUBMIT' || this.state.lastStatus === 'REVISION') && this.state.isSubmit === true ?
<div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} >
<button
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: 'pointer', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
}} }}
onClick={() => this.validate()} onClick={() => this.approvalSubmission('approve')}
> >
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Submit</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Approve</Typography>
</div> </div>
</button> </button> */}
</div> : </div>
this.state.lastStatus === 'SUBMITTED' && this.state.submitter ? </div>
:
this.state.checkApprover === true ?
this.state.lastStatus === 'WAITING FOR REVIEW' ?
<div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} > <div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} >
<button <button
style={{ style={{
...@@ -1907,13 +1874,80 @@ export default class RollingOutlook extends Component { ...@@ -1907,13 +1874,80 @@ export default class RollingOutlook extends Component {
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
}} }}
onClick={() => this.approvalSubmission('cancel')} onClick={() =>
this.approvalSubmission('review')
}
> >
<div style={{ backgroundColor: 'gray', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Cancel</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Review</Typography>
</div> </div>
</button> </button>
</div> : null </div> : (this.state.lastStatus === 'WAITING FOR YOUR APPROVAL' && this.state.btnApprove) ?
<div className="grid grid-2x" style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', }}>
<div className="col-1">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.setState({ visibleRevision: true })}
>
<div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Revision</Typography>
</div>
</button>
</div>
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.approvalSubmission('approve')}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Approve</Typography>
</div>
</button>
</div>
</div> : null
:
(this.state.lastStatus === 'SUBMIT' || this.state.lastStatus === 'REVISION') && this.state.isSubmit === true ?
<div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} >
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.validate()}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Submit</Typography>
</div>
</button>
</div> :
this.state.lastStatus === 'SUBMITTED' && this.state.submitter ?
<div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} >
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
onClick={() => this.approvalSubmission('cancel')}
>
<div style={{ backgroundColor: 'gray', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Cancel</Typography>
</div>
</button>
</div> : null
} }
</Paper> </Paper>
...@@ -2032,7 +2066,7 @@ export default class RollingOutlook extends Component { ...@@ -2032,7 +2066,7 @@ export default class RollingOutlook extends Component {
quarter={this.state.quarter.value} quarter={this.state.quarter.value}
isApprover={this.state.isApprover} isApprover={this.state.isApprover}
prevRevision={this.state.isSubmit ? this.state.prevRevision : true} prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
PLBSFAMSubmitted={this.state.lastStatus == 'APPROVED'? true : false} PLBSFAMSubmitted={this.state.lastStatus == 'APPROVED' ? true : false}
/> />
)} )}
...@@ -2053,7 +2087,7 @@ export default class RollingOutlook extends Component { ...@@ -2053,7 +2087,7 @@ export default class RollingOutlook extends Component {
prevRevision={this.state.isSubmit ? this.state.prevRevision : true} prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
status={this.state.status} status={this.state.status}
lastStatus={this.state.lastStatus} lastStatus={this.state.lastStatus}
PLBSFAMSubmitted={this.state.lastStatus == 'APPROVED'? true : false} PLBSFAMSubmitted={this.state.lastStatus == 'APPROVED' ? true : false}
/> />
)} )}
......
...@@ -1488,7 +1488,7 @@ export default class CashFlow extends Component { ...@@ -1488,7 +1488,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={ this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[15]).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)} value={ this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[15].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)}
/> />
</span> </span>
: :
...@@ -1500,11 +1500,11 @@ export default class CashFlow extends Component { ...@@ -1500,11 +1500,11 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[15]).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)} value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[15].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
(this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[15]).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1) <= Number(this.state.maxValue)) ? (this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[15].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1519,7 +1519,7 @@ export default class CashFlow extends Component { ...@@ -1519,7 +1519,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[15]).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)} value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[15].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)}
/> : /> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat <NumberFormat
...@@ -1536,7 +1536,7 @@ export default class CashFlow extends Component { ...@@ -1536,7 +1536,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[15]).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)} value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[15].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[15], tableMeta, 15)).toFixed(1)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -1557,7 +1557,7 @@ export default class CashFlow extends Component { ...@@ -1557,7 +1557,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[16]).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1)} value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[16].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1)}
/> />
</span> </span>
: :
...@@ -1569,11 +1569,11 @@ export default class CashFlow extends Component { ...@@ -1569,11 +1569,11 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[16]).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1)} value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[16].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
((this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[16]).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1)) >= Number(this.state.minValue) && (Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1)) <= Number(this.state.maxValue)) ? ((this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[16].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1)) >= Number(this.state.minValue) && (Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1)) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1588,7 +1588,7 @@ export default class CashFlow extends Component { ...@@ -1588,7 +1588,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[16]).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1)} value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[16].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1)}
/> : /> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat <NumberFormat
...@@ -1605,7 +1605,7 @@ export default class CashFlow extends Component { ...@@ -1605,7 +1605,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[16]).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1)} value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[16].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[16], tableMeta, 16)).toFixed(1)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -1626,7 +1626,7 @@ export default class CashFlow extends Component { ...@@ -1626,7 +1626,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[17]).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)} value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[17].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)}
/> />
</span> </span>
: :
...@@ -1638,11 +1638,11 @@ export default class CashFlow extends Component { ...@@ -1638,11 +1638,11 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[17]).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)} value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[17].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
((this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[17]).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)) >= Number(this.state.minValue) && (Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)) <= Number(this.state.maxValue)) ? ((this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[17].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)) >= Number(this.state.minValue) && (Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1657,7 +1657,7 @@ export default class CashFlow extends Component { ...@@ -1657,7 +1657,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[17]).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)} value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[17].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)}
/> : /> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat <NumberFormat
...@@ -1674,7 +1674,7 @@ export default class CashFlow extends Component { ...@@ -1674,7 +1674,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[17]).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)} value={this.props.PLBSFAMSubmitted? Number(tableMeta.rowData[17].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)}
/> />
</LightTooltip> </LightTooltip>
: :
......
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