general_parameters.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <LayoutContainer>
  3. <h3>{{ $t("parameters_general_page")}}</h3>
  4. <UiLoadingPanel v-if="pending" />
  5. <UiForm
  6. v-else-if="parameters !== null"
  7. v-model="parameters"
  8. >
  9. <v-row>
  10. <v-col cols="12">
  11. <UiInputDatePicker
  12. v-if="organizationProfile.isSchool"
  13. v-model="parameters.financialDate"
  14. field="financialDate"
  15. label="start_date_of_financial_season"
  16. position="left"
  17. class="my-2"
  18. />
  19. <UiInputDatePicker
  20. v-if="organizationProfile.isSchool"
  21. v-model="parameters.musicalDate"
  22. field="musicalDate"
  23. label="start_date_of_activity_season"
  24. position="left"
  25. class="my-2"
  26. />
  27. <UiInputDatePicker
  28. v-if="organizationProfile.isSchool"
  29. v-model="parameters.startCourseDate"
  30. field="startCourseDate"
  31. label="start_date_of_courses"
  32. position="left"
  33. class="my-2"
  34. />
  35. <UiInputDatePicker
  36. v-if="organizationProfile.isSchool"
  37. v-model="parameters.endCourseDate"
  38. field="endCourseDate"
  39. label="end_date_of_courses"
  40. position="left"
  41. class="my-2"
  42. />
  43. <UiInputAutocompleteWithEnum
  44. v-model="parameters.timezone"
  45. enum-name="timezone"
  46. field="timezone"
  47. />
  48. <UiInputCheckbox
  49. v-model="parameters.showAdherentList"
  50. field="showAdherentList"
  51. label="show_adherents_list_and_their_coordinates"
  52. />
  53. <UiInputCheckbox
  54. v-if="
  55. organizationProfile.isSchool && organizationProfile.isAssociation
  56. "
  57. v-model="parameters.studentsAreAdherents"
  58. field="studentsAreAdherents"
  59. label="students_are_also_association_members"
  60. />
  61. <div
  62. v-if="organizationProfile.isCMFCentralService"
  63. class="d-flex flex-column"
  64. >
  65. <span class="mb-1 v-label" style="font-size: 12px"
  66. >{{ $t('qrCode') }}
  67. </span>
  68. <UiInputImage
  69. v-model="parameters.qrCode"
  70. field="qrCode"
  71. label="licenceQrCode"
  72. :width="120"
  73. />
  74. </div>
  75. </v-col>
  76. </v-row>
  77. </UiForm>
  78. </LayoutContainer>
  79. </template>
  80. <script setup lang="ts">
  81. import Parameters from '~/models/Organization/Parameters'
  82. import { useEntityFetch } from '~/composables/data/useEntityFetch'
  83. import { useOrganizationProfileStore } from '~/stores/organizationProfile'
  84. definePageMeta({
  85. name: 'parameters_general_page',
  86. })
  87. const { fetch } = useEntityFetch()
  88. const organizationProfile = useOrganizationProfileStore()
  89. if (organizationProfile.parametersId === null) {
  90. throw new Error('Missing organization parameters id')
  91. }
  92. const { data: parameters, pending } = fetch(
  93. Parameters,
  94. organizationProfile.parametersId,
  95. )
  96. </script>
  97. <style scoped lang="scss"></style>