Openbravo Issue Tracking System - Retail Modules
View Issue Details
0050148Retail ModulesWeb POSpublic2022-09-02 13:532022-09-02 13:54
jetxarri 
Retail 
highminoralways
newopen 
5
pi 
pi 
No
0050148: Not possible to show a correct error message in action InitCashup
If an actionPreparations fails during cashup initialization, it does not matter the error that the actionPreparation launches because always is going to show the same popup
Create the following action preparation
OB.App.StateAPI.Global.initCashup.addActionPreparation(
  async (state, payload) => {
    throw new OB.App.Class.ActionCanceled({
          errorConfirmation: 'CFIS_FiscalizationErrorLogin'
        });

    return { ...payload };
  },
  async (state, payload) => payload,
  999999
);

It does not matter the error, the function onInitCashupError is called and does not accept any parameter
File login-model
OB.App.State.Global.initCashup({
.....
.catch(e => {
            if (e instanceof OB.App.Class.ActionCanceled) {
              OB.App.View.ActionCanceledUIHandler.handle(e);
            } else {
              onInitCashupError();
            }

            OB.error(e.stack);
          });

Also this solution is not complete, because it is going to show a popup with Ok button only and it should give the option to the user to do logout, like the popup created in function onInitCashupError
No tags attached.
Issue History
2022-09-02 13:53jetxarriNew Issue
2022-09-02 13:53jetxarriAssigned To => Retail
2022-09-02 13:53jetxarriTriggers an Emergency Pack => No
2022-09-02 13:54jetxarriProposed Solution updated

There are no notes attached to this issue.