From 5d0f5d11f8a92ed7325be1bc068e05edb14cc41b Mon Sep 17 00:00:00 2001 From: Aditya Patel Date: Thu, 30 Nov 2023 18:43:51 +0530 Subject: [PATCH] add operating hours --- src/components/AddOperatingHoursModal.vue | 55 +++-------------------- 1 file changed, 7 insertions(+), 48 deletions(-) diff --git a/src/components/AddOperatingHoursModal.vue b/src/components/AddOperatingHoursModal.vue index dad87292..ae7ddecc 100644 --- a/src/components/AddOperatingHoursModal.vue +++ b/src/components/AddOperatingHoursModal.vue @@ -20,52 +20,12 @@
- - - - -

{{ translate("Monday") }}

-
- {{ calendar.mondayStartTime ? getStartAndEndTime(calendar.mondayStartTime, calendar.mondayCapacity) : '-' }} -
- - -

{{ translate("Tuesday") }}

-
- {{ calendar.tuesdayStartTime ? getStartAndEndTime(calendar.tuesdayStartTime, calendar.tuesdayCapacity) : '-' }} -
- - -

{{ translate("Wednesday") }}

-
- {{ calendar.wednesdayStartTime ? getStartAndEndTime(calendar.wednesdayStartTime, calendar.wednesdayCapacity) : '-' }} -
- - -

{{ translate("Thursday") }}

-
- {{ calendar.thursdayStartTime ? getStartAndEndTime(calendar.thursdayStartTime, calendar.thursdayCapacity) : '-' }} -
- - -

{{ translate("Friday") }}

-
- {{ calendar.fridayStartTime ? getStartAndEndTime(calendar.fridayStartTime, calendar.fridayCapacity) : '-' }} -
- - -

{{ translate("Saturday") }}

-
- {{ calendar.saturdayStartTime ? getStartAndEndTime(calendar.saturdayStartTime, calendar.saturdayCapacity) : '-' }} -
- - -

{{ translate("Sunday") }}

-
- {{ calendar.sundayStartTime ? getStartAndEndTime(calendar.sundayStartTime, calendar.sundayCapacity) : '-' }} -
-
-
+ + +

{{ translate(day.charAt(0).toUpperCase() + day.slice(1)) }}

+ {{ calendar[day+'StartTime'] ? getStartAndEndTime(calendar[day+'StartTime'], calendar[day+'Capacity']) : '-' }} +
+
@@ -85,7 +45,6 @@ import { IonAccordionGroup, IonButton, IonButtons, - IonCard, IonContent, IonFab, IonFabButton, @@ -117,7 +76,6 @@ export default defineComponent({ IonAccordionGroup, IonButton, IonButtons, - IonCard, IonContent, IonFab, IonFabButton, @@ -133,6 +91,7 @@ export default defineComponent({ }, data() { return { + days: ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'], selectedCalendarId: '' as any } },