refactor: refs #7457 Added from param if not exists #2502

Merged
jgallego merged 14 commits from 7457-orderFilter into dev 2024-11-19 05:33:35 +00:00
5 changed files with 6 additions and 13 deletions
Showing only changes of commit 78ee7e141d - Show all commits

View File

@ -240,6 +240,5 @@
"There is already a tray with the same height": "There is already a tray with the same height",
"The height must be greater than 50cm": "The height must be greater than 50cm",
"The maximum height of the wagon is 200cm": "The maximum height of the wagon is 200cm",
"The quantity claimed cannot be greater than the quantity of the line": "The quantity claimed cannot be greater than the quantity of the line",
"The from field is required": "The 'from' field is required"
"The quantity claimed cannot be greater than the quantity of the line": "The quantity claimed cannot be greater than the quantity of the line"
}

View File

@ -382,6 +382,5 @@
"This buyer has already made a reservation for this date": "Este comprador ya ha hecho una reserva para esta fecha",
"No valid travel thermograph found": "No se encontró un termógrafo válido",
"The quantity claimed cannot be greater than the quantity of the line": "La cantidad reclamada no puede ser mayor que la cantidad de la línea",
"type cannot be blank": "Se debe rellenar el tipo",
"The from field is required": "El campo 'desde' es obligatorio"
"type cannot be blank": "Se debe rellenar el tipo"
}

View File

@ -362,6 +362,5 @@
"It has been invoiced but the PDF of refund not be generated": "Il a été facturé mais le PDF de remboursement n'a pas été généré",
"Cannot send mail": "Impossible d'envoyer le mail",
"Original invoice not found": "Facture originale introuvable",
"The quantity claimed cannot be greater than the quantity of the line": "Le montant réclamé ne peut pas être supérieur au montant de la ligne",
"The from field is required": "Le champ de est requis"
"The quantity claimed cannot be greater than the quantity of the line": "Le montant réclamé ne peut pas être supérieur au montant de la ligne"
}

View File

@ -362,6 +362,5 @@
"It has been invoiced but the PDF of refund not be generated": "Foi faturado mas não foi gerado o PDF do reembolso",
"Original invoice not found": "Fatura original não encontrada",
"Cannot send mail": "Não é possível enviar o email",
"The quantity claimed cannot be greater than the quantity of the line": "O valor reclamado não pode ser superior ao valor da linha",
"The from field is required": "O campo de origem é obrigatório"
"The quantity claimed cannot be greater than the quantity of the line": "O valor reclamado não pode ser superior ao valor da linha"
}

View File

@ -2,7 +2,6 @@
const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
const buildFilter = require('vn-loopback/util/filter').buildFilter;
const mergeFilters = require('vn-loopback/util/filter').mergeFilters;
const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.remoteMethod('filter', {
@ -23,7 +22,8 @@ module.exports = Self => {
}, {
arg: 'from',
type: 'date',
description: 'The from date'
description: 'The from date',
pablone marked this conversation as resolved
Review

se quedà que se deu de poder consultar tots els tickets d'un client. Que havent un limit no deuria anar lento. La solució no es obligar a pasar parametros.

se quedà que se deu de poder consultar tots els tickets d'un client. Que havent un limit no deuria anar lento. La solució no es obligar a pasar parametros.
required: true
}, {
arg: 'to',
type: 'date',
@ -84,9 +84,6 @@ module.exports = Self => {
Object.assign(myOptions, options);
const args = ctx.args;
if (!args.from)
throw new UserError('The from field is required');
// Apply filter by team
const teamMembersId = [];
if (args.myTeam != null) {