diff --git a/addons/pos_self_order/static/src/app/components/attribute_selection/attribute_selection.js b/addons/pos_self_order/static/src/app/components/attribute_selection/attribute_selection.js index 6c900ec0049..41871d96c9f 100644 --- a/addons/pos_self_order/static/src/app/components/attribute_selection/attribute_selection.js +++ b/addons/pos_self_order/static/src/app/components/attribute_selection/attribute_selection.js @@ -7,7 +7,7 @@ import { attributeFlatter, attributeFormatter } from "@pos_self_order/app/utils" export class AttributeSelection extends Component { static template = "pos_self_order.AttributeSelection"; - static props = ["toggleQtyBtn", "product"]; + static props = ["product"]; setup() { this.selfOrder = useSelfOrder(); @@ -15,17 +15,12 @@ export class AttributeSelection extends Component { this.currentAttribute = 0; this.state = useState({ - showResume: false, showNext: false, showCustomInput: false, }); this.selectedValues = useState(this.env.selectedValues); - if (!this.env.editable) { - this.toggleResume(); - } - this.initAttribute(); } @@ -90,11 +85,6 @@ export class AttributeSelection extends Component { } } - toggleResume() { - this.state.showResume = !this.state.showResume; - this.props.toggleQtyBtn(this.state.showResume); - } - isChecked(attribute, value) { return attribute.display_type === "multi" ? this.selectedValues[attribute.id][value.id] diff --git a/addons/pos_self_order/static/src/app/components/attribute_selection/attribute_selection.xml b/addons/pos_self_order/static/src/app/components/attribute_selection/attribute_selection.xml index 258d7f50d21..7fa234403ac 100644 --- a/addons/pos_self_order/static/src/app/components/attribute_selection/attribute_selection.xml +++ b/addons/pos_self_order/static/src/app/components/attribute_selection/attribute_selection.xml @@ -2,76 +2,49 @@
- -
-

Your resume

-
-
    -
  • -
    - : -
    - -
  • -
-
- -
-
-
-

-
- -
-
- - - -
+
+
+
+

+
+ +
+
+ + +
-
- -
- -
+
+
+ +
+

- -
- -
-
- - -
- -
-
+
diff --git a/addons/pos_self_order/static/src/app/components/combo_selection/combo_selection.js b/addons/pos_self_order/static/src/app/components/combo_selection/combo_selection.js index 51d445b3bf5..35a06ac7b37 100644 --- a/addons/pos_self_order/static/src/app/components/combo_selection/combo_selection.js +++ b/addons/pos_self_order/static/src/app/components/combo_selection/combo_selection.js @@ -22,10 +22,8 @@ export class ComboSelection extends Component { this.props.comboState.selectedProduct = productSelected; if (productSelected.attributes.length === 0) { this.props.next(); + return; } - } - - toggleQtyBtn(bool) { - this.props.comboState.showQtyButtons = bool; + this.props.comboState.showQtyButtons = true; } } diff --git a/addons/pos_self_order/static/src/app/components/combo_selection/combo_selection.xml b/addons/pos_self_order/static/src/app/components/combo_selection/combo_selection.xml index b958d304958..3bb6dbd200d 100644 --- a/addons/pos_self_order/static/src/app/components/combo_selection/combo_selection.xml +++ b/addons/pos_self_order/static/src/app/components/combo_selection/combo_selection.xml @@ -51,7 +51,7 @@

- + diff --git a/addons/pos_self_order/static/src/app/pages/product_page/product_page.js b/addons/pos_self_order/static/src/app/pages/product_page/product_page.js index 6de298e9fc4..ffb8545539d 100644 --- a/addons/pos_self_order/static/src/app/pages/product_page/product_page.js +++ b/addons/pos_self_order/static/src/app/pages/product_page/product_page.js @@ -27,7 +27,6 @@ export class ProductPage extends Component { this.state = useState({ qty: 1, customer_note: "", - showQtyButtons: this.attributes.length === 0, product: this.props.product, }); @@ -55,10 +54,6 @@ export class ProductPage extends Component { ); } - toggleQtyBtn(bool) { - this.state.showQtyButtons = bool; - } - initState() { const editedLine = this.selfOrder.editedLine; @@ -151,6 +146,6 @@ export class ProductPage extends Component { } get showQtyButtons() { - return this.state.showQtyButtons && this.props.product.self_order_available; + return this.props.product.self_order_available; } } diff --git a/addons/pos_self_order/static/src/app/pages/product_page/product_page.xml b/addons/pos_self_order/static/src/app/pages/product_page/product_page.xml index be8b2fcd87c..fb6e5fa80e1 100644 --- a/addons/pos_self_order/static/src/app/pages/product_page/product_page.xml +++ b/addons/pos_self_order/static/src/app/pages/product_page/product_page.xml @@ -34,7 +34,6 @@