Commit a7588044 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'faisal' into 'master'

tektek

See merge request !400
parents ac9aac2c 63a2dfb5
......@@ -45,7 +45,8 @@ export default class FixedAssetsMovement extends Component {
editable: false,
buttonError: false,
judulColumn: null,
updateBy: '-'
updateBy: '-',
handleTekTekTek: 0
}
this.handleValue = this.handleValue.bind(this)
this.fileHandler = this.fileHandler.bind(this);
......@@ -530,7 +531,7 @@ export default class FixedAssetsMovement extends Component {
"formula": rilFormula
}
api.create().countingFormula(body).then(response => {
// console.log(response);
console.log(response);
if (response.data) {
if (response.data.status === "success") {
setTimeout(() => {
......@@ -640,6 +641,7 @@ export default class FixedAssetsMovement extends Component {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ width: 300 }}>
{console.log(tableMeta.rowData)}
{tableMeta.rowData[23] ?
tableMeta.rowData[23].length > 0 ?
<div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
......@@ -2149,7 +2151,8 @@ export default class FixedAssetsMovement extends Component {
}}
onClick={() => this.state.editable === true ?
null :
this.setState({ loading: true }, () => {
this.state.handleTekTekTek == 1 ? null :
this.setState({ loading: true, handleTekTekTek: 1 }, () => {
setTimeout(() => {
this.backToMasterBudget('draft')
}, 100);
......@@ -2162,17 +2165,18 @@ export default class FixedAssetsMovement extends Component {
<button
type="button"
disabled={this.state.buttonError}
onClick={() => {
onClick={() =>
this.state.buttonError ?
this.setState({ loading: true }, () => {
setTimeout(() => {
this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning', loading: false })
}, 100);
})
: this.setState({ loading: true }, () => {
:
this.state.handleTekTekTek == 1 ? null :
this.setState({ loading: true, handleTekTekTek: 1 }, () => {
this.backToMasterBudget('submitted')
})
}}
})}
style={{
backgroundColor: 'transparent',
cursor: this.state.buttonError === true ? 'default' : 'pointer',
......@@ -2252,14 +2256,24 @@ export default class FixedAssetsMovement extends Component {
</div>
</button>
<button
className="button"
type="button"
disabled={this.state.buttonError}
onClick={() => this.setState({ loading: true }, () => {
setTimeout(() => {
this.uploadFAM('draft')
}, 100);
})}
style={{ marginRight: 20 }}
style={{
backgroundColor: 'transparent',
cursor: this.state.buttonError === true ? 'default' : 'pointer',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
onClick={() => this.setState({ loading: true }, () =>
this.state.handleTekTekTek == 1 ? null :
this.setState({handleTekTekTek: 1}, () => {
setTimeout(() => {
this.uploadFAM('draft')
}, 100);
})
)}
>
<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 as Draft</Typography>
......@@ -2268,11 +2282,14 @@ export default class FixedAssetsMovement extends Component {
<button
type="button"
disabled={this.state.buttonError}
onClick={() => this.setState({ loading: true }, () => {
setTimeout(() => {
this.uploadFAM('submitted')
}, 100);
})}
onClick={() => this.setState({ loading: true }, () =>
this.state.handleTekTekTek == 1? null :
this.setState({handleTekTekTek: 1}, () => {
setTimeout(() => {
this.uploadFAM('submitted')
}, 100);
})
)}
>
<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>
......
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