iptdevs-design-system 3.2.9 → 3.2.10
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 +1 -24
- package/fesm2015/iptdevs-design-system.mjs +0 -23
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +0 -23
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1952,7 +1952,6 @@ class updateUserFormComponent {
|
|
|
1952
1952
|
this.updateUserForm.get('status')?.disable({ emitEvent: false });
|
|
1953
1953
|
}
|
|
1954
1954
|
else {
|
|
1955
|
-
// Lista reducida para otros roles
|
|
1956
1955
|
this.justifyOptions = [
|
|
1957
1956
|
{ name: 'Activo', code: 1 },
|
|
1958
1957
|
{ name: 'Removido', code: 4 }
|
|
@@ -2056,7 +2055,6 @@ class updateUserFormComponent {
|
|
|
2056
2055
|
}
|
|
2057
2056
|
initializeForm() {
|
|
2058
2057
|
this.showParentSection = !!this.DataStudent?.cods?.parent?.code;
|
|
2059
|
-
// this.showEmailIpt = !!this.DataStudent?.email_ipt && this.DataStudent.email_ipt !== false;
|
|
2060
2058
|
this.checkRoleForAdditionalFields(this.DataStudent.role);
|
|
2061
2059
|
this.initForm();
|
|
2062
2060
|
this.populateForm();
|
|
@@ -2182,9 +2180,7 @@ class updateUserFormComponent {
|
|
|
2182
2180
|
country: this.DataStudent.city?.country,
|
|
2183
2181
|
state: this.DataStudent.city?.state,
|
|
2184
2182
|
city: this.DataStudent.city?.code,
|
|
2185
|
-
// role: this.transformRole(this.DataStudent.role) || '',
|
|
2186
2183
|
role: this.canEditRole ? this.DataStudent.role : this.transformRole(this.DataStudent.role) || '',
|
|
2187
|
-
// service_hour: this.DataStudent.service_hour || 0,
|
|
2188
2184
|
changePassword: false,
|
|
2189
2185
|
password: '',
|
|
2190
2186
|
re_password: '',
|
|
@@ -2198,9 +2194,6 @@ class updateUserFormComponent {
|
|
|
2198
2194
|
else {
|
|
2199
2195
|
formValue.service_hour = this.DataStudent.service_hour || 0;
|
|
2200
2196
|
}
|
|
2201
|
-
// if (this.showEmailIpt) {
|
|
2202
|
-
// formValue.email_ipt = this.DataStudent.email_ipt || '';
|
|
2203
|
-
// }
|
|
2204
2197
|
if (this.showParentSection) {
|
|
2205
2198
|
Object.assign(formValue, {
|
|
2206
2199
|
parent_name: this.DataStudent.cods?.parent?.name || '',
|
|
@@ -2401,7 +2394,6 @@ class updateUserFormComponent {
|
|
|
2401
2394
|
selectRole(role) {
|
|
2402
2395
|
if (role !== null) {
|
|
2403
2396
|
this.updateUserForm.get('role')?.setValue(role);
|
|
2404
|
-
// Verificar si se deben mostrar los campos adicionales
|
|
2405
2397
|
const previousShowEmailIptAndServiceHour = this.showEmailIptAndServiceHour;
|
|
2406
2398
|
this.checkRoleForAdditionalFields(role);
|
|
2407
2399
|
// Si showEmailIptAndServiceHour cambió, actualizar los validadores
|
|
@@ -2428,7 +2420,6 @@ class updateUserFormComponent {
|
|
|
2428
2420
|
}
|
|
2429
2421
|
}
|
|
2430
2422
|
else {
|
|
2431
|
-
// Remover validadores si los campos no son necesarios
|
|
2432
2423
|
if (emailIptControl) {
|
|
2433
2424
|
emailIptControl.clearValidators();
|
|
2434
2425
|
emailIptControl.setValue('');
|
|
@@ -2438,7 +2429,6 @@ class updateUserFormComponent {
|
|
|
2438
2429
|
serviceHourControl.setValue(0);
|
|
2439
2430
|
}
|
|
2440
2431
|
}
|
|
2441
|
-
// Actualizar la validez de los controles
|
|
2442
2432
|
emailIptControl?.updateValueAndValidity();
|
|
2443
2433
|
serviceHourControl?.updateValueAndValidity();
|
|
2444
2434
|
}
|
|
@@ -2513,7 +2503,6 @@ class updateUserFormComponent {
|
|
|
2513
2503
|
originalValue = this.DataStudent.email || '';
|
|
2514
2504
|
break;
|
|
2515
2505
|
case 'email_ipt':
|
|
2516
|
-
// originalValue = this.DataStudent.email_ipt || '';
|
|
2517
2506
|
originalValue = this.showEmailIptAndServiceHour ? (this.DataStudent.email_ipt || '') : '';
|
|
2518
2507
|
break;
|
|
2519
2508
|
case 'gender':
|
|
@@ -2541,11 +2530,9 @@ class updateUserFormComponent {
|
|
|
2541
2530
|
originalValue = this.DataStudent.city?.code || '';
|
|
2542
2531
|
break;
|
|
2543
2532
|
case 'role':
|
|
2544
|
-
// originalValue = this.transformRole(this.DataStudent.role) || '';
|
|
2545
2533
|
originalValue = this.canEditRole ? this.DataStudent.role : this.transformRole(this.DataStudent.role) || '';
|
|
2546
2534
|
break;
|
|
2547
2535
|
case 'service_hour':
|
|
2548
|
-
// originalValue = this.DataStudent.service_hour || '' ;
|
|
2549
2536
|
originalValue = this.showEmailIptAndServiceHour ? (this.DataStudent.service_hour || 0) : 0;
|
|
2550
2537
|
break;
|
|
2551
2538
|
case 'status':
|
|
@@ -2594,11 +2581,6 @@ class updateUserFormComponent {
|
|
|
2594
2581
|
this.updateUserForm.hasError('mismatch') ||
|
|
2595
2582
|
!this.hasFormChanged()) {
|
|
2596
2583
|
this.updateUserForm.markAllAsTouched();
|
|
2597
|
-
console.log('Validation failed:', {
|
|
2598
|
-
invalid: this.updateUserForm.invalid,
|
|
2599
|
-
mismatch: this.updateUserForm.hasError('mismatch'),
|
|
2600
|
-
hasChanges: this.hasFormChanged()
|
|
2601
|
-
});
|
|
2602
2584
|
return;
|
|
2603
2585
|
}
|
|
2604
2586
|
this.showConfirmSection = true;
|
|
@@ -2690,11 +2672,6 @@ class updateUserFormComponent {
|
|
|
2690
2672
|
this.updateUserForm.hasError('mismatch') ||
|
|
2691
2673
|
!this.hasFormChanged()) {
|
|
2692
2674
|
this.updateUserForm.markAllAsTouched();
|
|
2693
|
-
console.log('Validation failed:', {
|
|
2694
|
-
invalid: this.updateUserForm.invalid,
|
|
2695
|
-
mismatch: this.updateUserForm.hasError('mismatch'),
|
|
2696
|
-
hasChanges: this.hasFormChanged()
|
|
2697
|
-
});
|
|
2698
2675
|
return;
|
|
2699
2676
|
}
|
|
2700
2677
|
this.confirmForm.reset();
|