Skip to content

Commit

Permalink
feat(HUDS): implementa filtro para plan de indicaciones
Browse files Browse the repository at this point in the history
  • Loading branch information
ma7payne authored and negro89 committed Jun 3, 2024
1 parent 039bfa9 commit 9eb77da
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { asyncHandler } from '@andes/api-tool';
import { MongoQuery, ResourceBase, ResourceNotFound } from '@andes/core';
import { Auth } from '../../../../auth/auth.class';
import { IPlanIndicacionesDoc, PlanIndicaciones } from './plan-indicaciones.schema';
import { EventCore } from '@andes/event-bus/';
import * as moment from 'moment';
import { Auth } from '../../../../auth/auth.class';
import { IPlanIndicacionesDoc, PlanIndicaciones } from './plan-indicaciones.schema';
class PlanIndicacionesController extends ResourceBase<IPlanIndicacionesDoc> {
Model = PlanIndicaciones;
resourceName = 'plan-indicaciones';
Expand All @@ -26,7 +26,13 @@ class PlanIndicacionesController extends ResourceBase<IPlanIndicacionesDoc> {
{ fechaInicio: { $lte: moment(fecha).endOf('day').add(1, 'd').toDate() } }
]
};
}
},
excluyeEstado: {
field: 'estadoActual.tipo',
fn: (value) => {
return { $ne: value };
}
},
};
eventBus = EventCore;
}
Expand Down

0 comments on commit 9eb77da

Please sign in to comment.