Subheader.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <!--
  2. Second header de l'application
  3. Contient entre autres le breadcrumb, les commandes de changement d'année et les listes personnalisées
  4. -->
  5. <template>
  6. <main>
  7. <v-card
  8. id="subheader"
  9. class="d-flex theme-neutral text-body-2 px-2"
  10. flat
  11. rounded="0"
  12. >
  13. <LayoutSubHeaderBreadcrumbs v-if="lgAndUp" class="mr-auto d-flex" />
  14. <span class="flex-fill" />
  15. <v-card
  16. class="d-flex flex-row align-center mr-6"
  17. flat
  18. tile
  19. >
  20. <LayoutSubHeaderActivityYear v-if="smAndUp && !showDateTimeRange" class="activity-year" />
  21. <div v-if="hasMenuOrIsTeacher" class="d-flex flex-row">
  22. <LayoutSubHeaderDataTiming v-if="smAndUp && !showDateTimeRange" class="data-timing ml-2" />
  23. <LayoutSubHeaderDataTimingRange v-if="smAndUp" class="data-timing-range ml-n1" @showDateTimeRange="showDateTimeRange=$event" />
  24. <LayoutSubHeaderPersonnalizedList class="personalized-list ml-2 d-flex align-center" />
  25. </div>
  26. </v-card>
  27. </v-card>
  28. </main>
  29. </template>
  30. <script setup lang="ts">
  31. import {useAccessProfileStore} from "~/stores/accessProfile";
  32. import {computed, ComputedRef, ref, Ref} from "@vue/reactivity";
  33. import {useMenu} from "~/composables/layout/useMenu";
  34. import {useDisplay} from "vuetify";
  35. const { smAndUp, mdAndUp, lgAndUp } = useDisplay()
  36. const accessProfile = useAccessProfileStore()
  37. const { hasMenu } = useMenu()
  38. const hasMenuOrIsTeacher: ComputedRef<boolean> = computed(
  39. () => hasMenu('Main') || (accessProfile.isTeacher ?? false)
  40. )
  41. const showDateTimeRange: Ref<boolean> = ref(false)
  42. </script>
  43. <style scoped lang="scss">
  44. main {
  45. font-size: 12px;
  46. }
  47. #subheader {
  48. max-height: 36px;
  49. }
  50. :deep(#subheader .v-card) {
  51. max-height: 36px;
  52. background-color: transparent !important;
  53. }
  54. </style>