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.

105 lines
2.5 KiB

  1. <template>
  2. <v-app>
  3. <the-header>
  4. <template #leftDrawerIcon>
  5. <v-app-bar-nav-icon @click="drawerLeft = !drawerLeft" />
  6. </template>
  7. </the-header>
  8. <v-navigation-drawer
  9. v-model="drawerLeft"
  10. app
  11. clipped
  12. color=""
  13. >
  14. <the-side-bar
  15. :link="getLink"
  16. :role="getCurrentUserRole"
  17. />
  18. </v-navigation-drawer>
  19. <v-content>
  20. <v-container fluid>
  21. <v-row
  22. no-gutters
  23. class="d-none d-sm-flex"
  24. >
  25. <v-col>
  26. <approve-button
  27. :approved="approved"
  28. :disabled="currentDoc ? false : true"
  29. />
  30. <filter-button />
  31. <guideline-button />
  32. </v-col>
  33. <v-spacer />
  34. <v-col>
  35. <paginator />
  36. </v-col>
  37. </v-row>
  38. <v-row justify="center">
  39. <v-col cols="12" md="9">
  40. <nuxt />
  41. </v-col>
  42. <v-col cols="12" md="3">
  43. <metadata-box
  44. v-if="currentDoc"
  45. :metadata="JSON.parse(currentDoc.meta)"
  46. />
  47. </v-col>
  48. </v-row>
  49. </v-container>
  50. </v-content>
  51. <bottom-navigator class="d-flex d-sm-none" />
  52. </v-app>
  53. </template>
  54. <script>
  55. import { mapActions, mapGetters } from 'vuex'
  56. import BottomNavigator from '@/components/containers/annotation/BottomNavigator'
  57. import GuidelineButton from '@/components/containers/annotation/GuidelineButton'
  58. import MetadataBox from '@/components/organisms/annotation/MetadataBox'
  59. import FilterButton from '@/components/containers/annotation/FilterButton'
  60. import ApproveButton from '@/components/containers/annotation/ApproveButton'
  61. import Paginator from '~/components/containers/annotation/Paginator'
  62. import TheHeader from '~/components/organisms/layout/TheHeader'
  63. import TheSideBar from '~/components/organisms/layout/TheSideBar'
  64. export default {
  65. middleware: ['check-auth', 'auth'],
  66. components: {
  67. TheSideBar,
  68. TheHeader,
  69. BottomNavigator,
  70. Paginator,
  71. GuidelineButton,
  72. FilterButton,
  73. ApproveButton,
  74. MetadataBox
  75. },
  76. data() {
  77. return {
  78. drawerLeft: null
  79. }
  80. },
  81. computed: {
  82. ...mapGetters('projects', ['getLink', 'getCurrentUserRole']),
  83. ...mapGetters('documents', ['currentDoc', 'approved'])
  84. },
  85. created() {
  86. this.setCurrentProject(this.$route.params.id)
  87. },
  88. methods: {
  89. ...mapActions('projects', ['setCurrentProject'])
  90. },
  91. validate({ params }) {
  92. return /^\d+$/.test(params.id)
  93. }
  94. }
  95. </script>