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 () { statuses () {
return this.$store.state.reports.statuses return this.$store.state.reports.statuses
},
preTickedIds () {
return this.$store.state.reports.preTickedIds
} }
}, },
watch: { watch: {
userId: 'resetState' userId: 'resetState',
preTickedIds (newValue) {
this.statusIdsToReport = newValue
}
}, },
methods: { methods: {
resetState () { resetState () {
// Reset state // Reset state
this.comment = '' this.comment = ''
this.forward = false this.forward = false
this.statusIdsToReport = this.$store.state.reports.preTickedIds this.statusIdsToReport = this.preTickedIds
this.processing = false this.processing = false
this.error = false this.error = false
}, },

View file

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