Olivier Massot 8 月之前
父節點
當前提交
c21cc101f3
共有 2 個文件被更改,包括 29 次插入29 次删除
  1. 28 28
      components/Ui/DatePicker.vue
  2. 1 1
      components/Ui/Input/Autocomplete/Accesses.vue

+ 28 - 28
components/Ui/DatePicker.vue

@@ -7,35 +7,35 @@ Sélecteur de dates
 <template>
   <div class="date-picker">
     <VueDatePicker
-        :model-value="modelValue"
-        :locale="locale"
-        :format="dateFormatPattern"
-        :format-locale="fnsLocale"
-        :range="range"
-        :multi-calendars="range"
-        :enable-time-picker="withTimePicker"
-        :auto-apply="autoApply"
-        :auto-position="true"
-        :start-date="today"
-        close-on-scroll
-        text-input
-        :readonly="readonly"
-        position="left"
-        :teleport="true"
-        :select-text="$t('select')"
-        :cancel-text="$t('cancel')"
-        input-class-name="date-picker-input"
-        @update:model-value="$emit('update:modelValue', $event)"
-        class="mb-6"
-      />
+      :model-value="modelValue"
+      :locale="locale"
+      :format="dateFormatPattern"
+      :format-locale="fnsLocale"
+      :range="range"
+      :multi-calendars="range"
+      :enable-time-picker="withTimePicker"
+      :auto-apply="autoApply"
+      :auto-position="true"
+      :start-date="today"
+      close-on-scroll
+      text-input
+      :readonly="readonly"
+      position="left"
+      :teleport="true"
+      :select-text="$t('select')"
+      :cancel-text="$t('cancel')"
+      input-class-name="date-picker-input"
+      @update:model-value="$emit('update:modelValue', $event)"
+      class="mb-6"
+    />
   </div>
 </template>
 
 <script setup lang="ts">
 import { useI18n } from 'vue-i18n'
 import DateUtils, { supportedLocales } from '~/services/utils/dateUtils'
-import type { PropType } from '@vue/runtime-core';
-import type { Locale } from 'date-fns';
+import type { PropType } from '@vue/runtime-core'
+import type { Locale } from 'date-fns'
 
 const props = defineProps({
   modelValue: {
@@ -58,19 +58,19 @@ const props = defineProps({
   readonly: {
     type: Boolean,
     default: false,
-  }
+  },
 })
 
 const i18n = useI18n()
 
 const locale: Ref<string> = i18n.locale
 
-const fnsLocale: ComputedRef<Locale> = computed(
-  () => DateUtils.getFnsLocale(locale.value as supportedLocales)
+const fnsLocale: ComputedRef<Locale> = computed(() =>
+  DateUtils.getFnsLocale(locale.value as supportedLocales),
 )
 
-const dateFormatPattern: ComputedRef<string> = computed(
-  () => DateUtils.getShortFormatPattern(locale.value as supportedLocales)
+const dateFormatPattern: ComputedRef<string> = computed(() =>
+  DateUtils.getShortFormatPattern(locale.value as supportedLocales),
 )
 
 const today = new Date()

+ 1 - 1
components/Ui/Input/Autocomplete/Accesses.vue

@@ -23,7 +23,7 @@ Champs autocomplete dédié à la recherche des Accesses d'une structure
       :variant="variant"
       @update:model-value="onUpdateModelValue"
       @update:search="onUpdateSearch"
-      :class="(pending || pageStore.loading) ? 'hide-selection' : ''"
+      :class="pending || pageStore.loading ? 'hide-selection' : ''"
     />
   </main>
 </template>