my-settings.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!--
  2. Page 'Mes préférences'
  3. -->
  4. <template>
  5. <LayoutContainer>
  6. <v-col cols="12" sm="12" md="12">
  7. <v-expansion-panels v-model="openedPanels" :multiple="true">
  8. <UiExpansionPanel title="message_settings" icon="fas fa-inbox">
  9. <v-container fluid class="container">
  10. <v-row>
  11. <UiFormEdition
  12. :id="accessProfileStore.preferencesId"
  13. :model="Preferences"
  14. >
  15. <template #default="{ entity: preferences }">
  16. <div v-if="preferences">
  17. <v-row>
  18. <v-col cols="12">
  19. <UiInputCheckbox
  20. v-model="preferences.messageReport"
  21. field="messageReport"
  22. label="allow_report_message"
  23. />
  24. </v-col>
  25. </v-row>
  26. </div>
  27. </template>
  28. </UiFormEdition>
  29. </v-row>
  30. </v-container>
  31. </UiExpansionPanel>
  32. </v-expansion-panels>
  33. </v-col>
  34. </LayoutContainer>
  35. </template>
  36. <script setup lang="ts">
  37. import type { Ref } from 'vue'
  38. import Preferences from '~/models/Access/Preferences'
  39. import { useAccessProfileStore } from '~/stores/accessProfile'
  40. definePageMeta({
  41. name: 'my_settings_page',
  42. })
  43. const accessProfileStore = useAccessProfileStore()
  44. if (accessProfileStore.preferencesId === null) {
  45. throw new Error("Missing access preference's id")
  46. }
  47. const openedPanels: Ref<Array<number>> = ref([0])
  48. </script>
  49. <style scoped lang="scss"></style>