iptdevs-design-system 3.1.994 → 3.1.997
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 +103 -114
- package/fesm2015/iptdevs-design-system.mjs +101 -96
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +101 -111
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/lib/components/forms/update-user-form/update-user-form.component.d.ts +3 -6
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import { CurrencyMaskModule } from 'ng2-currency-mask';
|
|
|
5
5
|
import * as i1 from '@angular/common';
|
|
6
6
|
import { CommonModule, CurrencyPipe, TitleCasePipe } from '@angular/common';
|
|
7
7
|
import * as i2 from 'primeng/api';
|
|
8
|
-
import {
|
|
8
|
+
import { MessageService } from 'primeng/api';
|
|
9
9
|
import * as i7$3 from 'primeng/tabview';
|
|
10
10
|
import { TabViewModule } from 'primeng/tabview';
|
|
11
11
|
import * as i1$1 from '@angular/forms';
|
|
@@ -1855,13 +1855,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
|
|
|
1855
1855
|
}] });
|
|
1856
1856
|
|
|
1857
1857
|
class updateUserFormComponent {
|
|
1858
|
-
constructor(fb, cdr, parameterService, baseService, userService
|
|
1858
|
+
constructor(fb, cdr, parameterService, baseService, userService) {
|
|
1859
1859
|
this.fb = fb;
|
|
1860
1860
|
this.cdr = cdr;
|
|
1861
1861
|
this.parameterService = parameterService;
|
|
1862
1862
|
this.baseService = baseService;
|
|
1863
1863
|
this.userService = userService;
|
|
1864
|
-
this.confirmationService = confirmationService;
|
|
1865
1864
|
this.visibleModal = false;
|
|
1866
1865
|
this.closeModalIS = new EventEmitter();
|
|
1867
1866
|
this.userUpdatedEvent = new EventEmitter();
|
|
@@ -1881,15 +1880,12 @@ class updateUserFormComponent {
|
|
|
1881
1880
|
this.genders = [];
|
|
1882
1881
|
this.stratums = [];
|
|
1883
1882
|
this.showConfirmDialog = false;
|
|
1883
|
+
this.userRoleCommercial = false;
|
|
1884
1884
|
// userUpdated = false;
|
|
1885
1885
|
this.initialFormValue = [];
|
|
1886
1886
|
this.pendingInit = false;
|
|
1887
1887
|
this.isStudent = false;
|
|
1888
1888
|
this.justifyOptions = [];
|
|
1889
|
-
// justifyOptions: any[] = [
|
|
1890
|
-
// { name: 'Activo', code: 1 },
|
|
1891
|
-
// { name: 'Removido', code: 4 }
|
|
1892
|
-
// ];
|
|
1893
1889
|
this.reasons = [
|
|
1894
1890
|
{ name: 'Corrección de errores en datos personales', code: 1 },
|
|
1895
1891
|
{ name: 'Correccion de documentacion', code: 2 },
|
|
@@ -1901,6 +1897,7 @@ class updateUserFormComponent {
|
|
|
1901
1897
|
];
|
|
1902
1898
|
this.initForm();
|
|
1903
1899
|
this.initConfirmForm();
|
|
1900
|
+
this.validationUserRole();
|
|
1904
1901
|
}
|
|
1905
1902
|
ngOnInit() {
|
|
1906
1903
|
this.getParameters();
|
|
@@ -1913,6 +1910,7 @@ class updateUserFormComponent {
|
|
|
1913
1910
|
this.initializeForm();
|
|
1914
1911
|
this.setJustifyOptions();
|
|
1915
1912
|
this.trackIdTypeChanges();
|
|
1913
|
+
this.validationUserRole();
|
|
1916
1914
|
this.cdr.detectChanges();
|
|
1917
1915
|
}
|
|
1918
1916
|
else {
|
|
@@ -2184,9 +2182,19 @@ class updateUserFormComponent {
|
|
|
2184
2182
|
}
|
|
2185
2183
|
}
|
|
2186
2184
|
}
|
|
2185
|
+
validationUserRole() {
|
|
2186
|
+
const userRole = this.baseService.getUserRole();
|
|
2187
|
+
if (userRole == 40 || userRole == 41 || userRole == 42) {
|
|
2188
|
+
this.userRoleCommercial = true;
|
|
2189
|
+
}
|
|
2190
|
+
else {
|
|
2191
|
+
this.userRoleCommercial = false;
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2187
2194
|
closeTable() {
|
|
2188
2195
|
this.visibleModal = false;
|
|
2189
2196
|
this.showConfirmDialog = false;
|
|
2197
|
+
this.confirmForm.reset();
|
|
2190
2198
|
this.updateUserForm.reset();
|
|
2191
2199
|
this.idTypes = [];
|
|
2192
2200
|
this.countries = [];
|
|
@@ -2196,7 +2204,7 @@ class updateUserFormComponent {
|
|
|
2196
2204
|
}
|
|
2197
2205
|
trackIdTypeChanges() {
|
|
2198
2206
|
if (this.idTypeSubscription) {
|
|
2199
|
-
this.idTypeSubscription.unsubscribe();
|
|
2207
|
+
this.idTypeSubscription.unsubscribe();
|
|
2200
2208
|
}
|
|
2201
2209
|
this.idTypeSubscription = this.updateUserForm.get('id_card_type')?.valueChanges.subscribe(value => {
|
|
2202
2210
|
this.updateIdCardValidators(value);
|
|
@@ -2323,97 +2331,84 @@ class updateUserFormComponent {
|
|
|
2323
2331
|
selectReason(reason) {
|
|
2324
2332
|
this.confirmForm.controls['reason'].setValue(reason ? reason : null);
|
|
2325
2333
|
}
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
}
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
Swal.fire({
|
|
2405
|
-
position: 'center',
|
|
2406
|
-
icon: 'error',
|
|
2407
|
-
title: 'Ha ocurrido un error inesperado',
|
|
2408
|
-
text: response.data.message,
|
|
2409
|
-
showConfirmButton: false,
|
|
2410
|
-
timer: 2500,
|
|
2411
|
-
});
|
|
2412
|
-
// this.userUpdated = false
|
|
2413
|
-
}
|
|
2414
|
-
});
|
|
2415
|
-
this.loader = false;
|
|
2416
|
-
}
|
|
2334
|
+
// updateUser(): void {
|
|
2335
|
+
// if (
|
|
2336
|
+
// this.updateUserForm.invalid ||
|
|
2337
|
+
// this.updateUserForm.hasError('mismatch') ||
|
|
2338
|
+
// !this.hasFormChanged()
|
|
2339
|
+
// ) {
|
|
2340
|
+
// this.updateUserForm.markAllAsTouched();
|
|
2341
|
+
// console.log('createUser - Validation failed:', {
|
|
2342
|
+
// invalid: this.updateUserForm.invalid,
|
|
2343
|
+
// mismatch: this.updateUserForm.hasError('mismatch'),
|
|
2344
|
+
// hasChanges: this.hasFormChanged()
|
|
2345
|
+
// });
|
|
2346
|
+
// return;
|
|
2347
|
+
// }
|
|
2348
|
+
// this.loader = true;
|
|
2349
|
+
// const formValue = this.updateUserForm.getRawValue();
|
|
2350
|
+
// const request:any = {
|
|
2351
|
+
// token: this.baseService.getUserToken(),
|
|
2352
|
+
// user: {
|
|
2353
|
+
// code: this.DataStudent.code,
|
|
2354
|
+
// name: formValue.name,
|
|
2355
|
+
// last_name: formValue.last_name,
|
|
2356
|
+
// id_card_type: formValue.id_card_type,
|
|
2357
|
+
// id_card: formValue.id_card,
|
|
2358
|
+
// phone_indicative: formValue.phone_indicative,
|
|
2359
|
+
// phone_number: formValue.phone_number,
|
|
2360
|
+
// email: formValue.email,
|
|
2361
|
+
// gender: formValue.gender,
|
|
2362
|
+
// city: formValue.city,
|
|
2363
|
+
// service_hour: formValue.service_hour,
|
|
2364
|
+
// role: this.DataStudent.role,
|
|
2365
|
+
// status: formValue.status,
|
|
2366
|
+
// ...(this.showEmailIpt ? { email_ipt: formValue.email_ipt } : {}),
|
|
2367
|
+
// ...(formValue.changePassword && formValue.password ? { password: formValue.password } : {})
|
|
2368
|
+
// },
|
|
2369
|
+
// parent: this.showParentSection
|
|
2370
|
+
// ? {
|
|
2371
|
+
// code: this.DataStudent.cods?.parent?.code || null,
|
|
2372
|
+
// name: formValue.parent_name || null,
|
|
2373
|
+
// last_name: formValue.parent_last_name || null,
|
|
2374
|
+
// id_card_type: formValue.parent_id_card_type || null,
|
|
2375
|
+
// id_card: formValue.parent_id_card || null,
|
|
2376
|
+
// phone_indicative: formValue.parent_phone_indicative || null,
|
|
2377
|
+
// phone_number: formValue.parent_phone_number || null,
|
|
2378
|
+
// occupation: formValue.parent_occupation || null,
|
|
2379
|
+
// office_adrress: formValue.parent_office_adrress || null,
|
|
2380
|
+
// email: formValue.parent_email || null
|
|
2381
|
+
// }
|
|
2382
|
+
// : null
|
|
2383
|
+
// };
|
|
2384
|
+
// console.log(request);
|
|
2385
|
+
// this.userService.updateUserAndParentByCode(request).subscribe((response) => {
|
|
2386
|
+
// // this.courseType = response.data;
|
|
2387
|
+
// if (response.message.code === 1) {
|
|
2388
|
+
// Swal.fire({
|
|
2389
|
+
// position: 'center',
|
|
2390
|
+
// icon: 'success',
|
|
2391
|
+
// title: 'usuario actualizado satisfactoriamente',
|
|
2392
|
+
// showConfirmButton: false,
|
|
2393
|
+
// timer: 2500,
|
|
2394
|
+
// });
|
|
2395
|
+
// // this.userUpdated = true
|
|
2396
|
+
// this.userUpdatedEvent.emit();
|
|
2397
|
+
// this.closeTable();
|
|
2398
|
+
// }else{
|
|
2399
|
+
// Swal.fire({
|
|
2400
|
+
// position: 'center',
|
|
2401
|
+
// icon: 'error',
|
|
2402
|
+
// title: 'Ha ocurrido un error inesperado',
|
|
2403
|
+
// text: response.data.message,
|
|
2404
|
+
// showConfirmButton: false,
|
|
2405
|
+
// timer: 2500,
|
|
2406
|
+
// });
|
|
2407
|
+
// // this.userUpdated = false
|
|
2408
|
+
// }
|
|
2409
|
+
// });
|
|
2410
|
+
// this.loader = false;
|
|
2411
|
+
// }
|
|
2417
2412
|
hasFormChanged() {
|
|
2418
2413
|
if (!this.initialFormValue || !this.DataStudent) {
|
|
2419
2414
|
return false;
|
|
@@ -2649,8 +2644,8 @@ class updateUserFormComponent {
|
|
|
2649
2644
|
});
|
|
2650
2645
|
return;
|
|
2651
2646
|
}
|
|
2652
|
-
this.confirmForm.reset();
|
|
2653
|
-
this.showConfirmDialog = true;
|
|
2647
|
+
this.confirmForm.reset();
|
|
2648
|
+
this.showConfirmDialog = true;
|
|
2654
2649
|
}
|
|
2655
2650
|
acceptConfirmDialog() {
|
|
2656
2651
|
if (this.confirmForm.invalid) {
|
|
@@ -2661,25 +2656,20 @@ class updateUserFormComponent {
|
|
|
2661
2656
|
}
|
|
2662
2657
|
rejectConfirmDialog() {
|
|
2663
2658
|
this.confirmForm.reset();
|
|
2664
|
-
console.log('Confirm dialog rejected');
|
|
2665
2659
|
}
|
|
2666
2660
|
closeConfirmDialog() {
|
|
2667
2661
|
this.showConfirmDialog = false;
|
|
2668
2662
|
this.confirmForm.reset();
|
|
2669
|
-
this.confirmForm.get('reason')?.setValue(
|
|
2663
|
+
this.confirmForm.get('reason')?.setValue('');
|
|
2670
2664
|
this.confirmForm.get('observation')?.setValue('');
|
|
2671
2665
|
}
|
|
2672
|
-
logObservation(value) {
|
|
2673
|
-
console.log('Observation changed:', value, this.confirmForm.getRawValue(), this.confirmForm.valid);
|
|
2674
|
-
this.cdr.detectChanges();
|
|
2675
|
-
}
|
|
2676
2666
|
}
|
|
2677
|
-
updateUserFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: updateUserFormComponent, deps: [{ token: i1$1.FormBuilder }, { token: i0.ChangeDetectorRef }, { token: ParameterService }, { token: BaseService }, { token: UserService }
|
|
2678
|
-
updateUserFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: updateUserFormComponent, selector: "ipt-update-user-form", inputs: { DataStudent: "DataStudent", visibleModal: "visibleModal" }, outputs: { closeModalIS: "closeModalIS", userUpdatedEvent: "userUpdatedEvent" }, providers: [ConfirmationService], usesOnChanges: true, ngImport: i0, template: "<main *ngIf=\"visibleModal\">\n <div class=\"modal_container\">\n <div class=\"header_modal yellow-300\">\n <h1>Actualizar usuario</h1>\n <button (click)=\"closeTable()\">x</button>\n </div>\n <div class=\"grid_container\">\n <div>\n <form *ngIf=\"updateUserForm\" autocomplete=\"off\" [formGroup]=\"updateUserForm\">\n <!-- User Information Section -->\n <div class=\"section-header\">\n <h2>Informaci\u00F3n del usuario</h2>\n </div>\n <div class=\"form-grid\">\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Nombres'\"\n [control]=\"updateUserForm.controls['name']\"\n [validateText]=\"updateUserForm.controls['name'].hasError('required') ? 'Debe ingresar el nombre' :\n updateUserForm.controls['name'].hasError('minlength') ? 'M\u00EDnimo 3 caracteres' :\n updateUserForm.controls['name'].hasError('maxlength') ? 'M\u00E1ximo 32 caracteres' :\n updateUserForm.controls['name'].hasError('pattern') ? 'Solo letras, espacios y guiones' :\n updateUserForm.controls['name'].hasError('hasWhitespace') ? 'No se permiten espacios al inicio o final' :\n updateUserForm.controls['name'].hasError('onlyWhitespace') ? 'No se permiten solo espacios' :\n 'Debe ingresar el nombre'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Apellidos'\"\n [control]=\"updateUserForm.controls['last_name']\"\n [validateText]=\"updateUserForm.controls['last_name'].hasError('required') ? 'Debe ingresar los apellidos' :\n updateUserForm.controls['last_name'].hasError('minlength') ? 'M\u00EDnimo 3 caracteres' :\n updateUserForm.controls['last_name'].hasError('maxlength') ? 'M\u00E1ximo 32 caracteres' :\n updateUserForm.controls['last_name'].hasError('pattern') ? 'Solo letras, espacios y guiones' :\n updateUserForm.controls['last_name'].hasError('hasWhitespace') ? 'No se permiten espacios al inicio o final' :\n updateUserForm.controls['last_name'].hasError('onlyWhitespace') ? 'No se permiten solo espacios' :\n 'Debe ingresar los apellidos'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'email'\"\n [placeHolder]=\"'Email'\"\n [control]=\"updateUserForm.controls['email']\"\n [validateText]=\"updateUserForm.controls['email'].hasError('required') ? 'Debe ingresar un correo v\u00E1lido' :\n updateUserForm.controls['email'].hasError('maxlength') ? 'M\u00E1ximo 300 caracteres' :\n updateUserForm.controls['email'].hasError('pattern') ? 'Tiene que ser un email correcto' :\n updateUserForm.controls['email'].hasError('hasWhitespace') ? 'No se permiten espacios al inicio o final' :\n updateUserForm.controls['email'].hasError('onlyWhitespace') ? 'No se permiten solo espacios' :\n 'Debe ingresar un correo v\u00E1lido'\"\n ></ipt-input>\n <ipt-input\n *ngIf=\"showEmailIpt\"\n [inputType]=\"'text'\"\n [placeHolder]=\"'Email IPT'\"\n [control]=\"updateUserForm.controls['email_ipt']\"\n [validateText]=\"updateUserForm.controls['email_ipt'].hasError('required') ? 'Debe ingresar un correo IPT v\u00E1lido' :\n updateUserForm.controls['email_ipt'].hasError('maxlength') ? 'M\u00E1ximo 255 caracteres' :\n updateUserForm.controls['email_ipt'].hasError('pattern') ? 'Tiene que ser un email correcto' :\n updateUserForm.controls['email_ipt'].hasError('hasWhitespace') ? 'No se permiten espacios al inicio o final' :\n updateUserForm.controls['email_ipt'].hasError('onlyWhitespace') ? 'No se permiten solo espacios' :\n 'Debe ingresar un correo IPT v\u00E1lido'\"\n ></ipt-input>\n <ipt-input\n *ngIf=\"showEmailIpt\"\n [inputType]=\"'number'\"\n [placeHolder]=\"'Horas de servicio'\"\n [control]=\"updateUserForm.controls['service_hour']\"\n [validateText]=\"'Debe ingresar las horas de servicio'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Rol'\"\n [control]=\"updateUserForm.controls['role']\"\n [validateText]=\"'Rol requerido'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['gender'].value\"\n [control]=\"updateUserForm.controls['gender']\"\n [selectCode]=\"updateUserForm.controls['gender'].value === null ? 'Seleccione g\u00E9nero' : (updateUserForm.controls['gender'].value | genderDisplay)\"\n [data]=\"genders\"\n (eventSelect)=\"selectGender($event)\"\n [defaultText]=\"'Seleccione g\u00E9nero'\"\n ></ipt-select>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['phone_indicative'].value\"\n [control]=\"updateUserForm.controls['phone_indicative']\"\n [data]=\"indicatives\"\n (eventSelect)=\"selectIndicative('phone_indicative', $event)\"\n [defaultText]=\"'Indicativo'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'Tel\u00E9fono'\"\n [control]=\"updateUserForm.controls['phone_number']\"\n [validateText]=\"'Debe ingresar un n\u00FAmero de tel\u00E9fono v\u00E1lido'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['id_card_type'].value\"\n [control]=\"updateUserForm.controls['id_card_type']\"\n [selectCode]=\"updateUserForm.controls['id_card_type'].value === null ? 'Tipo de documento' : updateUserForm.controls['id_card_type'].value\"\n [isRequired]=\"true\"\n [data]=\"idTypes\"\n (eventSelect)=\"selectIdType('id_card_type', $event)\"\n [defaultText]=\"'Tipo de documento'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Documento'\"\n [control]=\"updateUserForm.controls['id_card']\"\n [validateText]=\"updateUserForm.controls['id_card'].hasError('required') ? 'Debe ingresar el n\u00FAmero de documento' :\n updateUserForm.controls['id_card'].hasError('minlength') ? 'M\u00EDnimo 5 caracteres' :\n updateUserForm.controls['id_card'].hasError('maxlength') ? 'M\u00E1ximo 20 caracteres' :\n updateUserForm.controls['id_card'].hasError('pattern') ? (updateUserForm.controls['id_card_type'].value === 7 || updateUserForm.controls['id_card_type'].value === 5 ? 'Solo letras y n\u00FAmeros permitidos' : 'Solo n\u00FAmeros permitidos') :\n 'Debe ingresar el n\u00FAmero de documento'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['country'].value\"\n [control]=\"updateUserForm.controls['country']\"\n [selectCode]=\"updateUserForm.controls['country'].value === null ? 'Pa\u00EDs de residencia' : updateUserForm.controls['country'].value\"\n (eventSelect)=\"selectCountry($event)\"\n [data]=\"countries\"\n [defaultText]=\"'Pa\u00EDs de residencia'\"\n ></ipt-select>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['state'].value\"\n [control]=\"updateUserForm.controls['state']\"\n [selectCode]=\"updateUserForm.controls['state'].value === null ? 'Departamento o estado' : updateUserForm.controls['state'].value\"\n [isRequired]=\"true\"\n (eventSelect)=\"selectState($event)\"\n [data]=\"states\"\n [defaultText]=\"'Departamento o estado'\"\n ></ipt-select>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['city'].value\"\n [control]=\"updateUserForm.controls['city']\"\n [selectCode]=\"updateUserForm.controls['city'].value === null ? 'Ciudad de residencia' : updateUserForm.controls['city'].value\"\n (eventSelect)=\"selectCity($event)\"\n [data]=\"cities\"\n [defaultText]=\"'Ciudad de residencia'\"\n ></ipt-select>\n <div class=\"card-status\">\n <span class=\"span-status\">Estado</span>\n <p-selectButton \n [options]=\"justifyOptions\" \n formControlName=\"status\" \n optionLabel=\"name\" \n optionValue=\"code\">\n </p-selectButton>\n </div>\n <div class=\"field\">\n <p-checkbox\n formControlName=\"changePassword\"\n label=\"Cambio de contrase\u00F1a\"\n [binary]=\"true\"\n ></p-checkbox>\n </div>\n </div>\n <div class=\"form-grid\" *ngIf=\"updateUserForm.controls['changePassword'].value\">\n <ipt-input\n [inputType]=\"'password'\"\n [placeHolder]=\"'Contrase\u00F1a'\"\n [control]=\"updateUserForm.controls['password']\"\n [validateText]=\"updateUserForm.controls['password'].hasError('required') ? 'La contrase\u00F1a es requerida' :\n updateUserForm.controls['password'].hasError('minlength') ? 'M\u00EDnimo 5 caracteres' :\n updateUserForm.controls['password'].hasError('maxlength') ? 'M\u00E1ximo 32 caracteres' :\n 'Ingrese una contrase\u00F1a v\u00E1lida'\"\n ></ipt-input>\n\n <ipt-input\n [inputType]=\"'password'\"\n [placeHolder]=\"'Repetir contrase\u00F1a'\"\n [control]=\"updateUserForm.controls['re_password']\"\n [validateText]=\"updateUserForm.controls['re_password'].hasError('required') ? 'Debe repetir la contrase\u00F1a' :\n updateUserForm.controls['re_password'].hasError('minlength') ? 'M\u00EDnimo 5 caracteres' :\n updateUserForm.controls['re_password'].hasError('maxlength') ? 'M\u00E1ximo 32 caracteres' :\n updateUserForm.hasError('mismatch') ? 'Las contrase\u00F1as no coinciden' :\n 'Repita la contrase\u00F1a'\"\n ></ipt-input>\n </div>\n\n <!-- Mensaje adicional para el error de mismatch (opcional, si quieres mostrarlo por separado) -->\n\n <div *ngIf=\"updateUserForm.hasError('mismatch') && updateUserForm.controls['changePassword'].value\" class=\"error-message\">\n <small >Las contrase\u00F1as no coinciden</small>\n </div>\n <!-- Parent Information Section -->\n <div class=\"section-header\" *ngIf=\"DataStudent?.cods\">\n <h2>Informaci\u00F3n del acudiente</h2>\n </div>\n <div *ngIf=\"DataStudent?.cods\">\n <div *ngIf=\"showParentSection; else noParentMessage\">\n <div class=\"form-grid\">\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Nombres'\"\n [control]=\"updateUserForm.controls['parent_name']\"\n [validateText]=\"'Debe ingresar el nombre'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Apellidos'\"\n [control]=\"updateUserForm.controls['parent_last_name']\"\n [validateText]=\"'Debe ingresar los apellidos'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Ocupaci\u00F3n'\"\n [control]=\"updateUserForm.controls['parent_occupation']\"\n [validateText]=\"'Debe ingresar la ocupaci\u00F3n'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'email'\"\n [placeHolder]=\"'Email'\"\n [control]=\"updateUserForm.controls['parent_email']\"\n [validateText]=\"'Debe ingresar un correo v\u00E1lido'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['parent_id_card_type'].value\"\n [control]=\"updateUserForm.controls['parent_id_card_type']\"\n [selectCode]=\"updateUserForm.controls['parent_id_card_type'].value === null ? 'Tipo de documento' : updateUserForm.controls['parent_id_card_type'].value\"\n [isRequired]=\"true\"\n [data]=\"idTypes\"\n (eventSelect)=\"selectIdType('parent_id_card_type', $event)\"\n [defaultText]=\"'Tipo de documento'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'Documento'\"\n [control]=\"updateUserForm.controls['parent_id_card']\"\n [validateText]=\"'Debe ingresar el n\u00FAmero de documento'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['parent_phone_indicative'].value\"\n [control]=\"updateUserForm.controls['parent_phone_indicative']\"\n [data]=\"indicatives\"\n (eventSelect)=\"selectIndicative('parent_phone_indicative', $event)\"\n [defaultText]=\"'Indicativo'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'Tel\u00E9fono'\"\n [control]=\"updateUserForm.controls['parent_phone_number']\"\n [validateText]=\"'Debe ingresar un n\u00FAmero de tel\u00E9fono v\u00E1lido'\"\n ></ipt-input>\n\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Direcci\u00F3n de oficina'\"\n [control]=\"updateUserForm.controls['parent_office_adrress']\"\n [validateText]=\"'Debe ingresar la direcci\u00F3n'\"\n ></ipt-input>\n </div>\n </div>\n <ng-template #noParentMessage>\n <div class=\"no-parent-message\">\n <p>Sin acudiente</p>\n </div>\n </ng-template>\n </div>\n <div class=\"buttons-container\">\n <div class=\"buttons-container-inner\">\n <ipt-button\n [buttonType]=\"'button'\"\n [label]=\"'Cerrar'\"\n [primary]=\"false\"\n [isEnabled]=\"true\"\n (onClick)=\"closeTable()\"\n ></ipt-button>\n\n <ipt-button\n [label]=\"'Actualizar'\"\n [isEnabled]=\"!loader && updateUserForm.valid && !updateUserForm.hasError('mismatch') && hasFormChanged()\"\n (onClick)=\"showConfirmDialogs()\"\n [primary]=\"true\"\n ></ipt-button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </div>\n\n <!-- Confirm Dialog para raz\u00F3n y observaci\u00F3n -->\n<p-dialog\n header=\"Confirmar Ajuste de Usuario\"\n [(visible)]=\"showConfirmDialog\"\n [modal]=\"true\"\n (onHide)=\"closeConfirmDialog()\"\n >\n <form [formGroup]=\"confirmForm\" class=\"confirm-form\">\n <div class=\"p-field\">\n <ipt-select\n [initialValue]=\"confirmForm.controls['reason'].value\"\n [control]=\"confirmForm.controls['reason']\"\n [data]=\"reasons\"\n optionLabel=\"name\"\n (eventSelect)=\"selectReason($event)\"\n [defaultText]=\"'Seleccione la raz\u00F3n'\"\n ></ipt-select>\n <small *ngIf=\"confirmForm.controls['reason'].invalid && confirmForm.controls['reason'].touched\" class=\"p-error\">\n La raz\u00F3n es requerida\n </small>\n </div>\n <div class=\"p-field\">\n <label class=\"container-observation\">Observaci\u00F3n</label>\n <textarea\n id=\"observation\"\n pInputTextarea\n formControlName=\"observation\"\n rows=\"3\"\n placeholder=\"Describe detalles adicionales del ajuste\"\n (ngModelChange)=\"logObservation($event)\"\n ></textarea>\n <small *ngIf=\"confirmForm.controls['observation'].invalid && confirmForm.controls['observation'].touched\" class=\"p-error\">\n La observaci\u00F3n es requerida\n </small>\n </div>\n </form>\n <p-footer>\n <ipt-button\n class=\"p-button-secondary\"\n [buttonType]=\"'button'\"\n [label]=\"'Cancelar'\"\n [primary]=\"false\"\n [isEnabled]=\"true\"\n (onClick)=\"closeConfirmDialog()\"\n ></ipt-button>\n <ipt-button\n class=\"p-button-secondary\"\n [buttonType]=\"'button'\"\n [label]=\"'Confirmar'\"\n [primary]=\"true\"\n [isEnabled]=\"confirmForm.valid\"\n (onClick)=\"acceptConfirmDialog()\"\n ></ipt-button>\n </p-footer>\n</p-dialog>\n\n</main>", styles: ["@media screen and (min-width: 320px){main{background:rgba(0,0,0,.472);color:#fff;position:fixed;top:0;left:0;height:100vh;width:100vw;transition:all .5s}main .modal_container{width:90%;height:-moz-fit-content;height:fit-content;max-height:90vh;overflow-y:auto;position:fixed;inset:0;margin:auto;background-color:#fff;border-radius:5px}.header_modal{display:flex;padding:15px 15px 0;gap:1rem;align-items:center}.header_modal h1{padding:.5rem;background-color:#1c77f7;color:#fff;width:100%;border-radius:10px;font-size:1.25rem;font-weight:700}.header_modal button{margin-left:auto;font-size:26px;padding:1.2rem;font-weight:200;color:#6c7f7d;display:flex;width:25px;height:25px;align-items:center;justify-content:center;transition:50ms;background-color:transparent;border:none}.header_modal button:hover{cursor:pointer;border-radius:50%;background-color:#d4d4d4}.grid_container{display:grid;grid-template-columns:1fr;padding:0 15px}form{display:grid;grid-template-columns:1fr;gap:.25rem;justify-content:center;padding:0 1rem}.section-header{margin:1.5rem 0 .5rem;border-bottom:2px solid #1c77f7}.section-header h2{font-size:1.2rem;color:#1c77f7;font-weight:600;margin-bottom:.5rem}.form-grid{display:grid;grid-template-columns:1fr;gap:0px .25rem}.buttons-container{margin-top:2rem;margin-bottom:2rem;display:flex;justify-content:flex-end;align-items:center;flex-direction:row}.buttons-container-inner{gap:1rem;width:auto;display:flex}.user-type-image{display:none}.no-parent-message{padding:1rem;text-align:center;color:#666;font-size:1rem;font-weight:500;background-color:#f8f9fa;border-radius:.5rem;margin-top:.5rem}}@media screen and (min-width: 768px){.form-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0px 1rem}}@media screen and (min-width: 1366px){form{padding:0}}.field{margin-top:15px;height:1px;max-width:70%;font-family:Poppins,sans-serif;color:#000;font-size:.875rem}.error-message{color:red;font-size:12px;margin-top:5px}:host ::ng-deep .p-selectbutton{display:flex;flex-wrap:wrap;justify-content:center;width:100%;min-width:10rem}:host ::ng-deep .p-selectbutton .p-button{padding:.5rem;font-size:.875rem;height:30px}:host ::ng-deep .p-buttonset .p-button:first-of-type{height:30px}.span-status{font-family:Poppins,sans-serif;color:#999;font-size:15px;font-weight:400;pointer-events:none;transition:.2s ease all;margin-left:9px}.card-status{margin-top:15px}:host ::ng-deep .p-field{margin-bottom:1.5rem}.p-error{color:red;font-size:.8rem}.confirm-form{display:flex;flex-direction:column;gap:1rem;font-family:Poppins,sans-serif}:host ::ng-deep .p-confirm-dialog .p-dialog-content{padding:1.5rem}:host ::ng-deep .p-confirm-dialog .p-dialog-footer{display:flex;justify-content:flex-end;gap:1rem}:host ::ng-deep .p-dialog{width:45%!important}.container-observation{width:100%;font-family:Poppins,sans-serif;color:#1c77f7;font-size:15px;font-weight:400;pointer-events:none}textarea{box-shadow:#64646f33 0 7px 29px;border-radius:3px;outline:none;display:block;transition:.2s;font-weight:300;font-family:Poppins,sans-serif;width:-webkit-fill-available;width:-moz-available;padding-left:10px;background-color:#fff;-webkit-appearance:none;max-height:80px;font-size:14px;max-width:100%}textarea::placeholder{color:#999;font-weight:400;font-family:Poppins,sans-serif;pointer-events:none}textarea::focus textarea:focus-visible{color:#999;font-size:15px;font-weight:400;font-family:Poppins,sans-serif;pointer-events:none;border:#1c77f7 1px solid;outline:none}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.Footer, selector: "p-footer" }, { kind: "component", type: i7.SelectButton, selector: "p-selectButton", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "tabindex", "multiple", "style", "styleClass", "ariaLabelledBy", "disabled", "dataKey"], outputs: ["onOptionClick", "onChange"] }, { kind: "component", type: i8.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "trueValue", "falseValue"], outputs: ["onChange"] }, { kind: "component", type: i9.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "component", type: ButtonComponent, selector: "ipt-button", inputs: ["primary", "size", "label", "buttonType", "isEnabled"], outputs: ["onClick"] }, { kind: "component", type: InputComponent, selector: "ipt-input", inputs: ["inputType", "placeHolder", "validateText", "withPipe", "list", "iconUrl", "control", "prefix", "thousands", "decimal", "disabledSel"], outputs: ["dateSelected"] }, { kind: "component", type: SelectComponent, selector: "ipt-select", inputs: ["isRequired", "data", "defaultText", "selectCode", "disabledSel", "initialValue", "label", "control"], outputs: ["eventSelect"] }, { kind: "pipe", type: GenderDisplayPipe, name: "genderDisplay" }] });
|
|
2667
|
+
updateUserFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: updateUserFormComponent, deps: [{ token: i1$1.FormBuilder }, { token: i0.ChangeDetectorRef }, { token: ParameterService }, { token: BaseService }, { token: UserService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2668
|
+
updateUserFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: updateUserFormComponent, selector: "ipt-update-user-form", inputs: { DataStudent: "DataStudent", visibleModal: "visibleModal" }, outputs: { closeModalIS: "closeModalIS", userUpdatedEvent: "userUpdatedEvent" }, providers: [], usesOnChanges: true, ngImport: i0, template: "<main *ngIf=\"visibleModal\">\n <div class=\"modal_container\">\n <div class=\"header_modal yellow-300\">\n <h1>Actualizar usuario</h1>\n <button (click)=\"closeTable()\">x</button>\n </div>\n <div class=\"grid_container\">\n <div>\n <form *ngIf=\"updateUserForm\" autocomplete=\"off\" [formGroup]=\"updateUserForm\">\n <!-- User Information Section -->\n <div class=\"section-header\">\n <h2>Informaci\u00F3n del usuario</h2>\n </div>\n <div class=\"form-grid\">\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Nombres'\"\n [control]=\"updateUserForm.controls['name']\"\n [validateText]=\"updateUserForm.controls['name'].hasError('required') ? 'Debe ingresar el nombre' :\n updateUserForm.controls['name'].hasError('minlength') ? 'M\u00EDnimo 3 caracteres' :\n updateUserForm.controls['name'].hasError('maxlength') ? 'M\u00E1ximo 32 caracteres' :\n updateUserForm.controls['name'].hasError('pattern') ? 'Solo letras, espacios y guiones' :\n updateUserForm.controls['name'].hasError('hasWhitespace') ? 'No se permiten espacios al inicio o final' :\n updateUserForm.controls['name'].hasError('onlyWhitespace') ? 'No se permiten solo espacios' :\n 'Debe ingresar el nombre'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Apellidos'\"\n [control]=\"updateUserForm.controls['last_name']\"\n [validateText]=\"updateUserForm.controls['last_name'].hasError('required') ? 'Debe ingresar los apellidos' :\n updateUserForm.controls['last_name'].hasError('minlength') ? 'M\u00EDnimo 3 caracteres' :\n updateUserForm.controls['last_name'].hasError('maxlength') ? 'M\u00E1ximo 32 caracteres' :\n updateUserForm.controls['last_name'].hasError('pattern') ? 'Solo letras, espacios y guiones' :\n updateUserForm.controls['last_name'].hasError('hasWhitespace') ? 'No se permiten espacios al inicio o final' :\n updateUserForm.controls['last_name'].hasError('onlyWhitespace') ? 'No se permiten solo espacios' :\n 'Debe ingresar los apellidos'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'email'\"\n [placeHolder]=\"'Email'\"\n [control]=\"updateUserForm.controls['email']\"\n [validateText]=\"updateUserForm.controls['email'].hasError('required') ? 'Debe ingresar un correo v\u00E1lido' :\n updateUserForm.controls['email'].hasError('maxlength') ? 'M\u00E1ximo 300 caracteres' :\n updateUserForm.controls['email'].hasError('pattern') ? 'Tiene que ser un email correcto' :\n updateUserForm.controls['email'].hasError('hasWhitespace') ? 'No se permiten espacios al inicio o final' :\n updateUserForm.controls['email'].hasError('onlyWhitespace') ? 'No se permiten solo espacios' :\n 'Debe ingresar un correo v\u00E1lido'\"\n ></ipt-input>\n <ipt-input\n *ngIf=\"showEmailIpt\"\n [inputType]=\"'text'\"\n [placeHolder]=\"'Email IPT'\"\n [control]=\"updateUserForm.controls['email_ipt']\"\n [validateText]=\"updateUserForm.controls['email_ipt'].hasError('required') ? 'Debe ingresar un correo IPT v\u00E1lido' :\n updateUserForm.controls['email_ipt'].hasError('maxlength') ? 'M\u00E1ximo 255 caracteres' :\n updateUserForm.controls['email_ipt'].hasError('pattern') ? 'Tiene que ser un email correcto' :\n updateUserForm.controls['email_ipt'].hasError('hasWhitespace') ? 'No se permiten espacios al inicio o final' :\n updateUserForm.controls['email_ipt'].hasError('onlyWhitespace') ? 'No se permiten solo espacios' :\n 'Debe ingresar un correo IPT v\u00E1lido'\"\n ></ipt-input>\n <ipt-input\n *ngIf=\"showEmailIpt\"\n [inputType]=\"'number'\"\n [placeHolder]=\"'Horas de servicio'\"\n [control]=\"updateUserForm.controls['service_hour']\"\n [validateText]=\"'Debe ingresar las horas de servicio'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Rol'\"\n [control]=\"updateUserForm.controls['role']\"\n [validateText]=\"'Rol requerido'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['gender'].value\"\n [control]=\"updateUserForm.controls['gender']\"\n [selectCode]=\"updateUserForm.controls['gender'].value === null ? 'Seleccione g\u00E9nero' : (updateUserForm.controls['gender'].value | genderDisplay)\"\n [data]=\"genders\"\n (eventSelect)=\"selectGender($event)\"\n [defaultText]=\"'Seleccione g\u00E9nero'\"\n ></ipt-select>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['phone_indicative'].value\"\n [control]=\"updateUserForm.controls['phone_indicative']\"\n [data]=\"indicatives\"\n (eventSelect)=\"selectIndicative('phone_indicative', $event)\"\n [defaultText]=\"'Indicativo'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'Tel\u00E9fono'\"\n [control]=\"updateUserForm.controls['phone_number']\"\n [validateText]=\"'Debe ingresar un n\u00FAmero de tel\u00E9fono v\u00E1lido'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['id_card_type'].value\"\n [control]=\"updateUserForm.controls['id_card_type']\"\n [selectCode]=\"updateUserForm.controls['id_card_type'].value === null ? 'Tipo de documento' : updateUserForm.controls['id_card_type'].value\"\n [isRequired]=\"true\"\n [data]=\"idTypes\"\n (eventSelect)=\"selectIdType('id_card_type', $event)\"\n [defaultText]=\"'Tipo de documento'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Documento'\"\n [control]=\"updateUserForm.controls['id_card']\"\n [validateText]=\"updateUserForm.controls['id_card'].hasError('required') ? 'Debe ingresar el n\u00FAmero de documento' :\n updateUserForm.controls['id_card'].hasError('minlength') ? 'M\u00EDnimo 5 caracteres' :\n updateUserForm.controls['id_card'].hasError('maxlength') ? 'M\u00E1ximo 20 caracteres' :\n updateUserForm.controls['id_card'].hasError('pattern') ? (updateUserForm.controls['id_card_type'].value === 7 || updateUserForm.controls['id_card_type'].value === 5 ? 'Solo letras y n\u00FAmeros permitidos' : 'Solo n\u00FAmeros permitidos') :\n 'Debe ingresar el n\u00FAmero de documento'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['country'].value\"\n [control]=\"updateUserForm.controls['country']\"\n [selectCode]=\"updateUserForm.controls['country'].value === null ? 'Pa\u00EDs de residencia' : updateUserForm.controls['country'].value\"\n (eventSelect)=\"selectCountry($event)\"\n [data]=\"countries\"\n [defaultText]=\"'Pa\u00EDs de residencia'\"\n ></ipt-select>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['state'].value\"\n [control]=\"updateUserForm.controls['state']\"\n [selectCode]=\"updateUserForm.controls['state'].value === null ? 'Departamento o estado' : updateUserForm.controls['state'].value\"\n [isRequired]=\"true\"\n (eventSelect)=\"selectState($event)\"\n [data]=\"states\"\n [defaultText]=\"'Departamento o estado'\"\n ></ipt-select>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['city'].value\"\n [control]=\"updateUserForm.controls['city']\"\n [selectCode]=\"updateUserForm.controls['city'].value === null ? 'Ciudad de residencia' : updateUserForm.controls['city'].value\"\n (eventSelect)=\"selectCity($event)\"\n [data]=\"cities\"\n [defaultText]=\"'Ciudad de residencia'\"\n ></ipt-select>\n <div class=\"card-status\">\n <span class=\"span-status\">Estado</span>\n <p-selectButton \n [options]=\"justifyOptions\" \n formControlName=\"status\" \n optionLabel=\"name\" \n optionValue=\"code\">\n </p-selectButton>\n </div>\n <div *ngIf=\"!userRoleCommercial\" class=\"field\">\n <p-checkbox\n formControlName=\"changePassword\"\n label=\"Cambio de contrase\u00F1a\"\n [binary]=\"true\"\n ></p-checkbox>\n </div>\n </div>\n <div class=\"form-grid\" *ngIf=\"updateUserForm.controls['changePassword'].value\">\n <ipt-input\n [inputType]=\"'password'\"\n [placeHolder]=\"'Contrase\u00F1a'\"\n [control]=\"updateUserForm.controls['password']\"\n [validateText]=\"updateUserForm.controls['password'].hasError('required') ? 'La contrase\u00F1a es requerida' :\n updateUserForm.controls['password'].hasError('minlength') ? 'M\u00EDnimo 5 caracteres' :\n updateUserForm.controls['password'].hasError('maxlength') ? 'M\u00E1ximo 32 caracteres' :\n 'Ingrese una contrase\u00F1a v\u00E1lida'\"\n ></ipt-input>\n\n <ipt-input\n [inputType]=\"'password'\"\n [placeHolder]=\"'Repetir contrase\u00F1a'\"\n [control]=\"updateUserForm.controls['re_password']\"\n [validateText]=\"updateUserForm.controls['re_password'].hasError('required') ? 'Debe repetir la contrase\u00F1a' :\n updateUserForm.controls['re_password'].hasError('minlength') ? 'M\u00EDnimo 5 caracteres' :\n updateUserForm.controls['re_password'].hasError('maxlength') ? 'M\u00E1ximo 32 caracteres' :\n updateUserForm.hasError('mismatch') ? 'Las contrase\u00F1as no coinciden' :\n 'Repita la contrase\u00F1a'\"\n ></ipt-input>\n </div>\n\n <!-- Mensaje adicional para el error de mismatch (opcional, si quieres mostrarlo por separado) -->\n\n <div *ngIf=\"updateUserForm.hasError('mismatch') && updateUserForm.controls['changePassword'].value\" class=\"error-message\">\n <small >Las contrase\u00F1as no coinciden</small>\n </div>\n <!-- Parent Information Section -->\n <div class=\"section-header\" *ngIf=\"DataStudent?.cods\">\n <h2>Informaci\u00F3n del acudiente</h2>\n </div>\n <div *ngIf=\"DataStudent?.cods\">\n <div *ngIf=\"showParentSection; else noParentMessage\">\n <div class=\"form-grid\">\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Nombres'\"\n [control]=\"updateUserForm.controls['parent_name']\"\n [validateText]=\"'Debe ingresar el nombre'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Apellidos'\"\n [control]=\"updateUserForm.controls['parent_last_name']\"\n [validateText]=\"'Debe ingresar los apellidos'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Ocupaci\u00F3n'\"\n [control]=\"updateUserForm.controls['parent_occupation']\"\n [validateText]=\"'Debe ingresar la ocupaci\u00F3n'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'email'\"\n [placeHolder]=\"'Email'\"\n [control]=\"updateUserForm.controls['parent_email']\"\n [validateText]=\"'Debe ingresar un correo v\u00E1lido'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['parent_id_card_type'].value\"\n [control]=\"updateUserForm.controls['parent_id_card_type']\"\n [selectCode]=\"updateUserForm.controls['parent_id_card_type'].value === null ? 'Tipo de documento' : updateUserForm.controls['parent_id_card_type'].value\"\n [isRequired]=\"true\"\n [data]=\"idTypes\"\n (eventSelect)=\"selectIdType('parent_id_card_type', $event)\"\n [defaultText]=\"'Tipo de documento'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'Documento'\"\n [control]=\"updateUserForm.controls['parent_id_card']\"\n [validateText]=\"'Debe ingresar el n\u00FAmero de documento'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['parent_phone_indicative'].value\"\n [control]=\"updateUserForm.controls['parent_phone_indicative']\"\n [data]=\"indicatives\"\n (eventSelect)=\"selectIndicative('parent_phone_indicative', $event)\"\n [defaultText]=\"'Indicativo'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'Tel\u00E9fono'\"\n [control]=\"updateUserForm.controls['parent_phone_number']\"\n [validateText]=\"'Debe ingresar un n\u00FAmero de tel\u00E9fono v\u00E1lido'\"\n ></ipt-input>\n\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Direcci\u00F3n de oficina'\"\n [control]=\"updateUserForm.controls['parent_office_adrress']\"\n [validateText]=\"'Debe ingresar la direcci\u00F3n'\"\n ></ipt-input>\n </div>\n </div>\n <ng-template #noParentMessage>\n <div class=\"no-parent-message\">\n <p>Sin acudiente</p>\n </div>\n </ng-template>\n </div>\n <div class=\"buttons-container\">\n <div class=\"buttons-container-inner\">\n <ipt-button\n [buttonType]=\"'button'\"\n [label]=\"'Cerrar'\"\n [primary]=\"false\"\n [isEnabled]=\"true\"\n (onClick)=\"closeTable()\"\n ></ipt-button>\n\n <ipt-button\n [label]=\"'Actualizar'\"\n [isEnabled]=\"!loader && updateUserForm.valid && !updateUserForm.hasError('mismatch') && hasFormChanged()\"\n (onClick)=\"showConfirmDialogs()\"\n [primary]=\"true\"\n ></ipt-button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </div>\n\n <!-- Confirm Dialog para raz\u00F3n y observaci\u00F3n -->\n<p-dialog\n header=\"Confirmar Ajuste de Usuario\"\n [(visible)]=\"showConfirmDialog\"\n [modal]=\"true\"\n (onHide)=\"closeConfirmDialog()\"\n >\n <form [formGroup]=\"confirmForm\" class=\"confirm-form\">\n <div class=\"p-field\">\n <ipt-select\n [control]=\"confirmForm.controls['reason']\"\n [data]=\"reasons\"\n optionLabel=\"name\"\n (eventSelect)=\"selectReason($event)\"\n [defaultText]=\"'Seleccione la raz\u00F3n'\"\n ></ipt-select>\n <small *ngIf=\"confirmForm.controls['reason'].invalid && confirmForm.controls['reason'].touched\" class=\"p-error\">\n La raz\u00F3n es requerida\n </small>\n </div>\n <div class=\"p-field\">\n <label class=\"container-observation\">Observaci\u00F3n</label>\n <textarea\n id=\"observation\"\n pInputTextarea\n formControlName=\"observation\"\n rows=\"3\"\n placeholder=\"Describe detalles adicionales del ajuste\"\n ></textarea>\n <small *ngIf=\"confirmForm.controls['observation'].invalid && confirmForm.controls['observation'].touched\" class=\"p-error\">\n La observaci\u00F3n es requerida\n </small>\n </div>\n </form>\n <p-footer>\n <ipt-button\n class=\"p-button-secondary\"\n [buttonType]=\"'button'\"\n [label]=\"'Cancelar'\"\n [primary]=\"false\"\n [isEnabled]=\"true\"\n (onClick)=\"closeConfirmDialog()\"\n ></ipt-button>\n <ipt-button\n class=\"p-button-secondary\"\n [buttonType]=\"'button'\"\n [label]=\"'Confirmar'\"\n [primary]=\"true\"\n [isEnabled]=\"confirmForm.valid\"\n (onClick)=\"acceptConfirmDialog()\"\n ></ipt-button>\n </p-footer>\n</p-dialog>\n\n</main>", styles: ["@media screen and (min-width: 320px){main{background:rgba(0,0,0,.472);color:#fff;position:fixed;top:0;left:0;height:100vh;width:100vw;transition:all .5s}main .modal_container{width:90%;height:-moz-fit-content;height:fit-content;max-height:90vh;overflow-y:auto;position:fixed;inset:0;margin:auto;background-color:#fff;border-radius:5px}.header_modal{display:flex;padding:15px 15px 0;gap:1rem;align-items:center}.header_modal h1{padding:.5rem;background-color:#1c77f7;color:#fff;width:100%;border-radius:10px;font-size:1.25rem;font-weight:700}.header_modal button{margin-left:auto;font-size:26px;padding:1.2rem;font-weight:200;color:#6c7f7d;display:flex;width:25px;height:25px;align-items:center;justify-content:center;transition:50ms;background-color:transparent;border:none}.header_modal button:hover{cursor:pointer;border-radius:50%;background-color:#d4d4d4}.grid_container{display:grid;grid-template-columns:1fr;padding:0 15px}form{display:grid;grid-template-columns:1fr;gap:.25rem;justify-content:center;padding:0 1rem}.section-header{margin:1.5rem 0 .5rem;border-bottom:2px solid #1c77f7}.section-header h2{font-size:1.2rem;color:#1c77f7;font-weight:600;margin-bottom:.5rem}.form-grid{display:grid;grid-template-columns:1fr;gap:0px .25rem}.buttons-container{margin-top:2rem;margin-bottom:2rem;display:flex;justify-content:flex-end;align-items:center;flex-direction:row}.buttons-container-inner{gap:1rem;width:auto;display:flex}.user-type-image{display:none}.no-parent-message{padding:1rem;text-align:center;color:#666;font-size:1rem;font-weight:500;background-color:#f8f9fa;border-radius:.5rem;margin-top:.5rem}}@media screen and (min-width: 768px){.form-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0px 1rem}}@media screen and (min-width: 1366px){form{padding:0}}.field{margin-top:15px;height:1px;max-width:70%;font-family:Poppins,sans-serif;color:#000;font-size:.875rem}.error-message{color:red;font-size:12px;margin-top:5px}:host ::ng-deep .p-selectbutton{display:flex;flex-wrap:wrap;justify-content:center;width:100%;min-width:10rem}:host ::ng-deep .p-selectbutton .p-button{padding:.5rem;font-size:.875rem;height:30px}:host ::ng-deep .p-buttonset .p-button:first-of-type{height:30px}.span-status{font-family:Poppins,sans-serif;color:#999;font-size:15px;font-weight:400;pointer-events:none;transition:.2s ease all;margin-left:9px}.card-status{margin-top:15px}:host ::ng-deep .p-field{margin-bottom:1rem}.p-error{color:red;font-size:.8rem}.confirm-form{display:flex;flex-direction:column;gap:1rem;font-family:Poppins,sans-serif}:host ::ng-deep .p-confirm-dialog .p-dialog-content{padding:1.5rem}:host ::ng-deep .p-confirm-dialog .p-dialog-footer{display:flex;justify-content:flex-end;gap:1rem}:host ::ng-deep .p-dialog{width:45%!important}.container-observation{width:100%;font-family:Poppins,sans-serif;color:#1c77f7;font-size:15px;font-weight:400;pointer-events:none}textarea{box-shadow:#64646f33 0 7px 29px;border-radius:3px;outline:none;display:block;transition:.2s;font-weight:300;font-family:Poppins,sans-serif;width:-webkit-fill-available;width:-moz-available;padding-left:10px;background-color:#fff;-webkit-appearance:none;max-height:80px;font-size:14px;max-width:100%}textarea::placeholder{color:#999;font-weight:400;font-family:Poppins,sans-serif;pointer-events:none}textarea::focus textarea:focus-visible{color:#999;font-size:15px;font-weight:400;font-family:Poppins,sans-serif;pointer-events:none;border:#1c77f7 1px solid;outline:none}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.Footer, selector: "p-footer" }, { kind: "component", type: i7.SelectButton, selector: "p-selectButton", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "tabindex", "multiple", "style", "styleClass", "ariaLabelledBy", "disabled", "dataKey"], outputs: ["onOptionClick", "onChange"] }, { kind: "component", type: i8.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "trueValue", "falseValue"], outputs: ["onChange"] }, { kind: "component", type: i9.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "component", type: ButtonComponent, selector: "ipt-button", inputs: ["primary", "size", "label", "buttonType", "isEnabled"], outputs: ["onClick"] }, { kind: "component", type: InputComponent, selector: "ipt-input", inputs: ["inputType", "placeHolder", "validateText", "withPipe", "list", "iconUrl", "control", "prefix", "thousands", "decimal", "disabledSel"], outputs: ["dateSelected"] }, { kind: "component", type: SelectComponent, selector: "ipt-select", inputs: ["isRequired", "data", "defaultText", "selectCode", "disabledSel", "initialValue", "label", "control"], outputs: ["eventSelect"] }, { kind: "pipe", type: GenderDisplayPipe, name: "genderDisplay" }] });
|
|
2679
2669
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: updateUserFormComponent, decorators: [{
|
|
2680
2670
|
type: Component,
|
|
2681
|
-
args: [{ selector: 'ipt-update-user-form', providers: [ConfirmationService], template: "<main *ngIf=\"visibleModal\">\n <div class=\"modal_container\">\n <div class=\"header_modal yellow-300\">\n <h1>Actualizar usuario</h1>\n <button (click)=\"closeTable()\">x</button>\n </div>\n <div class=\"grid_container\">\n <div>\n <form *ngIf=\"updateUserForm\" autocomplete=\"off\" [formGroup]=\"updateUserForm\">\n <!-- User Information Section -->\n <div class=\"section-header\">\n <h2>Informaci\u00F3n del usuario</h2>\n </div>\n <div class=\"form-grid\">\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Nombres'\"\n [control]=\"updateUserForm.controls['name']\"\n [validateText]=\"updateUserForm.controls['name'].hasError('required') ? 'Debe ingresar el nombre' :\n updateUserForm.controls['name'].hasError('minlength') ? 'M\u00EDnimo 3 caracteres' :\n updateUserForm.controls['name'].hasError('maxlength') ? 'M\u00E1ximo 32 caracteres' :\n updateUserForm.controls['name'].hasError('pattern') ? 'Solo letras, espacios y guiones' :\n updateUserForm.controls['name'].hasError('hasWhitespace') ? 'No se permiten espacios al inicio o final' :\n updateUserForm.controls['name'].hasError('onlyWhitespace') ? 'No se permiten solo espacios' :\n 'Debe ingresar el nombre'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Apellidos'\"\n [control]=\"updateUserForm.controls['last_name']\"\n [validateText]=\"updateUserForm.controls['last_name'].hasError('required') ? 'Debe ingresar los apellidos' :\n updateUserForm.controls['last_name'].hasError('minlength') ? 'M\u00EDnimo 3 caracteres' :\n updateUserForm.controls['last_name'].hasError('maxlength') ? 'M\u00E1ximo 32 caracteres' :\n updateUserForm.controls['last_name'].hasError('pattern') ? 'Solo letras, espacios y guiones' :\n updateUserForm.controls['last_name'].hasError('hasWhitespace') ? 'No se permiten espacios al inicio o final' :\n updateUserForm.controls['last_name'].hasError('onlyWhitespace') ? 'No se permiten solo espacios' :\n 'Debe ingresar los apellidos'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'email'\"\n [placeHolder]=\"'Email'\"\n [control]=\"updateUserForm.controls['email']\"\n [validateText]=\"updateUserForm.controls['email'].hasError('required') ? 'Debe ingresar un correo v\u00E1lido' :\n updateUserForm.controls['email'].hasError('maxlength') ? 'M\u00E1ximo 300 caracteres' :\n updateUserForm.controls['email'].hasError('pattern') ? 'Tiene que ser un email correcto' :\n updateUserForm.controls['email'].hasError('hasWhitespace') ? 'No se permiten espacios al inicio o final' :\n updateUserForm.controls['email'].hasError('onlyWhitespace') ? 'No se permiten solo espacios' :\n 'Debe ingresar un correo v\u00E1lido'\"\n ></ipt-input>\n <ipt-input\n *ngIf=\"showEmailIpt\"\n [inputType]=\"'text'\"\n [placeHolder]=\"'Email IPT'\"\n [control]=\"updateUserForm.controls['email_ipt']\"\n [validateText]=\"updateUserForm.controls['email_ipt'].hasError('required') ? 'Debe ingresar un correo IPT v\u00E1lido' :\n updateUserForm.controls['email_ipt'].hasError('maxlength') ? 'M\u00E1ximo 255 caracteres' :\n updateUserForm.controls['email_ipt'].hasError('pattern') ? 'Tiene que ser un email correcto' :\n updateUserForm.controls['email_ipt'].hasError('hasWhitespace') ? 'No se permiten espacios al inicio o final' :\n updateUserForm.controls['email_ipt'].hasError('onlyWhitespace') ? 'No se permiten solo espacios' :\n 'Debe ingresar un correo IPT v\u00E1lido'\"\n ></ipt-input>\n <ipt-input\n *ngIf=\"showEmailIpt\"\n [inputType]=\"'number'\"\n [placeHolder]=\"'Horas de servicio'\"\n [control]=\"updateUserForm.controls['service_hour']\"\n [validateText]=\"'Debe ingresar las horas de servicio'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Rol'\"\n [control]=\"updateUserForm.controls['role']\"\n [validateText]=\"'Rol requerido'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['gender'].value\"\n [control]=\"updateUserForm.controls['gender']\"\n [selectCode]=\"updateUserForm.controls['gender'].value === null ? 'Seleccione g\u00E9nero' : (updateUserForm.controls['gender'].value | genderDisplay)\"\n [data]=\"genders\"\n (eventSelect)=\"selectGender($event)\"\n [defaultText]=\"'Seleccione g\u00E9nero'\"\n ></ipt-select>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['phone_indicative'].value\"\n [control]=\"updateUserForm.controls['phone_indicative']\"\n [data]=\"indicatives\"\n (eventSelect)=\"selectIndicative('phone_indicative', $event)\"\n [defaultText]=\"'Indicativo'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'Tel\u00E9fono'\"\n [control]=\"updateUserForm.controls['phone_number']\"\n [validateText]=\"'Debe ingresar un n\u00FAmero de tel\u00E9fono v\u00E1lido'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['id_card_type'].value\"\n [control]=\"updateUserForm.controls['id_card_type']\"\n [selectCode]=\"updateUserForm.controls['id_card_type'].value === null ? 'Tipo de documento' : updateUserForm.controls['id_card_type'].value\"\n [isRequired]=\"true\"\n [data]=\"idTypes\"\n (eventSelect)=\"selectIdType('id_card_type', $event)\"\n [defaultText]=\"'Tipo de documento'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Documento'\"\n [control]=\"updateUserForm.controls['id_card']\"\n [validateText]=\"updateUserForm.controls['id_card'].hasError('required') ? 'Debe ingresar el n\u00FAmero de documento' :\n updateUserForm.controls['id_card'].hasError('minlength') ? 'M\u00EDnimo 5 caracteres' :\n updateUserForm.controls['id_card'].hasError('maxlength') ? 'M\u00E1ximo 20 caracteres' :\n updateUserForm.controls['id_card'].hasError('pattern') ? (updateUserForm.controls['id_card_type'].value === 7 || updateUserForm.controls['id_card_type'].value === 5 ? 'Solo letras y n\u00FAmeros permitidos' : 'Solo n\u00FAmeros permitidos') :\n 'Debe ingresar el n\u00FAmero de documento'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['country'].value\"\n [control]=\"updateUserForm.controls['country']\"\n [selectCode]=\"updateUserForm.controls['country'].value === null ? 'Pa\u00EDs de residencia' : updateUserForm.controls['country'].value\"\n (eventSelect)=\"selectCountry($event)\"\n [data]=\"countries\"\n [defaultText]=\"'Pa\u00EDs de residencia'\"\n ></ipt-select>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['state'].value\"\n [control]=\"updateUserForm.controls['state']\"\n [selectCode]=\"updateUserForm.controls['state'].value === null ? 'Departamento o estado' : updateUserForm.controls['state'].value\"\n [isRequired]=\"true\"\n (eventSelect)=\"selectState($event)\"\n [data]=\"states\"\n [defaultText]=\"'Departamento o estado'\"\n ></ipt-select>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['city'].value\"\n [control]=\"updateUserForm.controls['city']\"\n [selectCode]=\"updateUserForm.controls['city'].value === null ? 'Ciudad de residencia' : updateUserForm.controls['city'].value\"\n (eventSelect)=\"selectCity($event)\"\n [data]=\"cities\"\n [defaultText]=\"'Ciudad de residencia'\"\n ></ipt-select>\n <div class=\"card-status\">\n <span class=\"span-status\">Estado</span>\n <p-selectButton \n [options]=\"justifyOptions\" \n formControlName=\"status\" \n optionLabel=\"name\" \n optionValue=\"code\">\n </p-selectButton>\n </div>\n <div class=\"field\">\n <p-checkbox\n formControlName=\"changePassword\"\n label=\"Cambio de contrase\u00F1a\"\n [binary]=\"true\"\n ></p-checkbox>\n </div>\n </div>\n <div class=\"form-grid\" *ngIf=\"updateUserForm.controls['changePassword'].value\">\n <ipt-input\n [inputType]=\"'password'\"\n [placeHolder]=\"'Contrase\u00F1a'\"\n [control]=\"updateUserForm.controls['password']\"\n [validateText]=\"updateUserForm.controls['password'].hasError('required') ? 'La contrase\u00F1a es requerida' :\n updateUserForm.controls['password'].hasError('minlength') ? 'M\u00EDnimo 5 caracteres' :\n updateUserForm.controls['password'].hasError('maxlength') ? 'M\u00E1ximo 32 caracteres' :\n 'Ingrese una contrase\u00F1a v\u00E1lida'\"\n ></ipt-input>\n\n <ipt-input\n [inputType]=\"'password'\"\n [placeHolder]=\"'Repetir contrase\u00F1a'\"\n [control]=\"updateUserForm.controls['re_password']\"\n [validateText]=\"updateUserForm.controls['re_password'].hasError('required') ? 'Debe repetir la contrase\u00F1a' :\n updateUserForm.controls['re_password'].hasError('minlength') ? 'M\u00EDnimo 5 caracteres' :\n updateUserForm.controls['re_password'].hasError('maxlength') ? 'M\u00E1ximo 32 caracteres' :\n updateUserForm.hasError('mismatch') ? 'Las contrase\u00F1as no coinciden' :\n 'Repita la contrase\u00F1a'\"\n ></ipt-input>\n </div>\n\n <!-- Mensaje adicional para el error de mismatch (opcional, si quieres mostrarlo por separado) -->\n\n <div *ngIf=\"updateUserForm.hasError('mismatch') && updateUserForm.controls['changePassword'].value\" class=\"error-message\">\n <small >Las contrase\u00F1as no coinciden</small>\n </div>\n <!-- Parent Information Section -->\n <div class=\"section-header\" *ngIf=\"DataStudent?.cods\">\n <h2>Informaci\u00F3n del acudiente</h2>\n </div>\n <div *ngIf=\"DataStudent?.cods\">\n <div *ngIf=\"showParentSection; else noParentMessage\">\n <div class=\"form-grid\">\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Nombres'\"\n [control]=\"updateUserForm.controls['parent_name']\"\n [validateText]=\"'Debe ingresar el nombre'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Apellidos'\"\n [control]=\"updateUserForm.controls['parent_last_name']\"\n [validateText]=\"'Debe ingresar los apellidos'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Ocupaci\u00F3n'\"\n [control]=\"updateUserForm.controls['parent_occupation']\"\n [validateText]=\"'Debe ingresar la ocupaci\u00F3n'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'email'\"\n [placeHolder]=\"'Email'\"\n [control]=\"updateUserForm.controls['parent_email']\"\n [validateText]=\"'Debe ingresar un correo v\u00E1lido'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['parent_id_card_type'].value\"\n [control]=\"updateUserForm.controls['parent_id_card_type']\"\n [selectCode]=\"updateUserForm.controls['parent_id_card_type'].value === null ? 'Tipo de documento' : updateUserForm.controls['parent_id_card_type'].value\"\n [isRequired]=\"true\"\n [data]=\"idTypes\"\n (eventSelect)=\"selectIdType('parent_id_card_type', $event)\"\n [defaultText]=\"'Tipo de documento'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'Documento'\"\n [control]=\"updateUserForm.controls['parent_id_card']\"\n [validateText]=\"'Debe ingresar el n\u00FAmero de documento'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['parent_phone_indicative'].value\"\n [control]=\"updateUserForm.controls['parent_phone_indicative']\"\n [data]=\"indicatives\"\n (eventSelect)=\"selectIndicative('parent_phone_indicative', $event)\"\n [defaultText]=\"'Indicativo'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'Tel\u00E9fono'\"\n [control]=\"updateUserForm.controls['parent_phone_number']\"\n [validateText]=\"'Debe ingresar un n\u00FAmero de tel\u00E9fono v\u00E1lido'\"\n ></ipt-input>\n\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Direcci\u00F3n de oficina'\"\n [control]=\"updateUserForm.controls['parent_office_adrress']\"\n [validateText]=\"'Debe ingresar la direcci\u00F3n'\"\n ></ipt-input>\n </div>\n </div>\n <ng-template #noParentMessage>\n <div class=\"no-parent-message\">\n <p>Sin acudiente</p>\n </div>\n </ng-template>\n </div>\n <div class=\"buttons-container\">\n <div class=\"buttons-container-inner\">\n <ipt-button\n [buttonType]=\"'button'\"\n [label]=\"'Cerrar'\"\n [primary]=\"false\"\n [isEnabled]=\"true\"\n (onClick)=\"closeTable()\"\n ></ipt-button>\n\n <ipt-button\n [label]=\"'Actualizar'\"\n [isEnabled]=\"!loader && updateUserForm.valid && !updateUserForm.hasError('mismatch') && hasFormChanged()\"\n (onClick)=\"showConfirmDialogs()\"\n [primary]=\"true\"\n ></ipt-button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </div>\n\n <!-- Confirm Dialog para raz\u00F3n y observaci\u00F3n -->\n<p-dialog\n header=\"Confirmar Ajuste de Usuario\"\n [(visible)]=\"showConfirmDialog\"\n [modal]=\"true\"\n (onHide)=\"closeConfirmDialog()\"\n >\n <form [formGroup]=\"confirmForm\" class=\"confirm-form\">\n <div class=\"p-field\">\n <ipt-select\n [initialValue]=\"confirmForm.controls['reason'].value\"\n [control]=\"confirmForm.controls['reason']\"\n [data]=\"reasons\"\n optionLabel=\"name\"\n (eventSelect)=\"selectReason($event)\"\n [defaultText]=\"'Seleccione la raz\u00F3n'\"\n ></ipt-select>\n <small *ngIf=\"confirmForm.controls['reason'].invalid && confirmForm.controls['reason'].touched\" class=\"p-error\">\n La raz\u00F3n es requerida\n </small>\n </div>\n <div class=\"p-field\">\n <label class=\"container-observation\">Observaci\u00F3n</label>\n <textarea\n id=\"observation\"\n pInputTextarea\n formControlName=\"observation\"\n rows=\"3\"\n placeholder=\"Describe detalles adicionales del ajuste\"\n (ngModelChange)=\"logObservation($event)\"\n ></textarea>\n <small *ngIf=\"confirmForm.controls['observation'].invalid && confirmForm.controls['observation'].touched\" class=\"p-error\">\n La observaci\u00F3n es requerida\n </small>\n </div>\n </form>\n <p-footer>\n <ipt-button\n class=\"p-button-secondary\"\n [buttonType]=\"'button'\"\n [label]=\"'Cancelar'\"\n [primary]=\"false\"\n [isEnabled]=\"true\"\n (onClick)=\"closeConfirmDialog()\"\n ></ipt-button>\n <ipt-button\n class=\"p-button-secondary\"\n [buttonType]=\"'button'\"\n [label]=\"'Confirmar'\"\n [primary]=\"true\"\n [isEnabled]=\"confirmForm.valid\"\n (onClick)=\"acceptConfirmDialog()\"\n ></ipt-button>\n </p-footer>\n</p-dialog>\n\n</main>", styles: ["@media screen and (min-width: 320px){main{background:rgba(0,0,0,.472);color:#fff;position:fixed;top:0;left:0;height:100vh;width:100vw;transition:all .5s}main .modal_container{width:90%;height:-moz-fit-content;height:fit-content;max-height:90vh;overflow-y:auto;position:fixed;inset:0;margin:auto;background-color:#fff;border-radius:5px}.header_modal{display:flex;padding:15px 15px 0;gap:1rem;align-items:center}.header_modal h1{padding:.5rem;background-color:#1c77f7;color:#fff;width:100%;border-radius:10px;font-size:1.25rem;font-weight:700}.header_modal button{margin-left:auto;font-size:26px;padding:1.2rem;font-weight:200;color:#6c7f7d;display:flex;width:25px;height:25px;align-items:center;justify-content:center;transition:50ms;background-color:transparent;border:none}.header_modal button:hover{cursor:pointer;border-radius:50%;background-color:#d4d4d4}.grid_container{display:grid;grid-template-columns:1fr;padding:0 15px}form{display:grid;grid-template-columns:1fr;gap:.25rem;justify-content:center;padding:0 1rem}.section-header{margin:1.5rem 0 .5rem;border-bottom:2px solid #1c77f7}.section-header h2{font-size:1.2rem;color:#1c77f7;font-weight:600;margin-bottom:.5rem}.form-grid{display:grid;grid-template-columns:1fr;gap:0px .25rem}.buttons-container{margin-top:2rem;margin-bottom:2rem;display:flex;justify-content:flex-end;align-items:center;flex-direction:row}.buttons-container-inner{gap:1rem;width:auto;display:flex}.user-type-image{display:none}.no-parent-message{padding:1rem;text-align:center;color:#666;font-size:1rem;font-weight:500;background-color:#f8f9fa;border-radius:.5rem;margin-top:.5rem}}@media screen and (min-width: 768px){.form-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0px 1rem}}@media screen and (min-width: 1366px){form{padding:0}}.field{margin-top:15px;height:1px;max-width:70%;font-family:Poppins,sans-serif;color:#000;font-size:.875rem}.error-message{color:red;font-size:12px;margin-top:5px}:host ::ng-deep .p-selectbutton{display:flex;flex-wrap:wrap;justify-content:center;width:100%;min-width:10rem}:host ::ng-deep .p-selectbutton .p-button{padding:.5rem;font-size:.875rem;height:30px}:host ::ng-deep .p-buttonset .p-button:first-of-type{height:30px}.span-status{font-family:Poppins,sans-serif;color:#999;font-size:15px;font-weight:400;pointer-events:none;transition:.2s ease all;margin-left:9px}.card-status{margin-top:15px}:host ::ng-deep .p-field{margin-bottom:1.5rem}.p-error{color:red;font-size:.8rem}.confirm-form{display:flex;flex-direction:column;gap:1rem;font-family:Poppins,sans-serif}:host ::ng-deep .p-confirm-dialog .p-dialog-content{padding:1.5rem}:host ::ng-deep .p-confirm-dialog .p-dialog-footer{display:flex;justify-content:flex-end;gap:1rem}:host ::ng-deep .p-dialog{width:45%!important}.container-observation{width:100%;font-family:Poppins,sans-serif;color:#1c77f7;font-size:15px;font-weight:400;pointer-events:none}textarea{box-shadow:#64646f33 0 7px 29px;border-radius:3px;outline:none;display:block;transition:.2s;font-weight:300;font-family:Poppins,sans-serif;width:-webkit-fill-available;width:-moz-available;padding-left:10px;background-color:#fff;-webkit-appearance:none;max-height:80px;font-size:14px;max-width:100%}textarea::placeholder{color:#999;font-weight:400;font-family:Poppins,sans-serif;pointer-events:none}textarea::focus textarea:focus-visible{color:#999;font-size:15px;font-weight:400;font-family:Poppins,sans-serif;pointer-events:none;border:#1c77f7 1px solid;outline:none}\n"] }]
|
|
2682
|
-
}], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: i0.ChangeDetectorRef }, { type: ParameterService }, { type: BaseService }, { type: UserService }
|
|
2671
|
+
args: [{ selector: 'ipt-update-user-form', providers: [], template: "<main *ngIf=\"visibleModal\">\n <div class=\"modal_container\">\n <div class=\"header_modal yellow-300\">\n <h1>Actualizar usuario</h1>\n <button (click)=\"closeTable()\">x</button>\n </div>\n <div class=\"grid_container\">\n <div>\n <form *ngIf=\"updateUserForm\" autocomplete=\"off\" [formGroup]=\"updateUserForm\">\n <!-- User Information Section -->\n <div class=\"section-header\">\n <h2>Informaci\u00F3n del usuario</h2>\n </div>\n <div class=\"form-grid\">\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Nombres'\"\n [control]=\"updateUserForm.controls['name']\"\n [validateText]=\"updateUserForm.controls['name'].hasError('required') ? 'Debe ingresar el nombre' :\n updateUserForm.controls['name'].hasError('minlength') ? 'M\u00EDnimo 3 caracteres' :\n updateUserForm.controls['name'].hasError('maxlength') ? 'M\u00E1ximo 32 caracteres' :\n updateUserForm.controls['name'].hasError('pattern') ? 'Solo letras, espacios y guiones' :\n updateUserForm.controls['name'].hasError('hasWhitespace') ? 'No se permiten espacios al inicio o final' :\n updateUserForm.controls['name'].hasError('onlyWhitespace') ? 'No se permiten solo espacios' :\n 'Debe ingresar el nombre'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Apellidos'\"\n [control]=\"updateUserForm.controls['last_name']\"\n [validateText]=\"updateUserForm.controls['last_name'].hasError('required') ? 'Debe ingresar los apellidos' :\n updateUserForm.controls['last_name'].hasError('minlength') ? 'M\u00EDnimo 3 caracteres' :\n updateUserForm.controls['last_name'].hasError('maxlength') ? 'M\u00E1ximo 32 caracteres' :\n updateUserForm.controls['last_name'].hasError('pattern') ? 'Solo letras, espacios y guiones' :\n updateUserForm.controls['last_name'].hasError('hasWhitespace') ? 'No se permiten espacios al inicio o final' :\n updateUserForm.controls['last_name'].hasError('onlyWhitespace') ? 'No se permiten solo espacios' :\n 'Debe ingresar los apellidos'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'email'\"\n [placeHolder]=\"'Email'\"\n [control]=\"updateUserForm.controls['email']\"\n [validateText]=\"updateUserForm.controls['email'].hasError('required') ? 'Debe ingresar un correo v\u00E1lido' :\n updateUserForm.controls['email'].hasError('maxlength') ? 'M\u00E1ximo 300 caracteres' :\n updateUserForm.controls['email'].hasError('pattern') ? 'Tiene que ser un email correcto' :\n updateUserForm.controls['email'].hasError('hasWhitespace') ? 'No se permiten espacios al inicio o final' :\n updateUserForm.controls['email'].hasError('onlyWhitespace') ? 'No se permiten solo espacios' :\n 'Debe ingresar un correo v\u00E1lido'\"\n ></ipt-input>\n <ipt-input\n *ngIf=\"showEmailIpt\"\n [inputType]=\"'text'\"\n [placeHolder]=\"'Email IPT'\"\n [control]=\"updateUserForm.controls['email_ipt']\"\n [validateText]=\"updateUserForm.controls['email_ipt'].hasError('required') ? 'Debe ingresar un correo IPT v\u00E1lido' :\n updateUserForm.controls['email_ipt'].hasError('maxlength') ? 'M\u00E1ximo 255 caracteres' :\n updateUserForm.controls['email_ipt'].hasError('pattern') ? 'Tiene que ser un email correcto' :\n updateUserForm.controls['email_ipt'].hasError('hasWhitespace') ? 'No se permiten espacios al inicio o final' :\n updateUserForm.controls['email_ipt'].hasError('onlyWhitespace') ? 'No se permiten solo espacios' :\n 'Debe ingresar un correo IPT v\u00E1lido'\"\n ></ipt-input>\n <ipt-input\n *ngIf=\"showEmailIpt\"\n [inputType]=\"'number'\"\n [placeHolder]=\"'Horas de servicio'\"\n [control]=\"updateUserForm.controls['service_hour']\"\n [validateText]=\"'Debe ingresar las horas de servicio'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Rol'\"\n [control]=\"updateUserForm.controls['role']\"\n [validateText]=\"'Rol requerido'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['gender'].value\"\n [control]=\"updateUserForm.controls['gender']\"\n [selectCode]=\"updateUserForm.controls['gender'].value === null ? 'Seleccione g\u00E9nero' : (updateUserForm.controls['gender'].value | genderDisplay)\"\n [data]=\"genders\"\n (eventSelect)=\"selectGender($event)\"\n [defaultText]=\"'Seleccione g\u00E9nero'\"\n ></ipt-select>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['phone_indicative'].value\"\n [control]=\"updateUserForm.controls['phone_indicative']\"\n [data]=\"indicatives\"\n (eventSelect)=\"selectIndicative('phone_indicative', $event)\"\n [defaultText]=\"'Indicativo'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'Tel\u00E9fono'\"\n [control]=\"updateUserForm.controls['phone_number']\"\n [validateText]=\"'Debe ingresar un n\u00FAmero de tel\u00E9fono v\u00E1lido'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['id_card_type'].value\"\n [control]=\"updateUserForm.controls['id_card_type']\"\n [selectCode]=\"updateUserForm.controls['id_card_type'].value === null ? 'Tipo de documento' : updateUserForm.controls['id_card_type'].value\"\n [isRequired]=\"true\"\n [data]=\"idTypes\"\n (eventSelect)=\"selectIdType('id_card_type', $event)\"\n [defaultText]=\"'Tipo de documento'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Documento'\"\n [control]=\"updateUserForm.controls['id_card']\"\n [validateText]=\"updateUserForm.controls['id_card'].hasError('required') ? 'Debe ingresar el n\u00FAmero de documento' :\n updateUserForm.controls['id_card'].hasError('minlength') ? 'M\u00EDnimo 5 caracteres' :\n updateUserForm.controls['id_card'].hasError('maxlength') ? 'M\u00E1ximo 20 caracteres' :\n updateUserForm.controls['id_card'].hasError('pattern') ? (updateUserForm.controls['id_card_type'].value === 7 || updateUserForm.controls['id_card_type'].value === 5 ? 'Solo letras y n\u00FAmeros permitidos' : 'Solo n\u00FAmeros permitidos') :\n 'Debe ingresar el n\u00FAmero de documento'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['country'].value\"\n [control]=\"updateUserForm.controls['country']\"\n [selectCode]=\"updateUserForm.controls['country'].value === null ? 'Pa\u00EDs de residencia' : updateUserForm.controls['country'].value\"\n (eventSelect)=\"selectCountry($event)\"\n [data]=\"countries\"\n [defaultText]=\"'Pa\u00EDs de residencia'\"\n ></ipt-select>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['state'].value\"\n [control]=\"updateUserForm.controls['state']\"\n [selectCode]=\"updateUserForm.controls['state'].value === null ? 'Departamento o estado' : updateUserForm.controls['state'].value\"\n [isRequired]=\"true\"\n (eventSelect)=\"selectState($event)\"\n [data]=\"states\"\n [defaultText]=\"'Departamento o estado'\"\n ></ipt-select>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['city'].value\"\n [control]=\"updateUserForm.controls['city']\"\n [selectCode]=\"updateUserForm.controls['city'].value === null ? 'Ciudad de residencia' : updateUserForm.controls['city'].value\"\n (eventSelect)=\"selectCity($event)\"\n [data]=\"cities\"\n [defaultText]=\"'Ciudad de residencia'\"\n ></ipt-select>\n <div class=\"card-status\">\n <span class=\"span-status\">Estado</span>\n <p-selectButton \n [options]=\"justifyOptions\" \n formControlName=\"status\" \n optionLabel=\"name\" \n optionValue=\"code\">\n </p-selectButton>\n </div>\n <div *ngIf=\"!userRoleCommercial\" class=\"field\">\n <p-checkbox\n formControlName=\"changePassword\"\n label=\"Cambio de contrase\u00F1a\"\n [binary]=\"true\"\n ></p-checkbox>\n </div>\n </div>\n <div class=\"form-grid\" *ngIf=\"updateUserForm.controls['changePassword'].value\">\n <ipt-input\n [inputType]=\"'password'\"\n [placeHolder]=\"'Contrase\u00F1a'\"\n [control]=\"updateUserForm.controls['password']\"\n [validateText]=\"updateUserForm.controls['password'].hasError('required') ? 'La contrase\u00F1a es requerida' :\n updateUserForm.controls['password'].hasError('minlength') ? 'M\u00EDnimo 5 caracteres' :\n updateUserForm.controls['password'].hasError('maxlength') ? 'M\u00E1ximo 32 caracteres' :\n 'Ingrese una contrase\u00F1a v\u00E1lida'\"\n ></ipt-input>\n\n <ipt-input\n [inputType]=\"'password'\"\n [placeHolder]=\"'Repetir contrase\u00F1a'\"\n [control]=\"updateUserForm.controls['re_password']\"\n [validateText]=\"updateUserForm.controls['re_password'].hasError('required') ? 'Debe repetir la contrase\u00F1a' :\n updateUserForm.controls['re_password'].hasError('minlength') ? 'M\u00EDnimo 5 caracteres' :\n updateUserForm.controls['re_password'].hasError('maxlength') ? 'M\u00E1ximo 32 caracteres' :\n updateUserForm.hasError('mismatch') ? 'Las contrase\u00F1as no coinciden' :\n 'Repita la contrase\u00F1a'\"\n ></ipt-input>\n </div>\n\n <!-- Mensaje adicional para el error de mismatch (opcional, si quieres mostrarlo por separado) -->\n\n <div *ngIf=\"updateUserForm.hasError('mismatch') && updateUserForm.controls['changePassword'].value\" class=\"error-message\">\n <small >Las contrase\u00F1as no coinciden</small>\n </div>\n <!-- Parent Information Section -->\n <div class=\"section-header\" *ngIf=\"DataStudent?.cods\">\n <h2>Informaci\u00F3n del acudiente</h2>\n </div>\n <div *ngIf=\"DataStudent?.cods\">\n <div *ngIf=\"showParentSection; else noParentMessage\">\n <div class=\"form-grid\">\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Nombres'\"\n [control]=\"updateUserForm.controls['parent_name']\"\n [validateText]=\"'Debe ingresar el nombre'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Apellidos'\"\n [control]=\"updateUserForm.controls['parent_last_name']\"\n [validateText]=\"'Debe ingresar los apellidos'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Ocupaci\u00F3n'\"\n [control]=\"updateUserForm.controls['parent_occupation']\"\n [validateText]=\"'Debe ingresar la ocupaci\u00F3n'\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'email'\"\n [placeHolder]=\"'Email'\"\n [control]=\"updateUserForm.controls['parent_email']\"\n [validateText]=\"'Debe ingresar un correo v\u00E1lido'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['parent_id_card_type'].value\"\n [control]=\"updateUserForm.controls['parent_id_card_type']\"\n [selectCode]=\"updateUserForm.controls['parent_id_card_type'].value === null ? 'Tipo de documento' : updateUserForm.controls['parent_id_card_type'].value\"\n [isRequired]=\"true\"\n [data]=\"idTypes\"\n (eventSelect)=\"selectIdType('parent_id_card_type', $event)\"\n [defaultText]=\"'Tipo de documento'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'Documento'\"\n [control]=\"updateUserForm.controls['parent_id_card']\"\n [validateText]=\"'Debe ingresar el n\u00FAmero de documento'\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"updateUserForm.controls['parent_phone_indicative'].value\"\n [control]=\"updateUserForm.controls['parent_phone_indicative']\"\n [data]=\"indicatives\"\n (eventSelect)=\"selectIndicative('parent_phone_indicative', $event)\"\n [defaultText]=\"'Indicativo'\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'Tel\u00E9fono'\"\n [control]=\"updateUserForm.controls['parent_phone_number']\"\n [validateText]=\"'Debe ingresar un n\u00FAmero de tel\u00E9fono v\u00E1lido'\"\n ></ipt-input>\n\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Direcci\u00F3n de oficina'\"\n [control]=\"updateUserForm.controls['parent_office_adrress']\"\n [validateText]=\"'Debe ingresar la direcci\u00F3n'\"\n ></ipt-input>\n </div>\n </div>\n <ng-template #noParentMessage>\n <div class=\"no-parent-message\">\n <p>Sin acudiente</p>\n </div>\n </ng-template>\n </div>\n <div class=\"buttons-container\">\n <div class=\"buttons-container-inner\">\n <ipt-button\n [buttonType]=\"'button'\"\n [label]=\"'Cerrar'\"\n [primary]=\"false\"\n [isEnabled]=\"true\"\n (onClick)=\"closeTable()\"\n ></ipt-button>\n\n <ipt-button\n [label]=\"'Actualizar'\"\n [isEnabled]=\"!loader && updateUserForm.valid && !updateUserForm.hasError('mismatch') && hasFormChanged()\"\n (onClick)=\"showConfirmDialogs()\"\n [primary]=\"true\"\n ></ipt-button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </div>\n\n <!-- Confirm Dialog para raz\u00F3n y observaci\u00F3n -->\n<p-dialog\n header=\"Confirmar Ajuste de Usuario\"\n [(visible)]=\"showConfirmDialog\"\n [modal]=\"true\"\n (onHide)=\"closeConfirmDialog()\"\n >\n <form [formGroup]=\"confirmForm\" class=\"confirm-form\">\n <div class=\"p-field\">\n <ipt-select\n [control]=\"confirmForm.controls['reason']\"\n [data]=\"reasons\"\n optionLabel=\"name\"\n (eventSelect)=\"selectReason($event)\"\n [defaultText]=\"'Seleccione la raz\u00F3n'\"\n ></ipt-select>\n <small *ngIf=\"confirmForm.controls['reason'].invalid && confirmForm.controls['reason'].touched\" class=\"p-error\">\n La raz\u00F3n es requerida\n </small>\n </div>\n <div class=\"p-field\">\n <label class=\"container-observation\">Observaci\u00F3n</label>\n <textarea\n id=\"observation\"\n pInputTextarea\n formControlName=\"observation\"\n rows=\"3\"\n placeholder=\"Describe detalles adicionales del ajuste\"\n ></textarea>\n <small *ngIf=\"confirmForm.controls['observation'].invalid && confirmForm.controls['observation'].touched\" class=\"p-error\">\n La observaci\u00F3n es requerida\n </small>\n </div>\n </form>\n <p-footer>\n <ipt-button\n class=\"p-button-secondary\"\n [buttonType]=\"'button'\"\n [label]=\"'Cancelar'\"\n [primary]=\"false\"\n [isEnabled]=\"true\"\n (onClick)=\"closeConfirmDialog()\"\n ></ipt-button>\n <ipt-button\n class=\"p-button-secondary\"\n [buttonType]=\"'button'\"\n [label]=\"'Confirmar'\"\n [primary]=\"true\"\n [isEnabled]=\"confirmForm.valid\"\n (onClick)=\"acceptConfirmDialog()\"\n ></ipt-button>\n </p-footer>\n</p-dialog>\n\n</main>", styles: ["@media screen and (min-width: 320px){main{background:rgba(0,0,0,.472);color:#fff;position:fixed;top:0;left:0;height:100vh;width:100vw;transition:all .5s}main .modal_container{width:90%;height:-moz-fit-content;height:fit-content;max-height:90vh;overflow-y:auto;position:fixed;inset:0;margin:auto;background-color:#fff;border-radius:5px}.header_modal{display:flex;padding:15px 15px 0;gap:1rem;align-items:center}.header_modal h1{padding:.5rem;background-color:#1c77f7;color:#fff;width:100%;border-radius:10px;font-size:1.25rem;font-weight:700}.header_modal button{margin-left:auto;font-size:26px;padding:1.2rem;font-weight:200;color:#6c7f7d;display:flex;width:25px;height:25px;align-items:center;justify-content:center;transition:50ms;background-color:transparent;border:none}.header_modal button:hover{cursor:pointer;border-radius:50%;background-color:#d4d4d4}.grid_container{display:grid;grid-template-columns:1fr;padding:0 15px}form{display:grid;grid-template-columns:1fr;gap:.25rem;justify-content:center;padding:0 1rem}.section-header{margin:1.5rem 0 .5rem;border-bottom:2px solid #1c77f7}.section-header h2{font-size:1.2rem;color:#1c77f7;font-weight:600;margin-bottom:.5rem}.form-grid{display:grid;grid-template-columns:1fr;gap:0px .25rem}.buttons-container{margin-top:2rem;margin-bottom:2rem;display:flex;justify-content:flex-end;align-items:center;flex-direction:row}.buttons-container-inner{gap:1rem;width:auto;display:flex}.user-type-image{display:none}.no-parent-message{padding:1rem;text-align:center;color:#666;font-size:1rem;font-weight:500;background-color:#f8f9fa;border-radius:.5rem;margin-top:.5rem}}@media screen and (min-width: 768px){.form-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0px 1rem}}@media screen and (min-width: 1366px){form{padding:0}}.field{margin-top:15px;height:1px;max-width:70%;font-family:Poppins,sans-serif;color:#000;font-size:.875rem}.error-message{color:red;font-size:12px;margin-top:5px}:host ::ng-deep .p-selectbutton{display:flex;flex-wrap:wrap;justify-content:center;width:100%;min-width:10rem}:host ::ng-deep .p-selectbutton .p-button{padding:.5rem;font-size:.875rem;height:30px}:host ::ng-deep .p-buttonset .p-button:first-of-type{height:30px}.span-status{font-family:Poppins,sans-serif;color:#999;font-size:15px;font-weight:400;pointer-events:none;transition:.2s ease all;margin-left:9px}.card-status{margin-top:15px}:host ::ng-deep .p-field{margin-bottom:1rem}.p-error{color:red;font-size:.8rem}.confirm-form{display:flex;flex-direction:column;gap:1rem;font-family:Poppins,sans-serif}:host ::ng-deep .p-confirm-dialog .p-dialog-content{padding:1.5rem}:host ::ng-deep .p-confirm-dialog .p-dialog-footer{display:flex;justify-content:flex-end;gap:1rem}:host ::ng-deep .p-dialog{width:45%!important}.container-observation{width:100%;font-family:Poppins,sans-serif;color:#1c77f7;font-size:15px;font-weight:400;pointer-events:none}textarea{box-shadow:#64646f33 0 7px 29px;border-radius:3px;outline:none;display:block;transition:.2s;font-weight:300;font-family:Poppins,sans-serif;width:-webkit-fill-available;width:-moz-available;padding-left:10px;background-color:#fff;-webkit-appearance:none;max-height:80px;font-size:14px;max-width:100%}textarea::placeholder{color:#999;font-weight:400;font-family:Poppins,sans-serif;pointer-events:none}textarea::focus textarea:focus-visible{color:#999;font-size:15px;font-weight:400;font-family:Poppins,sans-serif;pointer-events:none;border:#1c77f7 1px solid;outline:none}\n"] }]
|
|
2672
|
+
}], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: i0.ChangeDetectorRef }, { type: ParameterService }, { type: BaseService }, { type: UserService }]; }, propDecorators: { DataStudent: [{
|
|
2683
2673
|
type: Input
|
|
2684
2674
|
}], visibleModal: [{
|
|
2685
2675
|
type: Input
|