Commit 20342c85 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'faisal' into 'master'

update company

See merge request !133
parents 0eb344cf 4c88492d
This diff is collapsed.
...@@ -285,6 +285,7 @@ export default class Perusahaan extends Component { ...@@ -285,6 +285,7 @@ export default class Perusahaan extends Component {
this.setState({ visibleEdit: false }) this.setState({ visibleEdit: false })
api.create().updatePerusahaan(payload).then(response => { api.create().updatePerusahaan(payload).then(response => {
if (response.data.status == 'success') { if (response.data.status == 'success') {
alert(response.data.message)
this.getData() this.getData()
} else { } else {
alert(response.data.message) alert(response.data.message)
...@@ -296,6 +297,7 @@ export default class Perusahaan extends Component { ...@@ -296,6 +297,7 @@ export default class Perusahaan extends Component {
this.setState({ visibleCreate: false }) this.setState({ visibleCreate: false })
api.create().createPerusahaan(payload).then(response => { api.create().createPerusahaan(payload).then(response => {
if (response.data.status == 'success') { if (response.data.status == 'success') {
alert(response.data.message)
this.getData() this.getData()
} else { } else {
alert(response.data.message) alert(response.data.message)
...@@ -580,7 +582,7 @@ export default class Perusahaan extends Component { ...@@ -580,7 +582,7 @@ export default class Perusahaan extends Component {
)} )}
{this.state.visibleEdit && ( {this.state.visibleEdit && (
<EditPerusahaan <CreatePerusahaan
type={"edit"} type={"edit"}
onClickClose={() => this.setState({ visibleEdit: false })} onClickClose={() => this.setState({ visibleEdit: false })}
data={this.state.listData[this.state.selectIndex]} data={this.state.listData[this.state.selectIndex]}
...@@ -588,6 +590,15 @@ export default class Perusahaan extends Component { ...@@ -588,6 +590,15 @@ export default class Perusahaan extends Component {
/> />
)} )}
{/* {this.state.visibleEdit && (
<EditPerusahaan
type={"edit"}
onClickClose={() => this.setState({ visibleEdit: false })}
data={this.state.listData[this.state.selectIndex]}
updatePerusahaan={this.updatePerusahaan.bind(this)}
/>
)} */}
{this.state.popupError && ( {this.state.popupError && (
<PopUpFailedSave onClickClose={() => this.setState({ popupError: false })} /> <PopUpFailedSave onClickClose={() => this.setState({ popupError: false })} />
)} )}
......
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