Close modal, and don't apply coupon

This commit is contained in:
ernstmul
2025-03-19 09:39:05 +01:00
parent 007d5d8269
commit 89aa2973fa
@@ -20,13 +20,15 @@
async function addCoupon() {
try {
const response = await sdk.forConsole.billing.getCoupon(coupon);
couponData = response;
if (response.onlyNewOrgs && !isNewOrg) {
show = false;
addNotification({
type: 'error',
message: 'Coupon only valid for new organizations'
});
} else {
couponData = response;
dispatch('validation', couponData);
coupon = null;
show = false;