General.vue 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <LayoutContainer>
  3. <UiLoadingPanel v-if="pending" />
  4. <UiForm
  5. v-else
  6. :model="Parameters"
  7. :entity="parameters"
  8. >
  9. <v-row>
  10. <v-col cols="6">
  11. <UiInputDatePicker
  12. v-model="parameters.financialDate"
  13. field="financialDate"
  14. label="start_date_of_financial_season"
  15. />
  16. </v-col>
  17. <v-col cols="6">
  18. <UiInputDatePicker
  19. v-model="parameters.musicalDate"
  20. field="musicalDate"
  21. label="start_date_of_activity_season"
  22. />
  23. </v-col>
  24. </v-row>
  25. <v-row>
  26. <v-col cols="6">
  27. <UiInputDatePicker
  28. v-model="parameters.startCourseDate"
  29. field="startCourseDate"
  30. label="start_date_of_courses"
  31. />
  32. </v-col>
  33. <v-col cols="6">
  34. <UiInputDatePicker
  35. v-model="parameters.endCourseDate"
  36. field="endCourseDate"
  37. label="end_date_of_courses"
  38. />
  39. </v-col>
  40. </v-row>
  41. <v-row>
  42. <v-col cols="6">
  43. <UiInputCheckbox
  44. v-model="parameters.showAdherentList"
  45. field="showAdherentList"
  46. label="show_adherents_list_and_their_coordinates"
  47. />
  48. </v-col>
  49. <v-col cols="6">
  50. <UiInputCheckbox
  51. v-model="parameters.studentsAreAdherents"
  52. field="studentsAreAdherents"
  53. label="students_are_also_association_members"
  54. />
  55. </v-col>
  56. </v-row>
  57. <v-row>
  58. <UiInputCombobox
  59. v-model="parameters.timezone"
  60. field="timezone"
  61. :items="['Europe/Paris', 'Europe/Zurich', 'Indian/Reunion']"
  62. />
  63. </v-row>
  64. </UiForm>
  65. </LayoutContainer>
  66. </template>
  67. <script setup lang="ts">
  68. import Parameters from "~/models/Organization/Parameters";
  69. import {useEntityFetch} from "~/composables/data/useEntityFetch";
  70. import {useOrganizationProfileStore} from "~/stores/organizationProfile";
  71. import {AsyncData} from "#app";
  72. const { fetch } = useEntityFetch()
  73. const organizationProfile = useOrganizationProfileStore()
  74. if (organizationProfile.parametersId === null) {
  75. throw new Error('Missing organization parameters id')
  76. }
  77. const { data: parameters, pending } = fetch(Parameters, organizationProfile.parametersId) as AsyncData<Parameters, Parameters | true>
  78. </script>
  79. <style scoped lang="scss">
  80. </style>