my-settings.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 :model="Preferences" :id="accessProfileStore.preferencesId">
  12. <template #default="{ entity : preferences }">
  13. <div v-if="preferences">
  14. <v-row>
  15. <v-col cols="12">
  16. <UiInputCheckbox
  17. v-model="preferences.messageReport"
  18. field="messageReport"
  19. label="allow_report_message"
  20. />
  21. </v-col>
  22. </v-row>
  23. </div>
  24. </template>
  25. </UiFormEdition>
  26. </v-row>
  27. </v-container>
  28. </UiExpansionPanel>
  29. </v-expansion-panels>
  30. </v-col>
  31. </LayoutContainer>
  32. </template>
  33. <script setup lang="ts">
  34. import type { Ref } from 'vue'
  35. import Preferences from '~/models/Access/Preferences'
  36. import { useAccessProfileStore } from '~/stores/accessProfile'
  37. definePageMeta({
  38. name: 'my_settings_page',
  39. })
  40. const accessProfileStore = useAccessProfileStore()
  41. if (accessProfileStore.preferencesId === null) {
  42. throw new Error("Missing access preference's id")
  43. }
  44. const openedPanels: Ref<Array<number>> = ref([0])
  45. </script>
  46. <style scoped lang="scss"></style>