master #3299

Merged
carlosap merged 9 commits from master into test 2024-12-12 17:23:12 +00:00
2 changed files with 19 additions and 5 deletions
Showing only changes of commit 24f0c92829 - Show all commits

View File

@ -64,6 +64,11 @@ module.exports = Self => {
arg: 'myTeam',
type: 'boolean',
description: `Team partners`
},
{
arg: 'daysOnward',
type: 'number',
description: 'The days onward'
}
],
returns: {
@ -104,6 +109,9 @@ module.exports = Self => {
teamMembersId.push(userId);
}
const today = Date.vnNew();
const future = Date.vnNew();
let where = buildFilter(ctx.args, (param, value) => {
switch (param) {
case 'search':
@ -140,9 +148,13 @@ module.exports = Self => {
return {'tr.requesterFk': {inq: teamMembersId}};
else
return {'tr.requesterFk': {nin: teamMembersId}};
case 'daysOnward':
today.setHours(0, 0, 0, 0);
future.setDate(today.getDate() + value);
future.setHours(23, 59, 59, 999);
return {'t.shipped': {between: [today, future]}};
}
});
if (!where)
where = {};
where['tw.ticketFk'] = null;

View File

@ -23,7 +23,7 @@
"type" : "number"
},
"isDependend": {
"type" : "number"
"type" : "boolean"
},
"familySituation": {
"type" : "number"
@ -35,15 +35,17 @@
"type" : "number"
},
"hasHousingPaymentBefore": {
"type" : "number"
"type" : "boolean"
},
"hasHousingPaymentAfter": {
"type" : "number"
"type" : "boolean"
},
"updated": {
"type" : "date"
},
"hasExtendedWorking": {
"type" : "boolean"
}
},
"relations": {
"disabilityGrade": {