ng-easycommerce 0.0.600 → 0.0.601
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 +2 -0
- package/bundles/ng-easycommerce.umd.js +7 -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/checkout-ec/dataform-ec/dataform-ec.component.js +8 -7
- package/esm5/lib/ec-component/checkout-ec/dataform-ec/dataform-ec.component.js +8 -7
- package/fesm2015/ng-easycommerce.js +7 -6
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +7 -6
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# version 0.0.601
|
|
2
|
+
- Se arregló un error en el checkout (`dataform-ec.component.ts`), que se intentaba agregar el código de la primera provincia, sin verificar que existieran provincias.
|
|
1
3
|
# version 0.0.600
|
|
2
4
|
- Se implementa la validación de documentos según el tipo seleccionado en el formulario de checkout.
|
|
3
5
|
- Se agrega la lógica en `dataform-ec.component.ts` para establecer patrones de validación dinámicos de acuerdo con el tipo de documento.
|
|
@@ -8100,14 +8100,15 @@
|
|
|
8100
8100
|
:
|
|
8101
8101
|
[];
|
|
8102
8102
|
_this.provincesSubject.next(provinces);
|
|
8103
|
-
|
|
8103
|
+
if (provinces.length) {
|
|
8104
|
+
_this.checkoutForm.controls['provinceCode'].setValue(provinces[0].code);
|
|
8105
|
+
}
|
|
8104
8106
|
//Document types
|
|
8105
|
-
var documentTypes =
|
|
8106
|
-
_this.countriesSubject.value.find(function (country) { return country.code == value; }).documentTypes
|
|
8107
|
-
:
|
|
8108
|
-
[];
|
|
8107
|
+
var documentTypes = selectedCountry ? selectedCountry.documentTypes : [];
|
|
8109
8108
|
_this.documentTypesSubject.next(documentTypes);
|
|
8110
|
-
|
|
8109
|
+
if (documentTypes.length) {
|
|
8110
|
+
_this.checkoutForm.controls['documentType'].setValue(documentTypes[0].code);
|
|
8111
|
+
}
|
|
8111
8112
|
var selectedDocumentType = documentTypes.find(function (doc) { return doc.code == _this.checkoutForm.controls['documentType'].value; });
|
|
8112
8113
|
if (selectedDocumentType) {
|
|
8113
8114
|
_this.updateDocumentValidation(selectedDocumentType);
|