IssuesModal.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <modal title="Report">
  3. <div slot="body">
  4. <article class="message">
  5. <div class="message-body">
  6. <strong>Song ID:</strong>
  7. {{ $parent.editing.songId }}
  8. <br />
  9. <strong>Created By:</strong>
  10. {{ $parent.editing.createdBy }}
  11. <br />
  12. <strong>Created At:</strong>
  13. {{ $parent.editing.createdAt }}
  14. <br />
  15. <span v-if="$parent.editing.description">
  16. <strong>Description:</strong>
  17. {{ $parent.editing.description }}
  18. </span>
  19. </div>
  20. </article>
  21. <table class="table is-narrow" v-if="$parent.editing.issues.length > 0">
  22. <thead>
  23. <tr>
  24. <td>Issue</td>
  25. <td>Reasons</td>
  26. </tr>
  27. </thead>
  28. <tbody>
  29. <tr v-for="(issue, index) in $parent.editing.issues" :key="index">
  30. <td>
  31. <span>{{ issue.name }}</span>
  32. </td>
  33. <td>
  34. <span>{{ issue.reasons }}</span>
  35. </td>
  36. </tr>
  37. </tbody>
  38. </table>
  39. </div>
  40. <div slot="footer">
  41. <a class="button is-primary" v-on:click="$parent.resolve($parent.editing._id)" href="#">
  42. <span>Resolve</span>
  43. </a>
  44. <a class="button is-danger" v-on:click="$parent.toggleModal()" href="#">
  45. <span>Cancel</span>
  46. </a>
  47. </div>
  48. </modal>
  49. </template>
  50. <script>
  51. import Modal from "./Modal.vue";
  52. export default {
  53. components: { Modal },
  54. events: {
  55. closeModal: function() {
  56. this.$parent.modals.report = false;
  57. }
  58. }
  59. };
  60. </script>