|
|
@@ -201,8 +201,6 @@ export class MESMSVComponent implements OnInit {
|
|
|
} else {
|
|
|
this.disabledFechas = false;
|
|
|
this.dias_vacacionales?.enable();
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
} else if (!this.otro_usuario?.value) {
|
|
|
this.disabledFechas = false;
|
|
|
@@ -212,8 +210,6 @@ export class MESMSVComponent implements OnInit {
|
|
|
this.dias_vacacionales?.disable();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
let idpolitica: any = [];
|
|
|
|
|
|
if (this.otro_usuario?.value) {
|
|
|
@@ -253,10 +249,6 @@ export class MESMSVComponent implements OnInit {
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
} else {
|
|
|
idpolitica = this._encService.desencriptar(this.usuario_session.POLITICA);
|
|
|
await lastValueFrom(
|
|
|
@@ -366,15 +358,16 @@ export class MESMSVComponent implements OnInit {
|
|
|
|
|
|
let dateToString = cellDate?.toString();
|
|
|
let lastPosition = this.dates_disable[this.dates_disable.length - 1];
|
|
|
+
|
|
|
cellDate = new Date(dateToString!);
|
|
|
-
|
|
|
+
|
|
|
let index = 0;
|
|
|
for await (let item of this.dates_disable) {
|
|
|
if (
|
|
|
cellDate.getDate() == this.dates_disable[index].getDate() &&
|
|
|
- cellDate.getMonth() == this.dates_disable[index].getMonth() &&
|
|
|
- cellDate.getFullYear() == lastPosition.getFullYear()
|
|
|
- ) {
|
|
|
+ cellDate.getMonth() == this.dates_disable[index].getMonth()
|
|
|
+ && cellDate.getFullYear() == this.dates_disable[index].getFullYear()
|
|
|
+ ) {
|
|
|
collection[cellDate.getDate() - 1].style.color = 'white';
|
|
|
collection[cellDate.getDate() - 1].style.background = 'orange';
|
|
|
return 'example-custom-date-class';
|
|
|
@@ -529,7 +522,8 @@ export class MESMSVComponent implements OnInit {
|
|
|
this.dias_feriados.forEach((element) => {
|
|
|
if (
|
|
|
element.DIA == fecha1.getDate() &&
|
|
|
- element.MES - 1 == fecha1.getMonth()
|
|
|
+ element.MES - 1 == fecha1.getMonth() &&
|
|
|
+ element.ANIO == fecha1.getFullYear()
|
|
|
) {
|
|
|
if (dia_semana_recorrida == 6 || dia_semana_recorrida == 0) {
|
|
|
} else cont--;
|
|
|
@@ -560,7 +554,8 @@ export class MESMSVComponent implements OnInit {
|
|
|
this.dias_feriados.forEach((element) => {
|
|
|
if (
|
|
|
element.DIA == fecha1.getDate() &&
|
|
|
- element.MES - 1 == fecha1.getMonth()
|
|
|
+ element.MES - 1 == fecha1.getMonth() &&
|
|
|
+ element.ANIO == fecha1.getFullYear()
|
|
|
) {
|
|
|
if (dias_semana[0] != 'Si' && fecha1.getDay() == 0) diasFeriados++;
|
|
|
if (dias_semana[1] != 'Si' && fecha1.getDay() == 4) diasFeriados++;
|
|
|
@@ -626,7 +621,7 @@ export class MESMSVComponent implements OnInit {
|
|
|
this.dias_feriados = response.response;
|
|
|
this.dates_disable = response.response.map((object: any) => {
|
|
|
return new Date(object.ANIO, object.MES - 1, object.DIA);
|
|
|
- });
|
|
|
+ });
|
|
|
},
|
|
|
(error: HttpErrorResponse) => {
|
|
|
if (!error.ok)
|