@infrab4a/connect-angular 2.0.6-beta.0 → 2.0.6-beta.1
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.
|
@@ -484,6 +484,7 @@
|
|
|
484
484
|
return rxjs.throwError('Valor mínimo não atingido');
|
|
485
485
|
// Verifica se a compra possui produtos elegíveis para desconto
|
|
486
486
|
var hasProductCategories = this.hasProductCategories(coupon, checkout);
|
|
487
|
+
console.log('hasProductCategories', hasProductCategories);
|
|
487
488
|
// Se não tem produtos elegíveis, retorna erro
|
|
488
489
|
if (!hasProductCategories)
|
|
489
490
|
return rxjs.throwError('Seu carrinho não possui produtos elegíveis para desconto.');
|
|
@@ -609,7 +610,8 @@
|
|
|
609
610
|
case 1:
|
|
610
611
|
categoria = _d.sent();
|
|
611
612
|
console.log(categoria);
|
|
612
|
-
console.log(coupon.productsCategories.includes(categoria.id), coupon.productsCategories.includes(categoria.firestoreId));
|
|
613
|
+
console.log(coupon.productsCategories.includes(categoria.id), coupon.productsCategories.includes(categoria.firestoreId), i.isGift);
|
|
614
|
+
console.log('validation', (coupon.productsCategories.includes(categoria.id) || coupon.productsCategories.includes(categoria.firestoreId)) && !i.isGift);
|
|
613
615
|
return [2 /*return*/, (coupon.productsCategories.includes(categoria.id) || coupon.productsCategories.includes(categoria.firestoreId)) && !i.isGift];
|
|
614
616
|
}
|
|
615
617
|
});
|