ng-easycommerce 0.0.682 → 0.0.683
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 +4 -0
- package/assets/ec-i18n/ct.json +3 -0
- package/assets/ec-i18n/en.json +7 -4
- package/assets/ec-i18n/es.json +3 -0
- package/assets/ec-i18n/fr.json +7 -4
- package/assets/ec-i18n/gl.json +3 -0
- package/assets/ec-i18n/pr.json +3 -0
- package/bundles/ng-easycommerce.umd.js +31 -26
- 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/auth-ec/auth-ec.component.js +7 -4
- package/esm2015/lib/ec-component/auth-ec/register-form-ec/register-form-ec.component.js +20 -21
- package/esm2015/lib/ec-component/auth-ec/register-wholesaler-form-ec/register-wholesaler-form-ec.component.js +7 -4
- package/esm5/lib/ec-component/auth-ec/auth-ec.component.js +7 -4
- package/esm5/lib/ec-component/auth-ec/register-form-ec/register-form-ec.component.js +20 -21
- package/esm5/lib/ec-component/auth-ec/register-wholesaler-form-ec/register-wholesaler-form-ec.component.js +7 -4
- package/fesm2015/ng-easycommerce.js +31 -26
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +31 -26
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/auth-ec/register-form-ec/register-form-ec.component.d.ts +1 -0
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
# Version 0.0.683
|
|
2
|
+
- Registro: cuando `/shop-api/{channel}/register` responde `409`, se interpreta como email registrado con canal inactivo.
|
|
3
|
+
- Registro: se agrega la clave traducible `email-register-channel-inactive` para mostrar el mensaje específico por idioma.
|
|
4
|
+
- Registro: se mantiene el manejo de `400` para email ya registrado y el mensaje genérico `email-register-error` para el resto de los errores.
|
|
1
5
|
# Version 0.0.682
|
|
2
6
|
- Carrito y sidebar: `CartService.buildCartItemPricing()` ahora prioriza `items[].product.variants[0].cartAndSidebarPrices.saleprice` y `cartAndSidebarPrices.price` cuando el backend los informa.
|
|
3
7
|
- Esto evita mostrar en la tabla del carrito o en el sidebar precios de variante que incluyen impuestos de orden y no corresponden al precio visible por ítem.
|
package/assets/ec-i18n/ct.json
CHANGED
|
@@ -118,6 +118,9 @@
|
|
|
118
118
|
"email-address": "Email",
|
|
119
119
|
"email-address-help1": "L'e-mail és requerit",
|
|
120
120
|
"email-address-help2": "E-mail invàlid",
|
|
121
|
+
"email-already-registered": "La direcció de correu electrònic ja està registrada.",
|
|
122
|
+
"email-register-error": "S'ha produït un error durant el registre.",
|
|
123
|
+
"email-register-channel-inactive": "Aquesta adreça de correu electrònic ja està registrada al nostre sistema. Per habilitar l'accés a aquest lloc, poseu-vos en contacte amb el nostre equip de suport.",
|
|
121
124
|
"country": "país",
|
|
122
125
|
"select-country": "Seleccioneu un país",
|
|
123
126
|
"country-help": "El país és requerit",
|
package/assets/ec-i18n/en.json
CHANGED
|
@@ -99,10 +99,13 @@
|
|
|
99
99
|
"earrings": "earrings",
|
|
100
100
|
"edit": "Edit",
|
|
101
101
|
"edit-address": "Edit address",
|
|
102
|
-
"email-address": "Email address",
|
|
103
|
-
"email-address-help1": "Email is required",
|
|
104
|
-
"email-address-help2": "Invalid Email",
|
|
105
|
-
|
|
102
|
+
"email-address": "Email address",
|
|
103
|
+
"email-address-help1": "Email is required",
|
|
104
|
+
"email-address-help2": "Invalid Email",
|
|
105
|
+
"email-already-registered": "The email entered is already registered.",
|
|
106
|
+
"email-register-error": "An error occurred during registration.",
|
|
107
|
+
"email-register-channel-inactive": "This email is already registered in our system. To enable access to this site, please contact our support team.",
|
|
108
|
+
"address-help2": "THE CONTENT OF THE ADDRESS FIELD IS TOO LONG. MAXIMUM 50 CHARACTERS.",
|
|
106
109
|
"empty-cart": "Your Cart is Empty",
|
|
107
110
|
"cart-not-empty": "You cannot repeat the order because your cart is not empty.",
|
|
108
111
|
"empty-cart-detail": "Add something to make me happy :)",
|
package/assets/ec-i18n/es.json
CHANGED
|
@@ -103,6 +103,9 @@
|
|
|
103
103
|
"email-address": "Email",
|
|
104
104
|
"email-address-help1": "El email es requerido",
|
|
105
105
|
"email-address-help2": "Email inválido",
|
|
106
|
+
"email-already-registered": "El email ingresado ya se encuentra registrado.",
|
|
107
|
+
"email-register-error": "Error en el registro. Vuelva a intentarlo más tarde.",
|
|
108
|
+
"email-register-channel-inactive": "Este correo electrónico ya se encuentra registrado en nuestro sistema. Para habilitar tu acceso a este sitio, por favor comunicate con nuestro equipo de atención al cliente.",
|
|
106
109
|
"empty-cart": "Tu carrito está vacio",
|
|
107
110
|
"cart-not-empty": "No puedes repetir el pedido porque tu carrito no está vacío.",
|
|
108
111
|
"empty-cart-detail": "Agrega algo al carrito",
|
package/assets/ec-i18n/fr.json
CHANGED
|
@@ -113,10 +113,13 @@
|
|
|
113
113
|
"phone": "Phone number",
|
|
114
114
|
"phone-help1": "Phone No is required.",
|
|
115
115
|
"phone-help2": "Phone No is must be number.",
|
|
116
|
-
"email-address": "Email address",
|
|
117
|
-
"email-address-help1": "Email is required",
|
|
118
|
-
"email-address-help2": "Invalid Email",
|
|
119
|
-
"
|
|
116
|
+
"email-address": "Email address",
|
|
117
|
+
"email-address-help1": "Email is required",
|
|
118
|
+
"email-address-help2": "Invalid Email",
|
|
119
|
+
"email-already-registered": "The email entered is already registered.",
|
|
120
|
+
"email-register-error": "An error occurred during registration.",
|
|
121
|
+
"email-register-channel-inactive": "This email is already registered in our system. To enable access to this site, please contact our support team.",
|
|
122
|
+
"country": "Country",
|
|
120
123
|
"select-country": "Select country",
|
|
121
124
|
"country-help": "Country is required",
|
|
122
125
|
"address": "Address",
|
package/assets/ec-i18n/gl.json
CHANGED
|
@@ -118,6 +118,9 @@
|
|
|
118
118
|
"email-address": "Correo electrónico",
|
|
119
119
|
"email-address-help1": "O correo electrónico é obrigatorio",
|
|
120
120
|
"email-address-help2": "Correo electrónico non válido",
|
|
121
|
+
"email-already-registered": "O enderezo de correo electrónico xa está rexistrado.",
|
|
122
|
+
"email-register-error": "Produciuse un erro durante o rexistro.",
|
|
123
|
+
"email-register-channel-inactive": "Este enderezo de correo electrónico xa está rexistrado no noso sistema. Para habilitar o acceso a este sitio, póñase en contacto co noso equipo de soporte.",
|
|
121
124
|
"country": "País",
|
|
122
125
|
"select-country": "Seleccione un país",
|
|
123
126
|
"country-help": "O país é obrigatorio",
|
package/assets/ec-i18n/pr.json
CHANGED
|
@@ -118,6 +118,9 @@
|
|
|
118
118
|
"email-address": "E-mail",
|
|
119
119
|
"email-address-help1": "E-mail é obrigatório",
|
|
120
120
|
"email-address-help2": "E-mail inválido",
|
|
121
|
+
"email-already-registered": "O endereço de e-mail já está registrado.",
|
|
122
|
+
"email-register-error": "Ocorreu um erro durante o registro.",
|
|
123
|
+
"email-register-channel-inactive": "Este endereço de e-mail já está registrado em nosso sistema. Para habilitar o acesso a este site, entre em contato com nossa equipe de suporte.",
|
|
121
124
|
"country": "País",
|
|
122
125
|
"select-country": "Selecione um país",
|
|
123
126
|
"country-help": "O país é obrigatório",
|
|
@@ -17098,11 +17098,14 @@
|
|
|
17098
17098
|
_this.router.navigateByUrl('home');
|
|
17099
17099
|
}, function (error) {
|
|
17100
17100
|
_this.register_loading = false;
|
|
17101
|
-
if (error.status ==
|
|
17102
|
-
_this.toastr.show('
|
|
17101
|
+
if (error.status == 409) {
|
|
17102
|
+
_this.toastr.show('email-register-channel-inactive');
|
|
17103
|
+
}
|
|
17104
|
+
else if (error.status == 400) {
|
|
17105
|
+
_this.toastr.show('email-already-registered');
|
|
17103
17106
|
}
|
|
17104
17107
|
else {
|
|
17105
|
-
_this.toastr.show('
|
|
17108
|
+
_this.toastr.show('email-register-error');
|
|
17106
17109
|
}
|
|
17107
17110
|
});
|
|
17108
17111
|
}
|
|
@@ -17283,26 +17286,7 @@
|
|
|
17283
17286
|
}
|
|
17284
17287
|
}, function (error) {
|
|
17285
17288
|
_this.register_loading = false;
|
|
17286
|
-
|
|
17287
|
-
var backendError = error.error;
|
|
17288
|
-
if (backendError &&
|
|
17289
|
-
backendError.errors &&
|
|
17290
|
-
backendError.errors.email &&
|
|
17291
|
-
backendError.errors.email.length > 0) {
|
|
17292
|
-
// Mostrar el primer mensaje de error de email
|
|
17293
|
-
_this.toastr.showPersistent(backendError.errors.email[0]);
|
|
17294
|
-
}
|
|
17295
|
-
else if (backendError && backendError.message) {
|
|
17296
|
-
// Si no hay mensaje específico, pero hay mensaje general del backend
|
|
17297
|
-
_this.toastr.showPersistent(backendError.message);
|
|
17298
|
-
}
|
|
17299
|
-
else {
|
|
17300
|
-
_this.toastr.showPersistent('El email ingresado ya se encuentra registrado.');
|
|
17301
|
-
}
|
|
17302
|
-
}
|
|
17303
|
-
else {
|
|
17304
|
-
_this.toastr.show('Error en el registro. Vuelva a intentarlo más tarde.');
|
|
17305
|
-
}
|
|
17289
|
+
_this.toastr.showPersistent(_this.resolveRegisterErrorMessage(error));
|
|
17306
17290
|
});
|
|
17307
17291
|
}
|
|
17308
17292
|
else {
|
|
@@ -17412,6 +17396,24 @@
|
|
|
17412
17396
|
return control.value.length > max ? { maxLength: true } : null;
|
|
17413
17397
|
};
|
|
17414
17398
|
};
|
|
17399
|
+
RegisterFormEcComponent.prototype.resolveRegisterErrorMessage = function (error) {
|
|
17400
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
17401
|
+
var backendError = (_a = error) === null || _a === void 0 ? void 0 : _a.error;
|
|
17402
|
+
var status = (_c = (_b = error) === null || _b === void 0 ? void 0 : _b.status, (_c !== null && _c !== void 0 ? _c : (_d = backendError) === null || _d === void 0 ? void 0 : _d.code));
|
|
17403
|
+
if (status === 409) {
|
|
17404
|
+
return 'email-register-channel-inactive';
|
|
17405
|
+
}
|
|
17406
|
+
if (status === 400) {
|
|
17407
|
+
if (((_g = (_f = (_e = backendError) === null || _e === void 0 ? void 0 : _e.errors) === null || _f === void 0 ? void 0 : _f.email) === null || _g === void 0 ? void 0 : _g.length) > 0) {
|
|
17408
|
+
return backendError.errors.email[0];
|
|
17409
|
+
}
|
|
17410
|
+
if ((_h = backendError) === null || _h === void 0 ? void 0 : _h.message) {
|
|
17411
|
+
return backendError.message;
|
|
17412
|
+
}
|
|
17413
|
+
return 'email-already-registered';
|
|
17414
|
+
}
|
|
17415
|
+
return 'email-register-error';
|
|
17416
|
+
};
|
|
17415
17417
|
RegisterFormEcComponent.prototype.normalizeRegisterData = function (data) {
|
|
17416
17418
|
var normalizeString = function (val) {
|
|
17417
17419
|
return val === undefined || val === null || val.toString().trim() === '' ? null : val.toString().trim();
|
|
@@ -17905,11 +17907,14 @@
|
|
|
17905
17907
|
}
|
|
17906
17908
|
}, function (error) {
|
|
17907
17909
|
_this.register_loading = false;
|
|
17908
|
-
if (error.status ==
|
|
17909
|
-
_this.toastr.show('
|
|
17910
|
+
if (error.status == 409) {
|
|
17911
|
+
_this.toastr.show('email-register-channel-inactive');
|
|
17912
|
+
}
|
|
17913
|
+
else if (error.status == 400) {
|
|
17914
|
+
_this.toastr.show('email-already-registered');
|
|
17910
17915
|
}
|
|
17911
17916
|
else {
|
|
17912
|
-
_this.toastr.show('
|
|
17917
|
+
_this.toastr.show('email-register-error');
|
|
17913
17918
|
}
|
|
17914
17919
|
});
|
|
17915
17920
|
}
|