|
|
@@ -87,6 +87,9 @@ export class MESMSVComponent implements OnInit {
|
|
|
|
|
|
public disabledFechas: boolean = false;
|
|
|
|
|
|
+ @ViewChild(FormGroupDirective) formDirective!: FormGroupDirective;
|
|
|
+
|
|
|
+
|
|
|
constructor(
|
|
|
private _encService: ENCService,
|
|
|
public dialog: MatDialog,
|
|
|
@@ -154,11 +157,14 @@ export class MESMSVComponent implements OnInit {
|
|
|
);
|
|
|
|
|
|
if (!this.otro_usuario?.value) {
|
|
|
- this.numero_empleado?.setValue(
|
|
|
- this._encService.desencriptar(this.usuario_session.IDUSUARIO)
|
|
|
- );
|
|
|
+ console.log("test");
|
|
|
+
|
|
|
+ this.numero_empleado?.setValue(this._encService.desencriptar(this.usuario_session.IDUSUARIO));
|
|
|
this.disabledFechas = false;
|
|
|
+ this.dias_vacacionales?.enable();
|
|
|
+
|
|
|
} else this.numero_empleado?.setValue('');
|
|
|
+
|
|
|
|
|
|
this.fecha_inicio?.reset();
|
|
|
this.fecha_fin?.reset();
|
|
|
@@ -180,9 +186,19 @@ export class MESMSVComponent implements OnInit {
|
|
|
let usr_obj: any = this.otros_usuarios_arr.filter(
|
|
|
(element) => element.IDUSUARIO === id_empleado
|
|
|
);
|
|
|
- this.disabledFechas = usr_obj[0] === undefined;
|
|
|
+ if (usr_obj[0] === undefined) {
|
|
|
+ this.disabledFechas = true;
|
|
|
+ this.dias_vacacionales?.disable();
|
|
|
+ }else{
|
|
|
+ this.disabledFechas = false;
|
|
|
+ this.dias_vacacionales?.enable();
|
|
|
+ }
|
|
|
+ } else if (!this.otro_usuario?.value) {
|
|
|
+ this.disabledFechas = false;
|
|
|
+ this.dias_vacacionales?.enable();
|
|
|
} else {
|
|
|
this.disabledFechas = true;
|
|
|
+ this.dias_vacacionales?.disable();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -324,9 +340,6 @@ export class MESMSVComponent implements OnInit {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- @ViewChild(FormGroupDirective) formDirective!: FormGroupDirective;
|
|
|
-
|
|
|
registrar() {
|
|
|
this.envioForm.text = 'Enviando...';
|
|
|
this.envioForm.status = true;
|