diff --git a/src/components/shop/POSDepartmentProcess.vue b/src/components/shop/POSDepartmentProcess.vue index d21b400c..c58b66fa 100644 --- a/src/components/shop/POSDepartmentProcess.vue +++ b/src/components/shop/POSDepartmentProcess.vue @@ -78,6 +78,8 @@ export const nextStep = async () => { if (step.value === 2) { // If the current step is 2, set the product category to addons setProductsCategory(4); + // Set the step to 3 in the query parameters + window.history.pushState({}, '', `?id=${order_id.value}&customer_id=${customer_id.value}&step=3`); } if (step.value === 3) { // Show a "Success" dialog, that closes after 2 seconds, then redirects to the next page @@ -199,6 +201,8 @@ export const createOrder = () => { order_id.value = parseInt(response.data.data.id); // Set the order id in the local storage (To be make F5 safe) localStorage.setItem('pos_order_id', order_id.value); + // Set the query parameters + window.history.pushState({}, '', `?id=${order_id.value}&customer_id=${customer_id.value}&step=2`); return true; }).catch((error) => { parseError(error, 'stepError'); @@ -653,6 +657,8 @@ export const showDeleteEverythingDialog = () => { /** Clear cache */ export const clearCache = () => { + // Reset the query parameters + window.history.pushState({}, '', `?step=1`); // Clear the customer data customer_id.value = ''; customer_name.value = ''; diff --git a/src/views/dashboards/departmentDashboard/modules/Pos/DepartmentPosOrder.vue b/src/views/dashboards/departmentDashboard/modules/Pos/DepartmentPosOrder.vue index 3731c724..4fc2ae8f 100644 --- a/src/views/dashboards/departmentDashboard/modules/Pos/DepartmentPosOrder.vue +++ b/src/views/dashboards/departmentDashboard/modules/Pos/DepartmentPosOrder.vue @@ -347,7 +347,7 @@ const isBookedWithEconomic = () => { - +