Commit 04c08fff authored by d.arizona's avatar d.arizona

tembak cf

parent da686588
...@@ -3195,8 +3195,8 @@ export default class CashFlow extends Component { ...@@ -3195,8 +3195,8 @@ export default class CashFlow extends Component {
</div> </div>
</button> </button>
</div> </div>
{this.props.isApprover === true || dataTable2.length == 0 ? null : {/* {this.props.isApprover === true || dataTable2.length == 0 ? null :
(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') ? (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') ? */}
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}> <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button <button
type="button" type="button"
...@@ -3221,7 +3221,7 @@ export default class CashFlow extends Component { ...@@ -3221,7 +3221,7 @@ export default class CashFlow extends Component {
</div> </div>
</button> </button>
</div> </div>
: null} {/* // : null} */}
</div> </div>
</div> </div>
</Paper> </Paper>
......
...@@ -63,19 +63,19 @@ export default class CashFlowMR extends Component { ...@@ -63,19 +63,19 @@ export default class CashFlowMR extends Component {
} else { } else {
checkApprover = false checkApprover = false
} }
if (this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') { if (this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') {
checkLastStatus = true checkLastStatus = true
} else { } else {
checkLastStatus = false checkLastStatus = false
} }
if (this.props.prevRevision) { if (this.props.prevRevision) {
checkPrevRev = true checkPrevRev = true
} else { } else {
checkPrevRev = false checkPrevRev = false
} }
if (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'drat' || this.props.status === 'submitted') { if (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'drat' || this.props.status === 'submitted') {
checkStatus = true checkStatus = true
} else { } else {
...@@ -85,7 +85,7 @@ export default class CashFlowMR extends Component { ...@@ -85,7 +85,7 @@ export default class CashFlowMR extends Component {
// console.log(checkLastStatus) // console.log(checkLastStatus)
// console.log(checkApprover) // console.log(checkApprover)
// console.log(checkPrevRev) // console.log(checkPrevRev)
this.setState({viewOnly: !checkApprover && checkLastStatus && checkStatus && checkPrevRev}) this.setState({ viewOnly: !checkApprover && checkLastStatus && checkStatus && checkPrevRev })
} }
componentDidMount() { componentDidMount() {
...@@ -214,10 +214,10 @@ export default class CashFlowMR extends Component { ...@@ -214,10 +214,10 @@ export default class CashFlowMR extends Component {
dataTable2.map((item, index) => { dataTable2.map((item, index) => {
// if (item[6].value == "" || item[6].value == 0 || item[6].value == "0.0") { // if (item[6].value == "" || item[6].value == 0 || item[6].value == "0.0") {
// item[6].value = this.handleValueFormula(item, index) // item[6].value = this.handleValueFormula(item, index)
listCF.push({ listCF.push({
"item_report_id": item[1], "item_report_id": item[1],
"actual": item[0] == 1 ? "" : Number(item[6].value).toFixed(1) "actual": item[0] == 1 ? "" : Number(item[6].value).toFixed(1)
}) })
// } else { // } else {
// listCF.push({ // listCF.push({
// "item_report_id": item[1], // "item_report_id": item[1],
...@@ -717,30 +717,32 @@ export default class CashFlowMR extends Component { ...@@ -717,30 +717,32 @@ export default class CashFlowMR extends Component {
</div> </div>
</button> </button>
</div> </div>
{this.state.viewOnly && <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}> {this.state.viewOnly &&
<button <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
type="button" <button
// disabled={this.state.buttonError} type="button"
onClick={() => // disabled={this.state.buttonError}
// this.state.buttonError ? onClick={() =>
// this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' }) // this.state.buttonError ?
// : // this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
this.state.handleTekTekTek == 1 ? null : // :
this.setState({ handleTekTekTek: 1 }, () => { this.state.handleTekTekTek == 1 ? null :
this.payloadCF(dataTable2) this.setState({ handleTekTekTek: 1 }, () => {
})} this.payloadCF(dataTable2)
style={{ })}
backgroundColor: 'transparent', style={{
cursor: this.state.buttonError === true ? 'default' : 'pointer', backgroundColor: 'transparent',
borderColor: 'transparent', cursor: this.state.buttonError === true ? 'default' : 'pointer',
outline: 'none', borderColor: 'transparent',
}} outline: 'none',
> }}
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> >
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography> <div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
</div> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
</button> </div>
</div>} </button>
</div>
}
</div> </div>
</div> </div>
</Paper> </Paper>
......
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