Openbravo Issue Tracking System - Retail Modules
View Issue Details
0051973Retail ModulesWeb POSpublic2023-03-24 13:112023-04-04 13:44
joniturralde93 
Triage Platform Conn 
normalmajorsometimes
newopen 
5
 
 
No
0051973: Start rfid only if no popup is opened
Usually this is correctly managed in the popups, but there are situations where rfid read is started in a wrong moment. For example, if we execute this:

OB.UTIL.RfidController.removeEpc(
        obposEpccode,
        function() {
          OB.UTIL.RfidController.connectRFIDDevice();
        }
      );


The callback connectRFIDDevice could take a bit to be executed, and in the meanwhile the user can trigger a popup. After that, RFID would be connected and the user can read a tag with an opened popup.
- Use connectRfidDevice as a callback function or execute it with some delay
- In the meantime, open any popup manually
- After the popup is opened, RFID will be connected
Check in connectRFIDDevice function if a popup is opened. Maybe this can be done by checking the property OB.MobileApp.model.get('terminalLogContextPopUp'), similar to this:

    isPopupOpened: function() {
      return (
        !OB.UTIL.isNullOrUndefined(
          OB.MobileApp.model.get('terminalLogContextPopUp')
        ) && OB.MobileApp.model.get('terminalLogContextPopUp').length > 0
      );
    }
    
And check this in the connect function:

OB.UTIL.RfidController.connectRFIDDevice = function(callback, errorCallback) {
  if (
    OB.UTIL.RfidController.get('rfidWebsocket') &&
    !OB.UTIL.TerminalLog.isPopupOpened()
  ) {
No tags attached.
Issue History
2023-03-24 13:11joniturralde93New Issue
2023-03-24 13:11joniturralde93Assigned To => Retail
2023-03-24 13:11joniturralde93Triggers an Emergency Pack => No
2023-03-24 13:21joniturralde93Proposed Solution updated
2023-04-04 13:44guillermogilAssigned ToRetail => Triage Platform Conn

There are no notes attached to this issue.