@infrab4a/connect-angular 4.9.2 → 4.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1199,7 +1199,12 @@ class CouponService {
1199
1199
  getCouponUseLimits(coupon, checkoutType, user) {
1200
1200
  let couponUseLimits;
1201
1201
  if (checkoutType == CheckoutTypes.ECOMMERCE || checkoutType == CheckoutTypes.ALL) {
1202
- couponUseLimits = user && user.isSubscriber ? coupon.useLimits.subscriber : coupon.useLimits.non_subscriber;
1202
+ if (coupon.exclusivityType.length === 1 &&
1203
+ (coupon.exclusivityType.at(0) === Exclusivities.SPECIFIC_USER ||
1204
+ coupon.exclusivityType.at(0) === Exclusivities.COLLABORATORS))
1205
+ couponUseLimits = coupon.useLimits.non_subscriber;
1206
+ else
1207
+ couponUseLimits = user && user.isSubscriber ? coupon.useLimits.subscriber : coupon.useLimits.non_subscriber;
1203
1208
  }
1204
1209
  else {
1205
1210
  couponUseLimits = coupon.useLimits.subscription;