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

View Revisions: Issue #52402 Back to Issue ]
Summary 0052402: WrapTextParams: not working with $ symbol and when the name of the params appears more than once
Revision 2023-05-10 12:20 by migueldejuana
Steps To Reproduce - Login in POS2
- Open Cash Management option in the menu
- Do a New Deposit in Cash of 10 with "Other Cash Deposit"
- Check the error in the console log (check attached screenshot)
- Do a New Deposit in USA Cash of 5 with any event
- Check that the confirm popup is highlighting "deposit" word instead of "$8"
Revision 2023-05-10 12:19 by migueldejuana
Steps To Reproduce - Login in POS2
- Open Cash Management option in the menu
- Do a New Deposit in Cash of 10 with "Cashier shift..."
- Check the error in the console log (check attached screenshot)
- Do a New Deposit in USA Cash of 5 with any event
- Check that the confirm popup is highlighting "deposit" word instead of "$8"
Revision 2023-05-10 12:10 by migueldejuana
Steps To Reproduce - Login in POS2
- Open Cash Management option in the menu
- Do a New Deposit in USA Cash of 10 with any event
- Do a New Withdrawal in USA Cash of 5 with event "Cashier shift..."
- Check that the confirm popup is highlighting "withdrawal" word instead of "$8" and see the error in the console log (check attached screenshot)
Revision 2023-05-10 12:10 by migueldejuana
Description WrapTextParams makes parameters of a message to transfrom into a span that can be set css styles.

but it firsts reemplace the parameters and then replace the params with the html span components

In this example label:
'a %1 b %2 c'

Problem 1:
%1 = $ -> it doesn't create the span because the regex don't recognize it since the $ it has meaning in regex
Example:
Message: "You are going to deposit $8 in USA Cash"
Parameters: ['$8', 'USA Cash']
Expected: "You are going to deposit <span>$8</span> in <span>USA Cash</span>"
Received: "You are going to deposit $8 in <span>USA Cash</span>"

Problem 2:
%2 = c -> it gives an error in console because it setting the same span in two ocassions, since the c value exists so try to create 2 spans for it instead one.
Example:
Parameter: "Cash"
Message: "You are going to add Cash with Cashier shift event."
Expected: "You are going to add [[Cash]] with Cashier shift event."
Received: "You are going to add [[Cash]] with [[Cash]]ier shift event."
Revision 2023-05-10 08:38 by migueldejuana
Steps To Reproduce -
Revision 2023-05-10 08:38 by migueldejuana
Description WrapTextParams makes parameters of a message to transfrom into a span that can be set css styles.

but it firsts reemplace the parameters and then replace the params with the html span components

In this example label:
'a %1 b %2 c'

Problem 1:
%1 = $ -> it doesn't create the span because the regex don't recognize it since the $ it has meaning in regex

Problem 2:
%2 = c -> it gives an error in console because it setting the same span in two ocassions, since the c value exists so try to create 2 spans for it instead one.
Example:
Parameter: "Cash"
Message: "You are going to add Cash with Cashier shift event."
Expected: "You are going to add [[Cash]] with Cashier shift event."
Received: "You are going to add [[Cash]] with [[Cash]]ier shift event."
Revision 2023-05-09 19:40 by migueldejuana
Description WrapTextParams makes parameters of a message to transfrom into a span that can be set css styles.

but it firsts reemplace the parameters and then replace the params with the html span components

In this example label:
'a %1 b %2 c'

Problem 1:
%1 = $ -> it doesn't create the span because the regex don't recognize it since the $ it has meaning in regex

Problem 2:
%2 = c -> it gives an error in console because it setting the same span in two ocassions, since the c value exists so try to create 2 spans for it instead one


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker