Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Revisions: Issue #55855 All Revisions ] Back to Issue ]
Summary 0055855: Add combo configuration wizard to pos2
Revision 2024-09-05 12:17 by gorka_gil
Description Add combo configuration wizard to pos2

Jira: https://openbravo.atlassian.net/browse/RM-2024 [^]
Revision 2024-09-03 20:15 by gorka_gil
Description Implement combo buttons product launch the combo wizard (6)
This is the point 2 of the functional doc, in enyo the combo buttons are generated automatically, but in pos2 needs to be defined in product window and select in the new combo special use the combo option.
We need to ensure this product arrive to the pos, and it is displayed as normal product but when clicking on it instead to add to the ticket, it should launch the combo wizard, this is already done for menu products, so it can be taken as reference.
Check for obrestIsMenu that it is the parameter in product object in pos that define that this product it is a menu, for combos it is needed that the product has a similar parameter.
In pos2.restaurant module check the file AddProductHook.js and the method openMenuWizardForAddedMenu, it checks if the product has the obrestIsMenu to launch the menu wizard.
Note that for combos there is a principal difference, that instead to allow continue to add the menu to ticket, in combos we are not going to add the combo to the ticket, so we need to cancel the addProduct action, so instead of be a postHook, should be a preHook and cancel the user action.
So for combos we need to check for isCombo, also we are not going to save the ticketLineId, since it is not already added to the ticket, and we are not going to execute "await OB.App.State.UI.selectLine({ lines: [ticketLine] });" since the line it is not added to the ticket.
And after the "await openMenuWizard(.... )" we are going to execute "throw new OB.App.Class.ActionSilentlyCanceled();", so the rest of the action it is not executed and the product it is not added to the ticket.
Need to create a OpenComboWizard based on OpenMenuWizard.js and also it is needed to create utility functions (initializeProductsByCategory, loadProductsByCategory, getCategoryFulfillment) based in the ones of menus in GetCategoryFulfillment.js.
It this file we will define a new user action OBPOS2_OpenComboWizard that will be used to control the permissions to launch the combo wizard.
The switchToMenuWizardWindow should be replaced to navigate to the combo wizard flow: OBPOS2_MainWindow_SwitchTo_OBPOS2_ComboWizard , and in order for this to work it is necessary to register the new flow:
 Registry.registerApplicationWindowFlows('OBPOS2_MainWindow', [
     { name: 'OBPOS2_ComboWizard', label: '$OBPOS2_AddCombo' }
  ]);
Needed to create a new ComboWizard.jsx using as base the MenuWizard.jsx.
When entering to the component it should be deleted the state.UI.productBundleInProgress config, probably it is already done


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker