iptdevs-design-system 3.1.971 → 3.1.972
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/esm2020/lib/components/forms/update-user-form/update-user-form.component.mjs +16 -5
- package/fesm2015/iptdevs-design-system.mjs +15 -4
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +15 -4
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/lib/components/forms/update-user-form/update-user-form.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1882,6 +1882,7 @@ class updateUserFormComponent {
|
|
|
1882
1882
|
this.parametersLoaded = false;
|
|
1883
1883
|
// userUpdated = false;
|
|
1884
1884
|
this.initialFormValue = [];
|
|
1885
|
+
this.pendingInit = false;
|
|
1885
1886
|
this.isStudent = false;
|
|
1886
1887
|
this.justifyOptions = [];
|
|
1887
1888
|
this.initForm();
|
|
@@ -1893,10 +1894,15 @@ class updateUserFormComponent {
|
|
|
1893
1894
|
ngOnChanges(changes) {
|
|
1894
1895
|
if (changes['visibleModal'] && changes['visibleModal'].currentValue) {
|
|
1895
1896
|
// console.log("entro a getParameters por visible modal, donde el change es:", changes['visibleModal']);
|
|
1896
|
-
this.
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1897
|
+
if (this.parametersLoaded) {
|
|
1898
|
+
this.initializeForm();
|
|
1899
|
+
this.setJustifyOptions();
|
|
1900
|
+
this.trackIdTypeChanges();
|
|
1901
|
+
this.cdr.detectChanges();
|
|
1902
|
+
}
|
|
1903
|
+
else {
|
|
1904
|
+
this.pendingInit = true;
|
|
1905
|
+
}
|
|
1900
1906
|
}
|
|
1901
1907
|
}
|
|
1902
1908
|
ngOnDestroy() {
|
|
@@ -1935,7 +1941,9 @@ class updateUserFormComponent {
|
|
|
1935
1941
|
this.parametersLoaded = true;
|
|
1936
1942
|
this.setParameters();
|
|
1937
1943
|
this.initializeForm();
|
|
1944
|
+
this.trackIdTypeChanges();
|
|
1938
1945
|
this.cdr.detectChanges();
|
|
1946
|
+
this.pendingInit = false;
|
|
1939
1947
|
},
|
|
1940
1948
|
error: (err) => {
|
|
1941
1949
|
console.error('Error fetching parameters:', err);
|
|
@@ -2168,6 +2176,9 @@ class updateUserFormComponent {
|
|
|
2168
2176
|
this.closeModalIS.emit(false);
|
|
2169
2177
|
}
|
|
2170
2178
|
trackIdTypeChanges() {
|
|
2179
|
+
if (this.idTypeSubscription) {
|
|
2180
|
+
this.idTypeSubscription.unsubscribe(); // Unsub old sub before new one (safe for recreation)
|
|
2181
|
+
}
|
|
2171
2182
|
this.idTypeSubscription = this.updateUserForm.get('id_card_type')?.valueChanges.subscribe(value => {
|
|
2172
2183
|
this.updateIdCardValidators(value);
|
|
2173
2184
|
});
|