Openbravo Issue Tracking System - POS2
View Issue Details
0052357POS2Corepublic2023-05-04 19:112023-06-07 17:54
gorka_gil 
Triage Platform Base 
normalminorN/A
newopen 
5
 
 
No
0052357: BaseFormKeypad: allow to call user actions from buttons
Rigth now it is possible to add new action buttons in the BaseFormKeypad, but it is not possible to call user-actions from them
BaseFormKeypad acept actions but not actionsHandler, so it is not possible to specify actions there
Create infraestructure in its base componente: BaseKeypad

that do a bit of interpretation of the actions, something like this:


const handleActionWithUserAction = (handleAction, processKey) => (
  action,
  payload
) => {
  if (typeof action === 'function') {
    action(payload);
  } else if (Registry.getRegisteredUserActionNames().includes(action)) {
    Registry.getUserAction(action).launch({ processKey });
  } else {
    handleAction(action, payload);
  }
};
No tags attached.
Issue History
2023-05-04 19:11gorka_gilNew Issue
2023-05-04 19:11gorka_gilAssigned To => Triage Platform Base
2023-05-04 19:11gorka_gilTriggers an Emergency Pack => No
2023-06-06 16:46hgbotNote Added: 0150830
2023-06-07 17:54hgbotNote Added: 0150908

Notes
(0150830)
hgbot   
2023-06-06 16:46   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1129 [^]
(0150908)
hgbot   
2023-06-07 17:54   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1879 [^]