mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-28 19:41:33 +02:00
* Include valid couponCode and promotionCode in `payment-page-view` and `payment-page-form-submit` analytics events * Update payment event types * Remove obsolete comment * fix: only send validated coupon and promotion codes in analytics event * Add coupon name for the analytics events * Update test to include the coupon name for analytics * Remove coupon code from analytics * Simplify promotion code validation using coupon.code * Remove undefined * Allow access to promotion code * Remove `lastValidatedPromotionCode` and compare against coupon code from the preview response * Fix test setup to initialize coupon code * Keep the submit button enabled only when the coupon code is either empty or successfully validated by the backend * Update test coupon code value to TEST_COUPON GitOrigin-RevId: b12fa147d91fd3b90b59bc77868a0786ddb633b7