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.

102 lines
2.4 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 v-if="currentDoc">
  26. <approve-button :approved="approved" />
  27. <filter-button />
  28. <guideline-button />
  29. </v-col>
  30. <v-spacer />
  31. <v-col>
  32. <paginator />
  33. </v-col>
  34. </v-row>
  35. <v-row justify="center">
  36. <v-col cols="12" md="9">
  37. <nuxt />
  38. </v-col>
  39. <v-col cols="12" md="3">
  40. <metadata-box
  41. v-if="currentDoc"
  42. :metadata="JSON.parse(currentDoc.meta)"
  43. />
  44. </v-col>
  45. </v-row>
  46. </v-container>
  47. </v-content>
  48. <bottom-navigator class="d-flex d-sm-none" />
  49. </v-app>
  50. </template>
  51. <script>
  52. import { mapActions, mapGetters } from 'vuex'
  53. import TheSideBar from '~/components/organisms/layout/TheSideBar'
  54. import TheHeader from '~/components/organisms/layout/TheHeader'
  55. import BottomNavigator from '@/components/containers/annotation/BottomNavigator'
  56. import Paginator from '~/components/containers/annotation/Paginator'
  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. export default {
  62. middleware: ['check-auth', 'auth'],
  63. components: {
  64. TheSideBar,
  65. TheHeader,
  66. BottomNavigator,
  67. Paginator,
  68. GuidelineButton,
  69. FilterButton,
  70. ApproveButton,
  71. MetadataBox
  72. },
  73. data() {
  74. return {
  75. drawerLeft: false
  76. }
  77. },
  78. computed: {
  79. ...mapGetters('projects', ['getLink', 'getCurrentUserRole']),
  80. ...mapGetters('documents', ['currentDoc', 'approved'])
  81. },
  82. created() {
  83. this.setCurrentProject(this.$route.params.id)
  84. },
  85. methods: {
  86. ...mapActions('projects', ['setCurrentProject'])
  87. },
  88. validate({ params }) {
  89. return /^\d+$/.test(params.id)
  90. }
  91. }
  92. </script>