Commit 9e22c668 authored by d.arizona's avatar d.arizona

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into didam

parents be94de8d 957f8eb1
...@@ -281,10 +281,10 @@ export default class ProfitLossMR extends Component { ...@@ -281,10 +281,10 @@ export default class ProfitLossMR extends Component {
} }
} }
}) })
if (err === true) { // if (err === true) {
this.setState({ bebas: true }) // this.setState({ bebas: true })
} // }
this.setState({ dataTable, loading: false, buttonError: true, saveDraft: true }) this.setState({ dataTable, loading: false, buttonError: true, saveDraft: true, refresh: false })
} else { } else {
this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) { if (response.data.message.includes("Someone Logged In")) {
...@@ -296,7 +296,7 @@ export default class ProfitLossMR extends Component { ...@@ -296,7 +296,7 @@ export default class ProfitLossMR extends Component {
}) })
} }
} else { } else {
this.setState({ dataTable, loading: false, buttonError: true, saveDraft: true }) this.setState({ dataTable, loading: false, buttonError: true, saveDraft: true, refresh: false })
} }
console.log(dataTable); console.log(dataTable);
}) })
...@@ -2077,7 +2077,7 @@ export default class ProfitLossMR extends Component { ...@@ -2077,7 +2077,7 @@ export default class ProfitLossMR extends Component {
</div> </div>
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}> <div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
{/* {!this.state.loading && ( */} {!this.state.refresh && (
<MuiThemeProvider theme={getMuiTheme()}> <MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable <MUIDataTable
data={dataTable2} data={dataTable2}
...@@ -2085,7 +2085,7 @@ export default class ProfitLossMR extends Component { ...@@ -2085,7 +2085,7 @@ export default class ProfitLossMR extends Component {
options={options} options={options}
/> />
</MuiThemeProvider> </MuiThemeProvider>
{/* )} */} )}
</div> </div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : {this.state.updateBy}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : {this.state.updateBy}</Typography>
...@@ -2129,7 +2129,7 @@ export default class ProfitLossMR extends Component { ...@@ -2129,7 +2129,7 @@ export default class ProfitLossMR extends Component {
marginRight: 20 marginRight: 20
}} }}
onClick={() => { onClick={() => {
this.setState({loading: true}, () => { this.setState({loading: true, refresh: true}, () => {
this.handleGetFor('edit') this.handleGetFor('edit')
}) })
}} }}
......
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