fix changing reported status on same user

This commit is contained in:
Shpuld Shpuldson 2021-01-12 14:55:31 +02:00
parent 65dbf7b85d
commit 0ee0551a47
2 changed files with 9 additions and 3 deletions

View file

@ -38,17 +38,23 @@ const UserReportingModal = {
},
statuses () {
return this.$store.state.reports.statuses
},
preTickedIds () {
return this.$store.state.reports.preTickedIds
}
},
watch: {
userId: 'resetState'
userId: 'resetState',
preTickedIds (newValue) {
this.statusIdsToReport = newValue
}
},
methods: {
resetState () {
// Reset state
this.comment = ''
this.forward = false
this.statusIdsToReport = this.$store.state.reports.preTickedIds
this.statusIdsToReport = this.preTickedIds
this.processing = false
this.error = false
},

View file

@ -4,7 +4,7 @@ const reports = {
state: {
userId: null,
statuses: [],
preTicked: [],
preTickedIds: [],
modalActivated: false
},
mutations: {