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';
|
|
@@ -1857,13 +1857,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
|
|
|
1857
1857
|
}] });
|
|
1858
1858
|
|
|
1859
1859
|
class updateUserFormComponent {
|
|
1860
|
-
constructor(fb, cdr, parameterService, baseService, userService
|
|
1860
|
+
constructor(fb, cdr, parameterService, baseService, userService) {
|
|
1861
1861
|
this.fb = fb;
|
|
1862
1862
|
this.cdr = cdr;
|
|
1863
1863
|
this.parameterService = parameterService;
|
|
1864
1864
|
this.baseService = baseService;
|
|
1865
1865
|
this.userService = userService;
|
|
1866
|
-
this.confirmationService = confirmationService;
|
|
1867
1866
|
this.visibleModal = false;
|
|
1868
1867
|
this.closeModalIS = new EventEmitter();
|
|
1869
1868
|
this.userUpdatedEvent = new EventEmitter();
|
|
@@ -1883,15 +1882,12 @@ class updateUserFormComponent {
|
|
|
1883
1882
|
this.genders = [];
|
|
1884
1883
|
this.stratums = [];
|
|
1885
1884
|
this.showConfirmDialog = false;
|
|
1885
|
+
this.userRoleCommercial = false;
|
|
1886
1886
|
// userUpdated = false;
|
|
1887
1887
|
this.initialFormValue = [];
|
|
1888
1888
|
this.pendingInit = false;
|
|
1889
1889
|
this.isStudent = false;
|
|
1890
1890
|
this.justifyOptions = [];
|
|
1891
|
-
// justifyOptions: any[] = [
|
|
1892
|
-
// { name: 'Activo', code: 1 },
|
|
1893
|
-
// { name: 'Removido', code: 4 }
|
|
1894
|
-
// ];
|
|
1895
1891
|
this.reasons = [
|
|
1896
1892
|
{ name: 'Corrección de errores en datos personales', code: 1 },
|
|
1897
1893
|
{ name: 'Correccion de documentacion', code: 2 },
|
|
@@ -1903,6 +1899,7 @@ class updateUserFormComponent {
|
|
|
1903
1899
|
];
|
|
1904
1900
|
this.initForm();
|
|
1905
1901
|
this.initConfirmForm();
|
|
1902
|
+
this.validationUserRole();
|
|
1906
1903
|
}
|
|
1907
1904
|
ngOnInit() {
|
|
1908
1905
|
this.getParameters();
|
|
@@ -1915,6 +1912,7 @@ class updateUserFormComponent {
|
|
|
1915
1912
|
this.initializeForm();
|
|
1916
1913
|
this.setJustifyOptions();
|
|
1917
1914
|
this.trackIdTypeChanges();
|
|
1915
|
+
this.validationUserRole();
|
|
1918
1916
|
this.cdr.detectChanges();
|
|
1919
1917
|
}
|
|
1920
1918
|
else {
|
|
@@ -2192,9 +2190,19 @@ class updateUserFormComponent {
|
|
|
2192
2190
|
}
|
|
2193
2191
|
}
|
|
2194
2192
|
}
|
|
2193
|
+
validationUserRole() {
|
|
2194
|
+
const userRole = this.baseService.getUserRole();
|
|
2195
|
+
if (userRole == 40 || userRole == 41 || userRole == 42) {
|
|
2196
|
+
this.userRoleCommercial = true;
|
|
2197
|
+
}
|
|
2198
|
+
else {
|
|
2199
|
+
this.userRoleCommercial = false;
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2195
2202
|
closeTable() {
|
|
2196
2203
|
this.visibleModal = false;
|
|
2197
2204
|
this.showConfirmDialog = false;
|
|
2205
|
+
this.confirmForm.reset();
|
|
2198
2206
|
this.updateUserForm.reset();
|
|
2199
2207
|
this.idTypes = [];
|
|
2200
2208
|
this.countries = [];
|
|
@@ -2205,7 +2213,7 @@ class updateUserFormComponent {
|
|
|
2205
2213
|
trackIdTypeChanges() {
|
|
2206
2214
|
var _a;
|
|
2207
2215
|
if (this.idTypeSubscription) {
|
|
2208
|
-
this.idTypeSubscription.unsubscribe();
|
|
2216
|
+
this.idTypeSubscription.unsubscribe();
|
|
2209
2217
|
}
|
|
2210
2218
|
this.idTypeSubscription = (_a = this.updateUserForm.get('id_card_type')) === null || _a === void 0 ? void 0 : _a.valueChanges.subscribe(value => {
|
|
2211
2219
|
this.updateIdCardValidators(value);
|
|
@@ -2338,82 +2346,84 @@ class updateUserFormComponent {
|
|
|
2338
2346
|
selectReason(reason) {
|
|
2339
2347
|
this.confirmForm.controls['reason'].setValue(reason ? reason : null);
|
|
2340
2348
|
}
|
|
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
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
}
|
|
2349
|
+
// updateUser(): void {
|
|
2350
|
+
// if (
|
|
2351
|
+
// this.updateUserForm.invalid ||
|
|
2352
|
+
// this.updateUserForm.hasError('mismatch') ||
|
|
2353
|
+
// !this.hasFormChanged()
|
|
2354
|
+
// ) {
|
|
2355
|
+
// this.updateUserForm.markAllAsTouched();
|
|
2356
|
+
// console.log('createUser - Validation failed:', {
|
|
2357
|
+
// invalid: this.updateUserForm.invalid,
|
|
2358
|
+
// mismatch: this.updateUserForm.hasError('mismatch'),
|
|
2359
|
+
// hasChanges: this.hasFormChanged()
|
|
2360
|
+
// });
|
|
2361
|
+
// return;
|
|
2362
|
+
// }
|
|
2363
|
+
// this.loader = true;
|
|
2364
|
+
// const formValue = this.updateUserForm.getRawValue();
|
|
2365
|
+
// const request:any = {
|
|
2366
|
+
// token: this.baseService.getUserToken(),
|
|
2367
|
+
// user: {
|
|
2368
|
+
// code: this.DataStudent.code,
|
|
2369
|
+
// name: formValue.name,
|
|
2370
|
+
// last_name: formValue.last_name,
|
|
2371
|
+
// id_card_type: formValue.id_card_type,
|
|
2372
|
+
// id_card: formValue.id_card,
|
|
2373
|
+
// phone_indicative: formValue.phone_indicative,
|
|
2374
|
+
// phone_number: formValue.phone_number,
|
|
2375
|
+
// email: formValue.email,
|
|
2376
|
+
// gender: formValue.gender,
|
|
2377
|
+
// city: formValue.city,
|
|
2378
|
+
// service_hour: formValue.service_hour,
|
|
2379
|
+
// role: this.DataStudent.role,
|
|
2380
|
+
// status: formValue.status,
|
|
2381
|
+
// ...(this.showEmailIpt ? { email_ipt: formValue.email_ipt } : {}),
|
|
2382
|
+
// ...(formValue.changePassword && formValue.password ? { password: formValue.password } : {})
|
|
2383
|
+
// },
|
|
2384
|
+
// parent: this.showParentSection
|
|
2385
|
+
// ? {
|
|
2386
|
+
// code: this.DataStudent.cods?.parent?.code || null,
|
|
2387
|
+
// name: formValue.parent_name || null,
|
|
2388
|
+
// last_name: formValue.parent_last_name || null,
|
|
2389
|
+
// id_card_type: formValue.parent_id_card_type || null,
|
|
2390
|
+
// id_card: formValue.parent_id_card || null,
|
|
2391
|
+
// phone_indicative: formValue.parent_phone_indicative || null,
|
|
2392
|
+
// phone_number: formValue.parent_phone_number || null,
|
|
2393
|
+
// occupation: formValue.parent_occupation || null,
|
|
2394
|
+
// office_adrress: formValue.parent_office_adrress || null,
|
|
2395
|
+
// email: formValue.parent_email || null
|
|
2396
|
+
// }
|
|
2397
|
+
// : null
|
|
2398
|
+
// };
|
|
2399
|
+
// console.log(request);
|
|
2400
|
+
// this.userService.updateUserAndParentByCode(request).subscribe((response) => {
|
|
2401
|
+
// // this.courseType = response.data;
|
|
2402
|
+
// if (response.message.code === 1) {
|
|
2403
|
+
// Swal.fire({
|
|
2404
|
+
// position: 'center',
|
|
2405
|
+
// icon: 'success',
|
|
2406
|
+
// title: 'usuario actualizado satisfactoriamente',
|
|
2407
|
+
// showConfirmButton: false,
|
|
2408
|
+
// timer: 2500,
|
|
2409
|
+
// });
|
|
2410
|
+
// // this.userUpdated = true
|
|
2411
|
+
// this.userUpdatedEvent.emit();
|
|
2412
|
+
// this.closeTable();
|
|
2413
|
+
// }else{
|
|
2414
|
+
// Swal.fire({
|
|
2415
|
+
// position: 'center',
|
|
2416
|
+
// icon: 'error',
|
|
2417
|
+
// title: 'Ha ocurrido un error inesperado',
|
|
2418
|
+
// text: response.data.message,
|
|
2419
|
+
// showConfirmButton: false,
|
|
2420
|
+
// timer: 2500,
|
|
2421
|
+
// });
|
|
2422
|
+
// // this.userUpdated = false
|
|
2423
|
+
// }
|
|
2424
|
+
// });
|
|
2425
|
+
// this.loader = false;
|
|
2426
|
+
// }
|
|
2417
2427
|
hasFormChanged() {
|
|
2418
2428
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
2419
2429
|
if (!this.initialFormValue || !this.DataStudent) {
|
|
@@ -2635,8 +2645,8 @@ class updateUserFormComponent {
|
|
|
2635
2645
|
});
|
|
2636
2646
|
return;
|
|
2637
2647
|
}
|
|
2638
|
-
this.confirmForm.reset();
|
|
2639
|
-
this.showConfirmDialog = true;
|
|
2648
|
+
this.confirmForm.reset();
|
|
2649
|
+
this.showConfirmDialog = true;
|
|
2640
2650
|
}
|
|
2641
2651
|
acceptConfirmDialog() {
|
|
2642
2652
|
if (this.confirmForm.invalid) {
|
|
@@ -2647,26 +2657,21 @@ class updateUserFormComponent {
|
|
|
2647
2657
|
}
|
|
2648
2658
|
rejectConfirmDialog() {
|
|
2649
2659
|
this.confirmForm.reset();
|
|
2650
|
-
console.log('Confirm dialog rejected');
|
|
2651
2660
|
}
|
|
2652
2661
|
closeConfirmDialog() {
|
|
2653
2662
|
var _a, _b;
|
|
2654
2663
|
this.showConfirmDialog = false;
|
|
2655
2664
|
this.confirmForm.reset();
|
|
2656
|
-
(_a = this.confirmForm.get('reason')) === null || _a === void 0 ? void 0 : _a.setValue(
|
|
2665
|
+
(_a = this.confirmForm.get('reason')) === null || _a === void 0 ? void 0 : _a.setValue('');
|
|
2657
2666
|
(_b = this.confirmForm.get('observation')) === null || _b === void 0 ? void 0 : _b.setValue('');
|
|
2658
2667
|
}
|
|
2659
|
-
logObservation(value) {
|
|
2660
|
-
console.log('Observation changed:', value, this.confirmForm.getRawValue(), this.confirmForm.valid);
|
|
2661
|
-
this.cdr.detectChanges();
|
|
2662
|
-
}
|
|
2663
2668
|
}
|
|
2664
|
-
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 }
|
|
2665
|
-
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" }] });
|
|
2669
|
+
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 });
|
|
2670
|
+
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" }] });
|
|
2666
2671
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: updateUserFormComponent, decorators: [{
|
|
2667
2672
|
type: Component,
|
|
2668
|
-
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"] }]
|
|
2669
|
-
}], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: i0.ChangeDetectorRef }, { type: ParameterService }, { type: BaseService }, { type: UserService }
|
|
2673
|
+
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"] }]
|
|
2674
|
+
}], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: i0.ChangeDetectorRef }, { type: ParameterService }, { type: BaseService }, { type: UserService }]; }, propDecorators: { DataStudent: [{
|
|
2670
2675
|
type: Input
|
|
2671
2676
|
}], visibleModal: [{
|
|
2672
2677
|
type: Input
|