@infrab4a/connect-angular 4.12.1-beta.3 → 4.12.1-beta.5

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.
@@ -1093,8 +1093,12 @@ class CouponService {
1093
1093
  if (!hasProductCategories)
1094
1094
  throw 'Seu carrinho não possui produtos elegíveis para desconto.';
1095
1095
  const hasMinSubTotal = await this.hasMinSubTotal(coupon, checkout);
1096
- if (!hasMinSubTotal)
1096
+ if (!hasMinSubTotal) {
1097
+ if (coupon.productsCategories?.length) {
1098
+ throw `Valor mínimo de ${Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' }).format(coupon.minSubTotalValue)} não atingido na(s) categoria(s)/marca(s)`;
1099
+ }
1097
1100
  throw `Valor mínimo de ${Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' }).format(coupon.minSubTotalValue)} não atingido`;
1101
+ }
1098
1102
  return coupon;
1099
1103
  }
1100
1104
  calcDiscountSubscription(coupon, checkout) {