diff --git a/modules/ticket/back/methods/expedition/deleteExpeditions.js b/modules/ticket/back/methods/expedition/deleteExpeditions.js index b902b9f0c..5b9d0daaa 100644 --- a/modules/ticket/back/methods/expedition/deleteExpeditions.js +++ b/modules/ticket/back/methods/expedition/deleteExpeditions.js @@ -4,7 +4,7 @@ module.exports = Self => { description: 'Delete the selected expeditions', accessType: 'WRITE', accepts: [{ - arg: 'expeditionsIds', + arg: 'expeditionIds', type: ['number'], required: true, description: 'The expeditions ids to delete' @@ -19,7 +19,7 @@ module.exports = Self => { } }); - Self.deleteExpeditions = async(expeditionsIds, options) => { + Self.deleteExpeditions = async(expeditionIds, options) => { const models = Self.app.models; const myOptions = {}; let tx; @@ -34,7 +34,7 @@ module.exports = Self => { try { const deletedExpeditions = await models.Expedition.destroyAll({ - id: {inq: expeditionsIds} + id: {inq: expeditionIds} }, myOptions); if (tx) await tx.commit(); diff --git a/modules/ticket/back/methods/expedition/moveExpeditions.js b/modules/ticket/back/methods/expedition/moveExpeditions.js index 2c521dda7..338568fdb 100644 --- a/modules/ticket/back/methods/expedition/moveExpeditions.js +++ b/modules/ticket/back/methods/expedition/moveExpeditions.js @@ -4,7 +4,7 @@ module.exports = Self => { description: 'Move the selected expeditions to another ticket', accessType: 'WRITE', accepts: [{ - arg: 'expeditionsIds', + arg: 'expeditionIds', type: ['number'], required: true, description: 'The expeditions ids to nove' @@ -25,7 +25,7 @@ module.exports = Self => { } }); - Self.moveExpeditions = async(expeditionsIds, ticketId, options) => { + Self.moveExpeditions = async(expeditionIds, ticketId, options) => { const models = Self.app.models; const myOptions = {}; let tx; @@ -40,7 +40,7 @@ module.exports = Self => { try { const promises = []; - for (let expeditionsId of expeditionsIds) { + for (let expeditionsId of expeditionIds) { const expeditionToUpdate = await models.Expedition.findById(expeditionsId); const expeditionUpdated = expeditionToUpdate.updateAttribute('ticketFk', ticketId, myOptions); promises.push(expeditionUpdated); diff --git a/modules/ticket/front/expedition/index.spec.js b/modules/ticket/front/expedition/index.spec.js index fe23046ce..ad5dafbd7 100644 --- a/modules/ticket/front/expedition/index.spec.js +++ b/modules/ticket/front/expedition/index.spec.js @@ -63,7 +63,7 @@ describe('Ticket', () => { it('should make a query and then call to the model refresh() method', () => { jest.spyOn($scope.model, 'refresh'); - const expectedParams = {expeditionsIds: [1, 2]}; + const expectedParams = {expeditionIds: [1, 2]}; $httpBackend.expect('POST', 'Expeditions/deleteExpeditions', expectedParams).respond(200); controller.onRemove(); $httpBackend.flush(); @@ -97,7 +97,7 @@ describe('Ticket', () => { const expectedResponse = {id: ticketIdToTransfer}; const expectedParams = { - expeditionsIds: [1, 2], + expeditionIds: [1, 2], ticketId: 28 }; $httpBackend.expect('POST', 'Tickets/new', expectedTicket).respond(expectedResponse); diff --git a/modules/ticket/front/expedition/locale/es.yml b/modules/ticket/front/expedition/locale/es.yml index bc3ec3345..68812f985 100644 --- a/modules/ticket/front/expedition/locale/es.yml +++ b/modules/ticket/front/expedition/locale/es.yml @@ -2,4 +2,5 @@ Status log: Hitorial de estados Expedition removed: Expedición eliminada Move: Mover New ticket without route: Nuevo ticket sin ruta -New ticket with route: Nuevo ticket con ruta \ No newline at end of file +New ticket with route: Nuevo ticket con ruta +Id route: Id ruta \ No newline at end of file