3676-zone_delivery-days #891

Merged
carlosjr merged 8 commits from 3676-zone_delivery-days into dev 2022-03-07 10:26:08 +00:00
2 changed files with 7 additions and 7 deletions
Showing only changes of commit 56bdb85af5 - Show all commits

View File

@ -11,12 +11,12 @@ module.exports = Self => {
{ {
arg: 'started', arg: 'started',
type: 'date', type: 'date',
description: 'The date calendar start', description: 'The calendar date start',
}, },
{ {
arg: 'ended', arg: 'ended',
type: 'date', type: 'date',
description: 'The date calendar end', description: 'The calendar date end',
} }
], ],
returns: { returns: {

View File

@ -3,15 +3,15 @@ module.exports = Self => {
description: 'Get zone events filtered for date and prioritized by type', description: 'Get zone events filtered for date and prioritized by type',
accepts: [ accepts: [
{ {
arg: 'zonesId', arg: 'zoneIds',
alexm marked this conversation as resolved Outdated

zoneIds

zoneIds
type: ['number'], type: ['number'],
description: 'The zones id', description: 'The zone identifiers or ids',
alexm marked this conversation as resolved Outdated

The zone identifiers or ids

The zone identifiers or ids
required: true required: true
}, },
{ {
arg: 'date', arg: 'date',
type: 'date', type: 'date',
description: 'The date calendar', description: 'The calendar date',
alexm marked this conversation as resolved Outdated

The calendar date

The calendar date
} }
], ],
returns: { returns: {
@ -24,7 +24,7 @@ module.exports = Self => {
} }
}); });
Self.getZoneClosing = async(zonesId, date, options) => { Self.getZoneClosing = async(zoneIds, date, options) => {
const myOptions = {}; const myOptions = {};
if (typeof options == 'object') if (typeof options == 'object')
@ -52,6 +52,6 @@ module.exports = Self => {
ORDER BY type='day' DESC, type='range' DESC, type='indefinitely' DESC) z ORDER BY type='day' DESC, type='range' DESC, type='indefinitely' DESC) z
GROUP BY z.id`; GROUP BY z.id`;
return Self.rawSql(query, [date, date, date, zonesId], myOptions); return Self.rawSql(query, [date, date, date, zoneIds], myOptions);
}; };
}; };