Commit 8545d37a authored by faisalhamdi's avatar faisalhamdi

update company

parent ab6b1382
This diff is collapsed.
......@@ -285,6 +285,7 @@ export default class Perusahaan extends Component {
this.setState({ visibleEdit: false })
api.create().updatePerusahaan(payload).then(response => {
if (response.data.status == 'success') {
alert(response.data.message)
this.getData()
} else {
alert(response.data.message)
......@@ -296,6 +297,7 @@ export default class Perusahaan extends Component {
this.setState({ visibleCreate: false })
api.create().createPerusahaan(payload).then(response => {
if (response.data.status == 'success') {
alert(response.data.message)
this.getData()
} else {
alert(response.data.message)
......@@ -580,7 +582,7 @@ export default class Perusahaan extends Component {
)}
{this.state.visibleEdit && (
<EditPerusahaan
<CreatePerusahaan
type={"edit"}
onClickClose={() => this.setState({ visibleEdit: false })}
data={this.state.listData[this.state.selectIndex]}
......@@ -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 && (
<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