@@ -331,7 +350,7 @@ watch(() => vehicles.vehicle_1.value.reference, (newValue, oldValue) => {
:product="transactionItems.primaryItem.value"
/>
-
+
{
// Emit event on toggle
function onToggle(isOpen: boolean) {
checked.value = isOpen;
+ // Open the additional item selection view if toggled open
+ if (isOpen) {
+ pos.views.additionalItemSelection.value = true;
+ }
}
/** Additional item management logic */
@@ -89,7 +94,7 @@ const exampleProducts = ref([
}
]);
const convertProductToAddon = (product: PosProduct, options: {quantity?: number, min?: number, max?: number} = {}): Addon => {
- console.warn("Converting product to addon:", product, options);
+ //console.warn("Converting product to addon:", product, options);
return {
id: product.id,
name: product.name,
@@ -129,6 +134,7 @@ watch(() => pos.transactionItems.additionalItems.value, (newVal) => {
if (!newVal) return;
if (newVal.length === 0) {
availableAdditionalItems.value = [];
+ //
return;
}
// Prevent recursive loop by checking if availableAdditionalItems already matches newVal
@@ -138,61 +144,89 @@ watch(() => pos.transactionItems.additionalItems.value, (newVal) => {
if (isSame) return;
availableAdditionalItems.value = getAvailableAdditionalItems();
}, { deep: true });
+
+const onClickAddProduct = async (product: PosProduct) => {
+ // If the product requires note, open note input.
+ pos.transactionItems.addAdditionalItem(product);
+ // If the view is fullscreen, close it after adding
+ if (pos.views.additionalItemSelection.value) {
+ pos.views.additionalItemSelection.value = false;
+ }
+}
-
+
+
+
+
{{ SessionUser.objects.global.language.no_additional_items }}
+
-
+
-
-
+
+ Arrow right icon
-
+ -->
-
+
-
-
+
+
+ {{ SessionUser.objects.global.language.next }}
+
+
+
+
+
diff --git a/src/components/displays/department/pos/steps/mobile/elements/PosDepartmentStepMobileButtonNextStep.vue b/src/components/displays/department/pos/steps/mobile/elements/PosDepartmentStepMobileButtonNextStep.vue
index 572a5daa..1c5c96a1 100644
--- a/src/components/displays/department/pos/steps/mobile/elements/PosDepartmentStepMobileButtonNextStep.vue
+++ b/src/components/displays/department/pos/steps/mobile/elements/PosDepartmentStepMobileButtonNextStep.vue
@@ -184,6 +184,7 @@ const finalizeStep1 = () => {
const step2 = () => {
/** This function can be used to perform any specific actions for step 2 */
+ // Add all additional items to the order
popups.select('completed_transaction', {
message: `Order #${order_id.value} successfully created.`,
});
diff --git a/src/components/displays/department/pos/steps/mobile/elements/PosDepartmentStepMobilePopupAddProductNote.vue b/src/components/displays/department/pos/steps/mobile/elements/PosDepartmentStepMobilePopupAddProductNote.vue
new file mode 100644
index 00000000..8be1960d
--- /dev/null
+++ b/src/components/displays/department/pos/steps/mobile/elements/PosDepartmentStepMobilePopupAddProductNote.vue
@@ -0,0 +1,128 @@
+
+
+