4
0

2 کامیت‌ها 14daf372cc ... 2270b3454d

نویسنده SHA1 پیام تاریخ
  Alan Garcia 2270b3454d Fix merge 3 سال پیش
  Alan Garcia 8b3b0d709a Formato fecha excel 3 سال پیش

+ 2 - 2
vacaciones/src/app/components/mes/mesmre/mesmre.component.html

@@ -195,7 +195,7 @@
           Fecha inicio
         </th>
         <td mat-cell *matCellDef="let element">
-          {{ formatoFecha(element.FECHAINICIO) }}
+          {{ element.FECHAINICIO }}
         </td>
       </ng-container>
   
@@ -204,7 +204,7 @@
           Fecha fin
         </th>
         <td mat-cell *matCellDef="let element">
-          {{ formatoFecha(element.FECHAFIN) }}
+          {{ element.FECHAFIN }}
         </td>
       </ng-container>
   

+ 8 - 10
vacaciones/src/app/components/mes/mesmre/mesmre.component.ts

@@ -327,16 +327,11 @@ export class MESMREComponent implements AfterViewInit {
         //Si las fechas del rango no son menores ni mayores entonces son *false* las condiciones,
         //Se debe de enviar verdadero si no excede este rango !false
 
-        /*console.log(!(rango_fecha_inicio < Date.parse(this.solicitudes[0].FECHAINICIO.split('-0').join('-')) 
-        && rango_fecha_fin < Date.parse(this.solicitudes[0].FECHAINICIO.split('-0').join('-'))) 
-        && !(rango_fecha_inicio > Date.parse(this.solicitudes[0].FECHAFIN.split('-0').join('-')) 
-        && rango_fecha_fin > Date.parse(this.solicitudes[0].FECHAFIN.split('-0').join('-'))));*/
-
-        filtro_solicitudes = this.solicitudes.filter(
-          solicitud => !(rango_fecha_inicio < Date.parse(solicitud.FECHAINICIO.split('-0').join('-'))
-            && rango_fecha_fin < Date.parse(solicitud.FECHAINICIO.split('-0').join('-')))
-            && !(rango_fecha_inicio > Date.parse(solicitud.FECHAFIN.split('-0').join('-'))
-              && rango_fecha_fin > Date.parse(solicitud.FECHAFIN.split('-0').join('-'))))
+        filtro_solicitudes = this.solicitudes.filter(solicitud => 
+        !(rango_fecha_inicio < Date.parse(this.formatoFecha(solicitud.FECHAINICIO).split('-0').join('-')) 
+        && rango_fecha_fin < Date.parse(this.formatoFecha(solicitud.FECHAINICIO).split('-0').join('-'))) 
+        && !(rango_fecha_inicio > Date.parse(this.formatoFecha(solicitud.FECHAFIN).split('-0').join('-')) 
+        && rango_fecha_fin > Date.parse(this.formatoFecha(solicitud.FECHAFIN).split('-0').join('-'))))
       }
 
       //FILTROS
@@ -491,6 +486,9 @@ export class MESMREComponent implements AfterViewInit {
         solicitud.VACACIONESDESPUES = 0;
       }
 
+      solicitud.FECHAINICIO = this.formatoFecha(solicitud.FECHAINICIO);
+      solicitud.FECHAFIN = this.formatoFecha(solicitud.FECHAFIN);
+
       return {
         IDSOLICITUD: solicitud.IDSOLICITUD,
         NOMBREEMPLEADO: solicitud.NOMBREEMPLEADO,

+ 0 - 3
vacaciones/src/app/services/excel/export-excel.service.ts

@@ -20,9 +20,6 @@ export class ExportExcelService {
     const data:MESMREInterface[] = excelData.map((
       solicitud: MESMREInterface
     ) => {
-      solicitud.FECHAINICIO = this.formatoFecha(solicitud.FECHAINICIO);
-      solicitud.FECHAFIN = this.formatoFecha(solicitud.FECHAFIN);
-
       return {
         IDSOLICITUD: solicitud.IDSOLICITUD,
         NOMBREEMPLEADO: solicitud.NOMBREEMPLEADO,