Update isPromoCodeInvalid manually to avoid calling API unnecessarily
What does this MR do and why?
This MR changes how invoice preview query is triggered to avoid potential infinite loops with the query due to changes in the properties that form the smart query variables for the query.
This changes isPromoCodeInvalid
from a computed to a reactive property that gets updated manually where necessary instead of relying on promoCodeErrorMessage
under the hood.
Related behaviour around this is captured in tests already and all tests pass.
Related to #396813
Screenshots or screen recordings
No changes to the UI
Screen recordings to check everything works as before can be found here.
How to set up and validate locally
Instructions can be found here.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vamsi Vempati