|
|
@@ -146,8 +146,8 @@ export class MCOMPVFORMComponent implements AfterViewInit {
|
|
|
|
|
|
private createFormGroupTable() {
|
|
|
return new FormGroup({
|
|
|
- data_anio: new FormControl(),
|
|
|
- data_dias: new FormControl(),
|
|
|
+ data_anio: new FormControl([], Validators.required),
|
|
|
+ data_dias: new FormControl('', Validators.required),
|
|
|
});
|
|
|
}
|
|
|
|
|
|
@@ -372,29 +372,6 @@ export class MCOMPVFORMComponent implements AfterViewInit {
|
|
|
this.formGroupTable.reset();
|
|
|
this.orderTable();
|
|
|
}
|
|
|
- /* public agregar_tabla() {
|
|
|
- this.dataSource.data = this.modificar_anios_tabla(
|
|
|
- this.data_anio?.value.anio,
|
|
|
- this.data_dias?.value
|
|
|
- );
|
|
|
-
|
|
|
- let filtro = this.anios_vacaciones.filter(
|
|
|
- (element) => element.anio <= this.data_anio?.value.anio
|
|
|
- );
|
|
|
-
|
|
|
- if (filtro.length !== 0) {
|
|
|
- filtro.forEach((element0) => {
|
|
|
- let index = this.anios_vacaciones.findIndex(
|
|
|
- (element1) => element1.anio == element0.anio
|
|
|
- );
|
|
|
- this.anios_vacaciones.splice(index, 1);
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- this.orderTable();
|
|
|
- this.formGroupTable.reset();
|
|
|
- this.ngAfterViewInit();
|
|
|
- } */
|
|
|
|
|
|
private modificar_anios_tabla(anio: number, dias: number) {
|
|
|
let obj_add: any = {};
|