Browse Source

feat: added button on issues modal to open song modal

Kristian Vos 5 years ago
parent
commit
fa288b0e7b
2 changed files with 10 additions and 3 deletions
  1. 2 2
      frontend/components/Admin/Songs.vue
  2. 8 1
      frontend/components/Modals/IssuesModal.vue

+ 2 - 2
frontend/components/Admin/Songs.vue

@@ -189,8 +189,8 @@ export default {
 			});
 		});
 
-		if (this.$route.query.id) {
-			this.socket.emit("songs.getSong", this.$route.query.id, res => {
+		if (this.$route.query.songId) {
+			this.socket.emit("songs.getSong", this.$route.query.songId, res => {
 				if (res.status === "success") {
 					this.edit(res.data);
 					this.closeModal({ sector: "admin", modal: "viewReport" });

+ 8 - 1
frontend/components/Modals/IssuesModal.vue

@@ -15,7 +15,7 @@
 			<article class="message">
 				<div class="message-body">
 					<strong>Song ID:</strong>
-					{{ report.songId }}
+					{{ report.song.songId }} / {{ report.song._id }}
 					<br />
 					<strong>Created By:</strong>
 					{{ report.createdBy }}
@@ -56,6 +56,13 @@
 			>
 				<span>Resolve</span>
 			</a>
+			<a
+				class="button is-primary"
+				:href="`/admin/songs?songId=${report.song.songId}`"
+				target="_blank"
+			>
+				<span>Go to song</span>
+			</a>
 			<a
 				class="button is-danger"
 				@click="