Subheader.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <main>
  3. <v-card
  4. v-if="displayedSubHeader"
  5. class="d-none d-sm-none d-md-flex ot_super_light_grey text-body-2"
  6. flat
  7. tile
  8. >
  9. <LayoutBreadcrumbs class="mr-auto"></LayoutBreadcrumbs>
  10. <v-card
  11. class="d-md-flex ot_super_light_grey pt-2 mr-6 align-baseline"
  12. flat
  13. tile
  14. >
  15. <LayoutActivityYear v-if="!showDateTimeRange"></LayoutActivityYear>
  16. <LayoutDataTiming v-if="!showDateTimeRange" class="ml-2"></LayoutDataTiming>
  17. <LayoutDataTimingRange class="ml-n1" v-on:showDateTimeRange="showDateTimeRange=$event"></LayoutDataTimingRange>
  18. </v-card>
  19. </v-card>
  20. </main>
  21. </template>
  22. <script lang="ts">
  23. import {computed, defineComponent, useContext, ref, Ref, ComputedRef} from '@nuxtjs/composition-api'
  24. export default defineComponent({
  25. setup() {
  26. const {store} = useContext()
  27. const showDateTimeRange:Ref<boolean> = ref(false)
  28. const displayedSubHeader:ComputedRef<boolean> = computed(()=>store.state.profile.access.hasLateralMenu || store.state.profile.access.isTeacher)
  29. return {
  30. displayedSubHeader,
  31. showDateTimeRange
  32. }
  33. }
  34. })
  35. </script>
  36. <style scoped>
  37. </style>