| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <template>
- <NuxtLayout name="parameters">
- <LayoutContainer>
- <UiLoadingPanel v-if="pending" />
- <UiForm
- v-else
- :model="Parameters"
- :entity="parameters"
- >
- <v-row>
- <v-col cols="6">
- <UiInputDatePicker
- v-if="organizationProfile.isSchool"
- v-model="parameters.financialDate"
- field="financialDate"
- label="start_date_of_financial_season"
- class="my-2"
- />
- <UiInputDatePicker
- v-if="organizationProfile.isSchool"
- v-model="parameters.startCourseDate"
- field="startCourseDate"
- label="start_date_of_courses"
- class="my-2"
- />
- <UiInputCheckbox
- v-model="parameters.showAdherentList"
- field="showAdherentList"
- label="show_adherents_list_and_their_coordinates"
- />
- <UiInputAutocompleteWithEnum
- v-model="parameters.timezone"
- enum-name="timezone"
- field="timezone"
- />
- </v-col>
- <v-col cols="6">
- <UiInputDatePicker
- v-if="organizationProfile.isSchool"
- v-model="parameters.musicalDate"
- field="musicalDate"
- label="start_date_of_activity_season"
- class="my-2"
- />
- <UiInputDatePicker
- v-if="organizationProfile.isSchool"
- v-model="parameters.endCourseDate"
- field="endCourseDate"
- label="end_date_of_courses"
- class="my-2"
- />
- <UiInputCheckbox
- v-if="organizationProfile.isSchool && organizationProfile.isAssociation"
- v-model="parameters.studentsAreAdherents"
- field="studentsAreAdherents"
- label="students_are_also_association_members"
- />
- <!-- TODO: reprendre l'UiInput -->
- <UiInputImage
- v-model="parameters['qrCode_id']"
- field="qrCode_id"
- label="licenceQrCode"
- />
- </v-col>
- </v-row>
- </UiForm>
- </LayoutContainer>
- </NuxtLayout>
- </template>
- <script setup lang="ts">
- import Parameters from "~/models/Organization/Parameters";
- import {useEntityFetch} from "~/composables/data/useEntityFetch";
- import {useOrganizationProfileStore} from "~/stores/organizationProfile";
- import {AsyncData} from "#app";
- /**
- * Disable the default layout, the page will use the layout defined with <NuxtLayout />
- * @see https://nuxt.com/docs/guide/directory-structure/layouts#overriding-a-layout-on-a-per-page-basis
- */
- definePageMeta({
- layout: false,
- });
- const { fetch } = useEntityFetch()
- const organizationProfile = useOrganizationProfileStore()
- if (organizationProfile.parametersId === null) {
- throw new Error('Missing organization parameters id')
- }
- const { data: parameters, pending } = fetch(Parameters, organizationProfile.parametersId) as AsyncData<Parameters, Parameters | true>
- </script>
|