You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.2 KiB

  1. <template>
  2. <div style="display:inline;">
  3. <v-tooltip bottom>
  4. <template v-slot:activator="{ on }">
  5. <v-btn
  6. v-on="on"
  7. @click="dialog=true"
  8. class="text-capitalize ps-1 pe-1"
  9. min-width="36"
  10. outlined
  11. >
  12. <v-icon>
  13. mdi-book-open-outline
  14. </v-icon>
  15. </v-btn>
  16. </template>
  17. <span>Show guideline</span>
  18. </v-tooltip>
  19. <base-dialog :dialog="dialog">
  20. <guideline-card
  21. v-if="currentProject"
  22. :guideline-text="currentProject.guideline"
  23. @close="dialog=false"
  24. />
  25. </base-dialog>
  26. </div>
  27. </template>
  28. <script>
  29. import { mapActions, mapGetters } from 'vuex'
  30. import BaseDialog from '@/components/molecules/BaseDialog'
  31. import GuidelineCard from '@/components/organisms/annotation/GuidelineCard'
  32. export default {
  33. components: {
  34. BaseDialog,
  35. GuidelineCard
  36. },
  37. data() {
  38. return {
  39. dialog: false
  40. }
  41. },
  42. computed: {
  43. ...mapGetters('projects', ['currentProject'])
  44. },
  45. created() {
  46. this.setCurrentProject(this.$route.params.id)
  47. },
  48. methods: {
  49. ...mapActions('projects', ['setCurrentProject'])
  50. }
  51. }
  52. </script>