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

update banyak

parent 1a040778
......@@ -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(baru)
console.log(anjay)
......@@ -1754,7 +1754,41 @@ export default class OutlookPA extends Component {
</div>
)}
</div>
{this.state.checkApprover === true ?
{this.state.isAdmin && this.state.lastStatus == 'APPROVED' ?
<div className="grid grid-2x" style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', }}>
<div className="col-1" />
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
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>
{/* <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>
:
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
......@@ -1954,7 +1988,7 @@ export default class OutlookPA extends Component {
isApprover={this.state.isApprover}
lastStatus={this.state.lastStatus}
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 && (
......
......@@ -265,7 +265,7 @@ export default class RollingOutlook extends Component {
item.number,
item.report_name,
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,
// 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 {
if (response.ok) {
if (response.data.status === 'success') {
// 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') {
this.setState({ isAdmin: true })
}
......@@ -561,7 +561,7 @@ export default class RollingOutlook extends Component {
if (response.data.data.is_approver === true) {
this.setState({ isApprover: true, checkApprover: true })
} 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 {
}
})
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(baru)
console.log(anjay)
......@@ -1830,7 +1830,41 @@ export default class RollingOutlook extends Component {
</div>
)}
</div>
{this.state.checkApprover === true ?
{this.state.isAdmin && this.state.lastStatus == 'APPROVED' ?
<div className="grid grid-2x" style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', }}>
<div className="col-1" />
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
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>
{/* <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>
:
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
......@@ -2032,7 +2066,7 @@ export default class RollingOutlook extends Component {
quarter={this.state.quarter.value}
isApprover={this.state.isApprover}
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 {
prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
status={this.state.status}
lastStatus={this.state.lastStatus}
PLBSFAMSubmitted={this.state.lastStatus == 'APPROVED'? true : false}
PLBSFAMSubmitted={this.state.lastStatus == 'APPROVED' ? true : false}
/>
)}
......
This diff is collapsed.
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