From aebf65405b19a972b187fc56f3ff2f48877c8260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Viricel?= Date: Tue, 22 Oct 2024 19:41:24 +0200 Subject: [PATCH] refactor: apply script setup style to openg hour #353 --- components/Fields/Field.vue | 3 +- components/Fields/OpeningHours.vue | 318 +++++++++++++---------------- composables/useOpeningHours.ts | 21 ++ 3 files changed, 160 insertions(+), 182 deletions(-) create mode 100644 composables/useOpeningHours.ts diff --git a/components/Fields/Field.vue b/components/Fields/Field.vue index 7eee6309..807af690 100644 --- a/components/Fields/Field.vue +++ b/components/Fields/Field.vue @@ -10,7 +10,8 @@ import DateRange, { isDateRangeEmpty } from '~/components/Fields/DateRange.vue' import Facebook from '~/components/Fields/Facebook.vue' import LinkedIn from '~/components/Fields/LinkedIn.vue' import Instagram from '~/components/Fields/Instagram.vue' -import OpeningHours, { isOpeningHoursSupportedOsmTags } from '~/components/Fields/OpeningHours.vue' +import OpeningHours from '~/components/Fields/OpeningHours.vue' +import { isOpeningHoursSupportedOsmTags } from '~/composables/useOpeningHours' import Phone from '~/components/Fields/Phone.vue' import RoutesField from '~/components/Fields/RoutesField.vue' import Stars from '~/components/Fields/Stars.vue' diff --git a/components/Fields/OpeningHours.vue b/components/Fields/OpeningHours.vue index 7909a4fe..b178d148 100644 --- a/components/Fields/OpeningHours.vue +++ b/components/Fields/OpeningHours.vue @@ -1,193 +1,149 @@ -