diff --git a/src/components/displays/superuser/configuration/ConfigurationSwitch.vue b/src/components/displays/superuser/configuration/ConfigurationSwitch.vue
index 6d59ab37..fa2193e1 100644
--- a/src/components/displays/superuser/configuration/ConfigurationSwitch.vue
+++ b/src/components/displays/superuser/configuration/ConfigurationSwitch.vue
@@ -59,7 +59,7 @@ const uniqueId = Math.random().toString(36).substring(7);
- {{ SessionUser.functions.currency.toLocal(price) }}
+ {{ SessionUser.functions.currency.toLocal(price) }}
diff --git a/src/components/session/token/SessionUser/Objects/ObjectsGlobal.vue b/src/components/session/token/SessionUser/Objects/ObjectsGlobal.vue
index 0a14f2cb..d9807974 100644
--- a/src/components/session/token/SessionUser/Objects/ObjectsGlobal.vue
+++ b/src/components/session/token/SessionUser/Objects/ObjectsGlobal.vue
@@ -34,6 +34,7 @@ export const ObjectsGlobal = {
import: "Importer",
phone_country_code: "Landekode",
succeeded: "Fuldførte",
+ summary: "Oversigt",
opening_hours: "Åbningstider",
customers: "Kunder",
selected: "Valgt",
diff --git a/src/views/dashboards/departmentDashboard/modules/time-bookings/book/DepartmentTimeBookingsNew.vue b/src/views/dashboards/departmentDashboard/modules/time-bookings/book/DepartmentTimeBookingsNew.vue
index ba69236e..a0d98555 100644
--- a/src/views/dashboards/departmentDashboard/modules/time-bookings/book/DepartmentTimeBookingsNew.vue
+++ b/src/views/dashboards/departmentDashboard/modules/time-bookings/book/DepartmentTimeBookingsNew.vue
@@ -3,21 +3,14 @@ import RestrictedPageWrapper from "@/components/page/wrappers/RestrictedPageWrap
import { SessionUser } from "@/components/session/token/SessionUser.vue";
import DepartmentDashboardPageWrapper from "@/views/dashboards/departmentDashboard/DepartmentDashboardPageWrapper.vue";
import NotFoundFallBackPageWrapper from "@/components/page/wrappers/NotFoundFallBackPageWrapper.vue";
-import TimeBookingsCalendar from "@/components/timebookings/TimeBookingsCalendar.vue";
-import TimeBookingsTypesPagination
- from "@/components/displays/pagination/models/DepartmentPos/TimeBookingsTypesPagination.vue";
-import TimeBookingsNewStep1
- from "@/views/dashboards/departmentDashboard/modules/time-bookings/book/steps/TimeBookingsNewStep1.vue";
-
-
-import {timeBookingsNewProcess}
- from "@/views/dashboards/departmentDashboard/modules/time-bookings/book/TimeBookingsNewProcess.vue";
-import ButtonsBox from "@/components/displays/boxes/ButtonsBox.vue";
+import {timeBookingsNewProcess} from "@/views/dashboards/departmentDashboard/modules/time-bookings/book/TimeBookingsNewProcess.vue";
import TimeBookingsNewControls
from "@/views/dashboards/departmentDashboard/modules/time-bookings/book/displays/TimeBookingsNewControls.vue";
import ShowErrorField from "@/components/global/ShowErrorField.vue";
import TimeBookingsNewStepDivider
from "@/views/dashboards/departmentDashboard/modules/time-bookings/book/displays/TimeBookingsNewStepDivider.vue";
+import TimeBookingsNewSummaryView
+ from "@/views/dashboards/departmentDashboard/modules/time-bookings/book/displays/TimeBookingsNewSummaryView.vue";
@@ -29,12 +22,14 @@ import TimeBookingsNewStepDivider
-
-
- {{ timeBookingsNewProcess.phone_country_code}}
- {{ timeBookingsNewProcess.phone }}
- {{ timeBookingsNewProcess.reg_1}}
- {{timeBookingsNewProcess.vehicleType}}
+
+
+
+
+
+
+
+
diff --git a/src/views/dashboards/departmentDashboard/modules/time-bookings/book/TimeBookingsNewProcess.vue b/src/views/dashboards/departmentDashboard/modules/time-bookings/book/TimeBookingsNewProcess.vue
index 76d0aa32..c644ee90 100644
--- a/src/views/dashboards/departmentDashboard/modules/time-bookings/book/TimeBookingsNewProcess.vue
+++ b/src/views/dashboards/departmentDashboard/modules/time-bookings/book/TimeBookingsNewProcess.vue
@@ -16,6 +16,7 @@ const isBookingForCustomer = ref(false); // Flag to indicate if the booking is f
const persistentCookiesEnabled = ref(false); // Flag to indicate if persistent cookies are enabled
const cookie_expires = '365d'; // Cookie expiration time
const addons = ref([]); // Placeholder for addons, if any
+const vehicleTypeObject = ref(null); // Placeholder for the vehicle type object
// Persistent cookies for storing user data
const cookies = useCookies().cookies;
const getCookieName = (name) => {
@@ -202,12 +203,36 @@ const getAddons = () => {
return addons.value;
};
-const toggleAddon = (addon) => {
+const addonObjects = ref([]); // Addon objects to be used in the booking process
+
+const getAddonObject = (addon) => {
+ // Function to get the addon object by its ID
+ return addonObjects.value.find(obj => obj.id === addon) || null;
+};
+
+const addAddonObject = (addon) => {
+ // Function to add an addon object to the list
+ if (!addonObjects.value.some(obj => obj.id === addon.id)) {
+ addonObjects.value.push(addon);
+ }
+};
+
+const removeAddonObject = (addon) => {
+ // Function to remove an addon object from the list
+ const index = addonObjects.value.findIndex(obj => obj.id === addon.id);
+ if (index > -1) {
+ addonObjects.value.splice(index, 1);
+ }
+};
+
+const toggleAddon = (addon, addon_object) => {
// Function to toggle an addon
if (hasAddon(addon)) {
removeAddon(addon);
+ removeAddonObject(addon_object);
} else {
addAddon(addon);
+ addAddonObject(addon_object);
}
};
@@ -246,6 +271,14 @@ watch([reg_1], ([newReg1]) => {
if (newReg1) reg_1.value = formatRegistrationNumber(newReg1);
});
+// Watch for changes in the vehicle type, remove the addon objects if the vehicle type is changed
+watch(vehicleType, (newVehicleType) => {
+ if (newVehicleType !== null) {
+ // If a new vehicle type is selected, clear the addons
+ addonObjects.value = [];
+ addons.value = [];
+ }
+});
// Expose the nextStep and previousStep methods
export const timeBookingsNewProcess = {
@@ -272,5 +305,10 @@ export const timeBookingsNewProcess = {
hasAddon,
getAddons,
toggleAddon,
+ getAddonObject,
+ addonObjects,
+ addAddonObject,
+ removeAddonObject,
+ vehicleTypeObject
};
\ No newline at end of file
diff --git a/src/views/dashboards/departmentDashboard/modules/time-bookings/book/displays/TimeBookingsNewSummary.vue b/src/views/dashboards/departmentDashboard/modules/time-bookings/book/displays/TimeBookingsNewSummary.vue
new file mode 100644
index 00000000..bc010fa1
--- /dev/null
+++ b/src/views/dashboards/departmentDashboard/modules/time-bookings/book/displays/TimeBookingsNewSummary.vue
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/dashboards/departmentDashboard/modules/time-bookings/book/displays/TimeBookingsNewSummaryLine.vue b/src/views/dashboards/departmentDashboard/modules/time-bookings/book/displays/TimeBookingsNewSummaryLine.vue
new file mode 100644
index 00000000..f63ba163
--- /dev/null
+++ b/src/views/dashboards/departmentDashboard/modules/time-bookings/book/displays/TimeBookingsNewSummaryLine.vue
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/dashboards/departmentDashboard/modules/time-bookings/book/displays/TimeBookingsNewSummaryView.vue b/src/views/dashboards/departmentDashboard/modules/time-bookings/book/displays/TimeBookingsNewSummaryView.vue
new file mode 100644
index 00000000..9a64c90e
--- /dev/null
+++ b/src/views/dashboards/departmentDashboard/modules/time-bookings/book/displays/TimeBookingsNewSummaryView.vue
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/dashboards/departmentDashboard/modules/time-bookings/book/steps/TimeBookingsNewStep2.vue b/src/views/dashboards/departmentDashboard/modules/time-bookings/book/steps/TimeBookingsNewStep2.vue
index ed2da225..0986d1c6 100644
--- a/src/views/dashboards/departmentDashboard/modules/time-bookings/book/steps/TimeBookingsNewStep2.vue
+++ b/src/views/dashboards/departmentDashboard/modules/time-bookings/book/steps/TimeBookingsNewStep2.vue
@@ -1,7 +1,7 @@
@@ -63,13 +84,12 @@ const getVehicleType = (id) => {
- {{ props.timeBookingsNewProcess.getAddons()}}