Refactor imports in time booking components for improved clarity and performance
This commit is contained in:
+2
-4
@@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import { ref, computed, watch } from "vue";
|
||||
import {computed, ref} from "vue";
|
||||
|
||||
/** Time & Date */
|
||||
const week_opening_hours = ref({
|
||||
@@ -106,9 +106,8 @@ const generateDefaultSlots = (day = null) => {
|
||||
}
|
||||
slots.push(new Date(time));
|
||||
}
|
||||
let result = [];
|
||||
// Assign the generated slots to debug_slots
|
||||
result = slots.map(slot => {
|
||||
return slots.map(slot => {
|
||||
return {
|
||||
date: slot,
|
||||
isAvailable: true, // At this stage, all slots are available, this is done to generate the grid
|
||||
@@ -117,7 +116,6 @@ const generateDefaultSlots = (day = null) => {
|
||||
}
|
||||
};
|
||||
});
|
||||
return result;
|
||||
};
|
||||
const reservation_slots = ref([]); // This will hold the booked slots
|
||||
const addReservation = (slotDate, duration = time_slot_duration) => {
|
||||
|
||||
-1
@@ -3,7 +3,6 @@ import { SessionUser } from '@/components/session/token/SessionUser.vue';
|
||||
import TimeBookingsNewSummaryLine
|
||||
from "@/views/dashboards/departmentDashboard/modules/time-bookings/book/displays/TimeBookingsNewSummaryLine.vue";
|
||||
import { timeBookingsNewProcess } from "@/views/dashboards/departmentDashboard/modules/time-bookings/book/TimeBookingsNewProcess.vue";
|
||||
import {ref, computed} from "vue";
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
+1
-4
@@ -1,9 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import {defineProps, defineEmits, ref, watch} from 'vue';
|
||||
import { ref, watch } from 'vue';
|
||||
import { timeBookingsNewScheduler } from '@/views/dashboards/departmentDashboard/modules/time-bookings/book/TimeBookingsNewScheduler.vue';
|
||||
import { SessionUser } from '@/components/session/token/SessionUser.vue';
|
||||
import ButtonsBox from "@/components/displays/boxes/ButtonsBox.vue";
|
||||
|
||||
const date = ref();
|
||||
// Set the initial date to the current date YYYY-MM-DD format
|
||||
const formatDate = (date_input) => {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { timeBookingsNewScheduler } from '../../TimeBookingsNewScheduler.vue';
|
||||
import { defineProps, ref, computed, defineEmits } from 'vue';
|
||||
import { defineProps, defineEmits } from 'vue';
|
||||
import { SessionUser } from '@/components/session/token/SessionUser.vue';
|
||||
|
||||
const props = defineProps({
|
||||
|
||||
-4
@@ -1,15 +1,11 @@
|
||||
<script setup>
|
||||
import ConfigurationSelect from "@/components/displays/superuser/configuration/ConfigurationSelect.vue";
|
||||
import {SessionUser} from "@/components/session/token/SessionUser.vue";
|
||||
import {defineEmits, defineProps, ref, watch} from "vue";
|
||||
import ConfigurationSwitch from "@/components/displays/superuser/configuration/ConfigurationSwitch.vue";
|
||||
import { timeBookingsNewScheduler } from "@/views/dashboards/departmentDashboard/modules/time-bookings/book/TimeBookingsNewScheduler.vue";
|
||||
import TimeBookingsNewGridLabel
|
||||
from "@/views/dashboards/departmentDashboard/modules/time-bookings/book/displays/grid/TimeBookingsNewGridLabel.vue";
|
||||
import TimeBookingsNewGridSlot
|
||||
from "@/views/dashboards/departmentDashboard/modules/time-bookings/book/displays/grid/TimeBookingsNewGridSlot.vue";
|
||||
import TimeBookingsNewControls
|
||||
from "@/views/dashboards/departmentDashboard/modules/time-bookings/book/displays/TimeBookingsNewControls.vue";
|
||||
import TimeBookingsNewGridControls
|
||||
from "@/views/dashboards/departmentDashboard/modules/time-bookings/book/displays/grid/TimeBookingsNewGridControls.vue";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user