|
|
@ -12,7 +12,8 @@ const UserReportingModal = {
|
|
|
|
comment: '',
|
|
|
|
comment: '',
|
|
|
|
forward: false,
|
|
|
|
forward: false,
|
|
|
|
statusIdsToReport: [],
|
|
|
|
statusIdsToReport: [],
|
|
|
|
processing: false
|
|
|
|
processing: false,
|
|
|
|
|
|
|
|
error: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
computed: {
|
|
|
@ -45,12 +46,14 @@ const UserReportingModal = {
|
|
|
|
this.forward = false
|
|
|
|
this.forward = false
|
|
|
|
this.statusIdsToReport = []
|
|
|
|
this.statusIdsToReport = []
|
|
|
|
this.processing = false
|
|
|
|
this.processing = false
|
|
|
|
|
|
|
|
this.error = false
|
|
|
|
},
|
|
|
|
},
|
|
|
|
closeModal () {
|
|
|
|
closeModal () {
|
|
|
|
this.$store.dispatch('closeUserReportingModal')
|
|
|
|
this.$store.dispatch('closeUserReportingModal')
|
|
|
|
},
|
|
|
|
},
|
|
|
|
reportUser () {
|
|
|
|
reportUser () {
|
|
|
|
this.processing = true
|
|
|
|
this.processing = true
|
|
|
|
|
|
|
|
this.error = false
|
|
|
|
const params = {
|
|
|
|
const params = {
|
|
|
|
userId: this.userId,
|
|
|
|
userId: this.userId,
|
|
|
|
comment: this.comment,
|
|
|
|
comment: this.comment,
|
|
|
@ -63,6 +66,13 @@ const UserReportingModal = {
|
|
|
|
this.resetState()
|
|
|
|
this.resetState()
|
|
|
|
this.closeModal()
|
|
|
|
this.closeModal()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
|
|
this.processing = false
|
|
|
|
|
|
|
|
this.error = true
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
clearError () {
|
|
|
|
|
|
|
|
this.error = false
|
|
|
|
},
|
|
|
|
},
|
|
|
|
isChecked (statusId) {
|
|
|
|
isChecked (statusId) {
|
|
|
|
return this.statusIdsToReport.indexOf(statusId) !== -1
|
|
|
|
return this.statusIdsToReport.indexOf(statusId) !== -1
|
|
|
|