ng-easycommerce 0.0.465 → 0.0.467
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.
- package/README.md +5 -0
- package/assets/decidirFormEc.html +18 -5
- package/bundles/ng-easycommerce.umd.js +58 -6
- package/bundles/ng-easycommerce.umd.js.map +1 -1
- package/bundles/ng-easycommerce.umd.min.js +1 -1
- package/bundles/ng-easycommerce.umd.min.js.map +1 -1
- package/esm2015/lib/ec-component/product-detail-ec/product-detail-ec.component.js +28 -3
- package/esm2015/lib/ec-component/product-ec/product-ec.component.js +33 -5
- package/esm5/lib/ec-component/product-detail-ec/product-detail-ec.component.js +28 -3
- package/esm5/lib/ec-component/product-ec/product-ec.component.js +33 -5
- package/fesm2015/ng-easycommerce.js +58 -6
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +58 -6
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/product-detail-ec/product-detail-ec.component.d.ts +11 -2
- package/lib/ec-component/product-ec/product-ec.component.d.ts +14 -3
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
# version 0.0.467
|
|
2
|
+
- Se agrega el campo "Fecha de nacimiento" en el formulario de decidirFormEc
|
|
3
|
+
# version 0.0.466
|
|
4
|
+
- Se mejoran las funciones **plus** y **less** de los componentes products y product-detail, para permitir agregar mas cantidad de uno y sus respectivos controles.
|
|
5
|
+
|
|
1
6
|
# version 0.0.465
|
|
2
7
|
- Se añade el metodo de pago Bancard-catastro (incompleto hasta esta version).
|
|
3
8
|
- Se añade un parametro en core.consts para poder seleccionar que paises mostrar en el checkout.
|
|
@@ -204,10 +204,19 @@
|
|
|
204
204
|
</div>
|
|
205
205
|
</div>
|
|
206
206
|
</div>
|
|
207
|
-
<div class="
|
|
208
|
-
<
|
|
209
|
-
|
|
210
|
-
|
|
207
|
+
<div class="row">
|
|
208
|
+
<div class="col-12 col-md-8">
|
|
209
|
+
<div class="form-floating mb-3">
|
|
210
|
+
<input class="form-control" type="text" data-decidir="card_holder_name" placeholder="TITULAR" value="" />
|
|
211
|
+
<label for="card_holder_name">Nombre del titular:</label>
|
|
212
|
+
</div>
|
|
213
|
+
</div>
|
|
214
|
+
<div class="col-12 col-md-4">
|
|
215
|
+
<div class="form-floating mb-3">
|
|
216
|
+
<input class="form-control" type="date" data-decidir="card_holder_birthday" placeholder="" value="" />
|
|
217
|
+
<label for="card_holder_birthday">Fecha de nacimiento:</label>
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
211
220
|
</div>
|
|
212
221
|
<div class="row">
|
|
213
222
|
<div class="col-md-6 col-12">
|
|
@@ -310,7 +319,8 @@
|
|
|
310
319
|
const sendToken = (data) => {
|
|
311
320
|
data['fraud_detection'] = {
|
|
312
321
|
"device_unique_identifier": session_id
|
|
313
|
-
}
|
|
322
|
+
}
|
|
323
|
+
console.log('Datos para el envio: ',data)
|
|
314
324
|
console.log(dataDecidir)
|
|
315
325
|
if(dataDecidir?.config?.public_cybersource != 'deshabilitado'){
|
|
316
326
|
data['address'] = {
|
|
@@ -318,6 +328,7 @@
|
|
|
318
328
|
'number' : document.getElementById('nro').value
|
|
319
329
|
}
|
|
320
330
|
}
|
|
331
|
+
|
|
321
332
|
try {
|
|
322
333
|
fetch(dataRedirect, {
|
|
323
334
|
method: 'POST',
|
|
@@ -351,6 +362,7 @@
|
|
|
351
362
|
}
|
|
352
363
|
|
|
353
364
|
const sdkResponseHandler = (status, response) => {
|
|
365
|
+
console.log('Respuesta: ',response)
|
|
354
366
|
if (status != 200 && status != 201) {
|
|
355
367
|
//Manejo de error: Ver Respuesta de Error
|
|
356
368
|
processError(response)
|
|
@@ -362,6 +374,7 @@
|
|
|
362
374
|
|
|
363
375
|
const sendForm = (event) => {
|
|
364
376
|
isLoad(true)
|
|
377
|
+
console.log('Formulario: ',form)
|
|
365
378
|
event.preventDefault();
|
|
366
379
|
decidir.createToken(form, sdkResponseHandler);
|
|
367
380
|
return false;
|
|
@@ -9262,8 +9262,33 @@
|
|
|
9262
9262
|
_this.saveRef = function (carousel) {
|
|
9263
9263
|
_this.carousel = carousel;
|
|
9264
9264
|
};
|
|
9265
|
-
|
|
9266
|
-
|
|
9265
|
+
/**
|
|
9266
|
+
* @description actualiza la variable quantity sumandole 'x' contenido.
|
|
9267
|
+
* @param stock debe recibir un number que contenga el stock disponible.
|
|
9268
|
+
* @param multipleQuantity debe recibir el multiplo de cantidad que se quiera incrementar.
|
|
9269
|
+
*/
|
|
9270
|
+
_this.plus = function (stock, multipleQuantity) {
|
|
9271
|
+
if (multipleQuantity && multipleQuantity > 0) {
|
|
9272
|
+
stock ? (_this.quantity < stock ? _this.quantity = _this.quantity + multipleQuantity : _this.toastrService.show('out-of-stock-actually'))
|
|
9273
|
+
: _this.quantity = _this.quantity + multipleQuantity;
|
|
9274
|
+
}
|
|
9275
|
+
else {
|
|
9276
|
+
stock ? (_this.quantity < stock ? _this.quantity = _this.quantity + 1 : _this.toastrService.show('out-of-stock-actually'))
|
|
9277
|
+
: _this.quantity = _this.quantity + 1;
|
|
9278
|
+
}
|
|
9279
|
+
};
|
|
9280
|
+
/**
|
|
9281
|
+
* @description actualiza la varible quantity restandole 'x' contenido.
|
|
9282
|
+
* @param multipleQuantity debe recibir el multiplo de cantidad que se quiera decrementar.
|
|
9283
|
+
*/
|
|
9284
|
+
_this.less = function (multipleQuantity) {
|
|
9285
|
+
if (multipleQuantity && multipleQuantity > 0) {
|
|
9286
|
+
_this.quantity > multipleQuantity ? _this.quantity = _this.quantity - multipleQuantity : null;
|
|
9287
|
+
}
|
|
9288
|
+
else {
|
|
9289
|
+
_this.quantity > 1 ? _this.quantity = _this.quantity - 1 : null;
|
|
9290
|
+
}
|
|
9291
|
+
};
|
|
9267
9292
|
_this.showContact = function () { return _this.show = true; };
|
|
9268
9293
|
_this.hideContact = function () { return _this.show = false; };
|
|
9269
9294
|
_this.thereIsMoreInfo = function (product) {
|
|
@@ -9349,12 +9374,13 @@
|
|
|
9349
9374
|
};
|
|
9350
9375
|
var ProductEcComponent = /** @class */ (function (_super) {
|
|
9351
9376
|
__extends$w(ProductEcComponent, _super);
|
|
9352
|
-
function ProductEcComponent(consts, router, productService, authService) {
|
|
9377
|
+
function ProductEcComponent(consts, router, productService, authService, toastrService) {
|
|
9353
9378
|
var _this = _super.call(this) || this;
|
|
9354
9379
|
_this.consts = consts;
|
|
9355
9380
|
_this.router = router;
|
|
9356
9381
|
_this.productService = productService;
|
|
9357
9382
|
_this.authService = authService;
|
|
9383
|
+
_this.toastrService = toastrService;
|
|
9358
9384
|
_this.quantity = 1;
|
|
9359
9385
|
_this.stock = 0;
|
|
9360
9386
|
_this.data = null;
|
|
@@ -9379,8 +9405,33 @@
|
|
|
9379
9405
|
}
|
|
9380
9406
|
_this.router.navigateByUrl("/product/" + idredirect + (variant ? '?variant=true' : ''));
|
|
9381
9407
|
};
|
|
9382
|
-
|
|
9383
|
-
|
|
9408
|
+
/**
|
|
9409
|
+
* @description actualiza la variable quantity sumandole 'x' contenido.
|
|
9410
|
+
* @param stock debe recibir un number que contenga el stock disponible.
|
|
9411
|
+
* @param multipleQuantity debe recibir el multiplo de cantidad que se quiera incrementar.
|
|
9412
|
+
*/
|
|
9413
|
+
_this.plus = function (stock, multipleQuantity) {
|
|
9414
|
+
if (multipleQuantity && multipleQuantity > 0) {
|
|
9415
|
+
stock ? (_this.quantity < stock ? _this.quantity = _this.quantity + multipleQuantity : _this.toastrService.show('out-of-stock-actually'))
|
|
9416
|
+
: _this.quantity = _this.quantity + multipleQuantity;
|
|
9417
|
+
}
|
|
9418
|
+
else {
|
|
9419
|
+
stock ? (_this.quantity < stock ? _this.quantity = _this.quantity + 1 : _this.toastrService.show('out-of-stock-actually'))
|
|
9420
|
+
: _this.quantity = _this.quantity + 1;
|
|
9421
|
+
}
|
|
9422
|
+
};
|
|
9423
|
+
/**
|
|
9424
|
+
* @description actualiza la varible quantity restandole 'x' contenido.
|
|
9425
|
+
* @param multipleQuantity debe recibir el multiplo de cantidad que se quiera decrementar.
|
|
9426
|
+
*/
|
|
9427
|
+
_this.less = function (multipleQuantity) {
|
|
9428
|
+
if (multipleQuantity && multipleQuantity > 0) {
|
|
9429
|
+
_this.quantity > multipleQuantity ? _this.quantity = _this.quantity - multipleQuantity : null;
|
|
9430
|
+
}
|
|
9431
|
+
else {
|
|
9432
|
+
_this.quantity > 1 ? _this.quantity = _this.quantity - 1 : null;
|
|
9433
|
+
}
|
|
9434
|
+
};
|
|
9384
9435
|
_this.addToCart = function () {
|
|
9385
9436
|
_this.productService.addToCart(+_this.quantity);
|
|
9386
9437
|
};
|
|
@@ -9405,7 +9456,8 @@
|
|
|
9405
9456
|
{ type: Constants },
|
|
9406
9457
|
{ type: router.Router },
|
|
9407
9458
|
{ type: ProductDetailService },
|
|
9408
|
-
{ type: AuthService }
|
|
9459
|
+
{ type: AuthService },
|
|
9460
|
+
{ type: ToastService }
|
|
9409
9461
|
]; };
|
|
9410
9462
|
__decorate$13([
|
|
9411
9463
|
core.Input()
|