diff options
Diffstat (limited to 'src/components/report/report.js')
| -rw-r--r-- | src/components/report/report.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/components/report/report.js b/src/components/report/report.js index 8131dd89..4d9108af 100644 --- a/src/components/report/report.js +++ b/src/components/report/report.js @@ -13,14 +13,19 @@ const Report = { computed: { report () { return this.$store.state.reports.reports[this.reportId] || {} + }, + state: { + get: function () { return this.report.state }, + set: function (val) { this.setReportState(val) } } }, methods: { generateUserProfileLink (user) { return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames) }, - setReportState (id, state) { - return this.$store.dispatch('setReportState', { id, state }) + setReportState (state) { + console.log('setting state', state) + return this.$store.dispatch('setReportState', { id: this.report.id, state }) } } } |
