diff --git a/front/src/components/manage/moderation/ReportCard.vue b/front/src/components/manage/moderation/ReportCard.vue
index bbf475b88..f2bf1d923 100644
--- a/front/src/components/manage/moderation/ReportCard.vue
+++ b/front/src/components/manage/moderation/ReportCard.vue
@@ -82,6 +82,15 @@
N/A
+
+ |
+ Moderator notes
+ |
+
+
+ {{ obj.notes.length }}
+ |
+
@@ -102,19 +111,22 @@
Reported object
-
+
+ The object associated with this report was deleted.
+
+
Open in moderation interface
-
+
|
Type
|
-
- {{ configs[obj.target.type].label }}
+
+ {{ configs[target.type].label }}
|
@@ -210,26 +222,29 @@ export default {
return this.currentState
},
detailUrl () {
- if (!this.obj.target) {
+ if (!this.target) {
return ''
}
let namespace
- let id = this.obj.target.id
- if (this.obj.target.type === 'track') {
+ let id = this.target.id
+ if (this.target.type === 'track') {
namespace = 'library.tracks.edit.detail'
}
- if (this.obj.target.type === 'album') {
+ if (this.target.type === 'album') {
namespace = 'library.albums.edit.detail'
}
- if (this.obj.target.type === 'artist') {
+ if (this.target.type === 'artist') {
namespace = 'library.artists.edit.detail'
}
return this.$router.resolve({name: namespace, params: {id, editId: this.obj.uuid}}).href
},
targetFields () {
+ if (!this.target) {
+ return []
+ }
let payload = this.obj.target_state
- let fields = this.configs[this.obj.target.type].moderatedFields
+ let fields = this.configs[this.target.type].moderatedFields
let self = this
return fields.map((fieldConfig) => {
let dummyRepr = (v) => { return v }
@@ -242,6 +257,13 @@ export default {
}
return d
})
+ },
+ target () {
+ if (this.obj.target) {
+ return this.obj.target
+ } else {
+ return this.obj.target_state._target
+ }
}
},
methods: {