Skip to content

Commit

Permalink
Merge pull request #23 from anditsung/master
Browse files Browse the repository at this point in the history
refresh resource after import
  • Loading branch information
anaseqal authored Aug 26, 2020
2 parents fb473bf + 1a7017d commit 94d4ab1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dist/js/tool.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions resources/js/components/CustomIndexToolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ export default {
},
methods: {
refreshResource() {
this.$parent.$parent.getResources()
},
/**
* Get the actions available for the current resource.
*/
Expand Down Expand Up @@ -152,12 +157,14 @@ export default {
this.confirmActionModalOpened = false
this.handleActionResponse(response.data)
this.working = false
this.refreshResource()
})
.catch(error => {
this.working = false
if (error.response.status == 422) {
this.errors = new Errors(error.response.data.errors)
this.$toasted.show(this.__('There was a problem executing the action.'), { type: 'error' })
}
})
},
Expand Down

0 comments on commit 94d4ab1

Please sign in to comment.