7773-testToMaster_2430 #2774

Merged
alexm merged 368 commits from 7773-testToMaster_2430 into master 2024-07-23 06:21:03 +00:00
2 changed files with 11 additions and 12 deletions
Showing only changes of commit b73eceb1c8 - Show all commits

View File

@ -96,16 +96,15 @@ module.exports = Self => {
return {'created': {gte: value}}; return {'created': {gte: value}};
case 'to': case 'to':
return {'created': {lte: value}}; return {'created': {lte: value}};
case 'm3':
return {'m3': value};
case 'description': case 'description':
return {'description': {like: `%${value}%`}}; return {'description': {like: `%${value}%`}};
case 'isOk':
case 'm3':
case 'warehouseFk': case 'warehouseFk':
return {[param]: value}; case 'workerFk':
case 'vehicleFk':
case 'agencyModeFk': case 'agencyModeFk':
return {[param]: value}; return {[param]: value};
case 'isOk':
return {'isOk': value};
} }
}); });

View File

@ -28,11 +28,11 @@ module.exports = Self => {
if (canViewAll) { if (canViewAll) {
const userConfig = await models.UserConfig.getUserConfig(ctx, myOptions); const userConfig = await models.UserConfig.getUserConfig(ctx, myOptions);
filterGrant = { filterGrant = {
where: {'a.warehouseFk': userConfig.warehouseFk} where: {'warehouseFk': userConfig.warehouseFk}
}; };
} else { } else {
filterGrant = { filterGrant = {
where: {'r.workerFk': userId} where: {'workerFk': userId}
}; };
} }
@ -46,16 +46,16 @@ module.exports = Self => {
and: [ and: [
{ {
or: [ or: [
{'r.created': currentDate}, {'created': currentDate},
{'r.created': nextDay} {'created': nextDay}
] ]
} }
] ]
}, },
order: [ order: [
'r.created ASC', 'created ASC',
'r.time ASC', 'time ASC',
'am.name ASC' 'agencyName ASC'
] ]
}; };