fix(claim): filter created

This commit is contained in:
Alex Moreno 2022-02-02 14:32:16 +01:00
parent 58cbdb3c52
commit 001aed3cb5
1 changed files with 6 additions and 1 deletions

View File

@ -82,6 +82,7 @@ module.exports = Self => {
Self.filter = async(ctx, filter, options) => {
const conn = Self.dataSource.connector;
const myOptions = {};
let to;
if (typeof options == 'object')
Object.assign(myOptions, options);
@ -109,7 +110,11 @@ module.exports = Self => {
case 'attenderFk':
return {'cl.workerFk': value};
case 'created':
return {'cl.created': value};
value.setHours(0, 0, 0);
to = new Date(value);
to.setHours(23, 59, 59, 999);
return {'cl.created': {between: [value, to]}};
}
});