IssuesModal.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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
  22. v-if="$parent.editing.issues.length > 0"
  23. class="table is-narrow"
  24. >
  25. <thead>
  26. <tr>
  27. <td>Issue</td>
  28. <td>Reasons</td>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. <tr
  33. v-for="(issue, index) in $parent.editing.issues"
  34. :key="index"
  35. >
  36. <td>
  37. <span>{{ issue.name }}</span>
  38. </td>
  39. <td>
  40. <span>{{ issue.reasons }}</span>
  41. </td>
  42. </tr>
  43. </tbody>
  44. </table>
  45. </div>
  46. <div slot="footer">
  47. <a
  48. class="button is-primary"
  49. href="#"
  50. @click="$parent.resolve($parent.editing._id)"
  51. >
  52. <span>Resolve</span>
  53. </a>
  54. <a class="button is-danger" @click="$parent.toggleModal()" href="#">
  55. <span>Cancel</span>
  56. </a>
  57. </div>
  58. </modal>
  59. </template>
  60. <script>
  61. import Modal from "./Modal.vue";
  62. export default {
  63. components: { Modal },
  64. events: {
  65. closeModal: function() {
  66. this.$parent.modals.report = false;
  67. }
  68. }
  69. };
  70. </script>