reset modal state if api request is completed
This commit is contained in:
parent
1b07c6ae4f
commit
dfc56dfee2
1 changed files with 6 additions and 4 deletions
|
@ -36,15 +36,16 @@ const UserReportingModal = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
userId (value) {
|
userId: 'resetState'
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
resetState () {
|
||||||
// Reset state
|
// Reset state
|
||||||
this.comment = ''
|
this.comment = ''
|
||||||
this.forward = false
|
this.forward = false
|
||||||
this.statusIdsToReport = []
|
this.statusIdsToReport = []
|
||||||
this.processing = false
|
this.processing = false
|
||||||
}
|
},
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
closeModal () {
|
closeModal () {
|
||||||
this.$store.dispatch('closeUserReportingModal')
|
this.$store.dispatch('closeUserReportingModal')
|
||||||
},
|
},
|
||||||
|
@ -59,6 +60,7 @@ const UserReportingModal = {
|
||||||
this.$store.state.api.backendInteractor.reportUser(params)
|
this.$store.state.api.backendInteractor.reportUser(params)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.processing = false
|
this.processing = false
|
||||||
|
this.resetState()
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue