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', arg: 'myTeam',
type: 'boolean', type: 'boolean',
description: `Team partners` description: `Team partners`
},
{
arg: 'daysOnward',
type: 'number',
description: 'The days onward'
} }
], ],
returns: { returns: {
@ -104,6 +109,9 @@ module.exports = Self => {
teamMembersId.push(userId); teamMembersId.push(userId);
} }
const today = Date.vnNew();
const future = Date.vnNew();
let where = buildFilter(ctx.args, (param, value) => { let where = buildFilter(ctx.args, (param, value) => {
switch (param) { switch (param) {
case 'search': case 'search':
@ -140,9 +148,13 @@ module.exports = Self => {
return {'tr.requesterFk': {inq: teamMembersId}}; return {'tr.requesterFk': {inq: teamMembersId}};
else else
return {'tr.requesterFk': {nin: teamMembersId}}; 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) if (!where)
where = {}; where = {};
where['tw.ticketFk'] = null; where['tw.ticketFk'] = null;

View File

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