Skip to content

Update isPromoCodeInvalid manually to avoid calling API unnecessarily

Vamsi Vempati requested to merge 396813-update-isPromoCodeInvalid-manually into master

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.

Edited by Vamsi Vempati

Merge request reports

Loading