From ef95244d074817a7021987f42cddaa306fa8795c Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 17 Dec 2019 08:38:36 +0100 Subject: [PATCH 1/2] stowaway refactor --- .../00-expedition_beforeInsert.sql | 33 ++++ .../10120-december/00-stowaway_unboarding.sql | 31 ++++ modules/claim/front/locale/es.yml | 2 +- modules/client/front/locale/es.yml | 2 +- .../invoiceOut/front/descriptor/locale/es.yml | 2 +- modules/order/front/descriptor/locale/es.yml | 4 +- modules/order/front/line/locale/es.yml | 2 +- modules/route/front/tickets/locale/es.yml | 6 +- .../back/methods/ticket/canHaveStowaway.js | 13 +- .../back/methods/ticket/deleteStowaway.js | 39 +++++ .../ticket/specs/deleteStowaway.spec.js | 42 +++++ modules/ticket/back/models/ticket.js | 1 + modules/ticket/back/models/ticket.json | 2 +- .../ticket/front/descriptor/addStowaway.html | 4 +- modules/ticket/front/descriptor/index.html | 11 +- modules/ticket/front/descriptor/index.js | 145 +++++++++--------- modules/ticket/front/descriptor/index.spec.js | 8 +- modules/ticket/front/descriptor/locale/es.yml | 4 +- .../front/descriptor/removeStowaway.html | 38 ----- .../ticket/front/descriptor/removeStowaway.js | 78 ---------- modules/ticket/front/descriptor/style.scss | 2 +- modules/ticket/front/index.js | 1 - modules/ticket/front/locale/es.yml | 6 +- modules/ticket/front/sale/locale/es.yml | 6 +- .../worker/front/time-control/locale/es.yml | 2 +- 25 files changed, 264 insertions(+), 220 deletions(-) create mode 100644 db/changes/10120-december/00-expedition_beforeInsert.sql create mode 100644 db/changes/10120-december/00-stowaway_unboarding.sql create mode 100644 modules/ticket/back/methods/ticket/deleteStowaway.js create mode 100644 modules/ticket/back/methods/ticket/specs/deleteStowaway.spec.js delete mode 100644 modules/ticket/front/descriptor/removeStowaway.html delete mode 100644 modules/ticket/front/descriptor/removeStowaway.js diff --git a/db/changes/10120-december/00-expedition_beforeInsert.sql b/db/changes/10120-december/00-expedition_beforeInsert.sql new file mode 100644 index 000000000..819cd7a7f --- /dev/null +++ b/db/changes/10120-december/00-expedition_beforeInsert.sql @@ -0,0 +1,33 @@ +DROP TRIGGER IF EXISTS `vn`.`expedition_beforeInsert`; + +DELIMITER $$ +USE `vn`$$ +CREATE DEFINER=`root`@`%` TRIGGER `vn`.`expedition_beforeInsert` + BEFORE INSERT ON `expedition` FOR EACH ROW +BEGIN + DECLARE intcounter INT; + DECLARE vShipFk INT; + + IF NEW.isBox > 0 THEN + + UPDATE ticket SET packages = nz(packages) + 1 WHERE id = NEW.ticketFk; + + SELECT IFNULL(MAX(counter),0) +1 INTO intcounter + FROM expedition e + INNER JOIN ticket t1 ON e.ticketFk = t1.id + LEFT JOIN ticketState ts ON ts.ticket = t1.id + INNER JOIN ticket t2 ON t2.addressFk = t1.addressFk AND DATE(t2.shipped) = DATE(t1.shipped) + AND t1.warehouseFk = t2.warehouseFk + WHERE t2.id = NEW.ticketFk AND ts.alertLevel < 3 AND t1.companyFk = t2.companyFk + AND t1.agencyModeFk = t2.agencyModeFk; + + SET NEW.`counter` = intcounter; + END IF; + + SELECT shipFk INTO vShipFk FROM stowaway WHERE id = NEW.ticketFk; + + IF vShipFk THEN + CALL stowaway_unboarding(vShipFk, NEW.ticketFk); + END IF; +END$$ +DELIMITER ; diff --git a/db/changes/10120-december/00-stowaway_unboarding.sql b/db/changes/10120-december/00-stowaway_unboarding.sql new file mode 100644 index 000000000..271baba6c --- /dev/null +++ b/db/changes/10120-december/00-stowaway_unboarding.sql @@ -0,0 +1,31 @@ + +USE `vn`; +DROP procedure IF EXISTS `vn`.`stowawayUnBoarding`; + +DELIMITER $$ +USE `vn`$$ +CREATE DEFINER=`root`@`%` PROCEDURE `stowaway_unboarding`(vShipFk INT, vStowawayFk INT) +BEGIN + DECLARE vWorker VARCHAR(255); + + DELETE FROM stowaway + WHERE shipFk = vShipFk AND id = vStowawayFk; + + DELETE tt FROM ticketTracking tt + JOIN state s ON s.id = tt.stateFk + WHERE code = 'BOARDING' AND ticketFk = vShipFk; + + DELETE FROM sale + WHERE ticketFk = vShipFk + AND itemFk = 98 + AND concept = CONCAT('POLIZÓN! ',vStowawayFk); + + SELECT u.`name` INTO vWorker + FROM account.user u JOIN worker w ON w.userFk = u.id + WHERE w.id = client_getSalesPersonByTicket(vStowawayFk); + + SELECT messageSend(vWorker,CONCAT('El ticket: ', vStowawayFk, ' ha dejado de ser un polizón')) INTO @a; +END$$ + +DELIMITER ; +; diff --git a/modules/claim/front/locale/es.yml b/modules/claim/front/locale/es.yml index f636b43ee..26b1eba32 100644 --- a/modules/claim/front/locale/es.yml +++ b/modules/claim/front/locale/es.yml @@ -7,7 +7,7 @@ Claimed ticket: Ticket reclamado Delete claim: Eliminar reclamación Observation: Observación Responsible: Responsable -Remove sale: Borrar linea +Remove sale: Eliminar linea Claim Id: Id reclamación Created: Creado Send Pickup order: Enviar orden de recogida diff --git a/modules/client/front/locale/es.yml b/modules/client/front/locale/es.yml index baca4d479..1b44b5652 100644 --- a/modules/client/front/locale/es.yml +++ b/modules/client/front/locale/es.yml @@ -18,7 +18,7 @@ Sent: Enviado Worker: Trabajador Sample: Plantilla Credit: Crédito -Are you sure you want to delete this expedition?: ¿Está seguro de borrar esta expedición? +Are you sure you want to delete this expedition?: ¿Está seguro de eliminar esta expedición? Others: Otros New order: Nuevo pedido Client frozen: Cliente congelado diff --git a/modules/invoiceOut/front/descriptor/locale/es.yml b/modules/invoiceOut/front/descriptor/locale/es.yml index 4f6abcea3..e85be96bf 100644 --- a/modules/invoiceOut/front/descriptor/locale/es.yml +++ b/modules/invoiceOut/front/descriptor/locale/es.yml @@ -3,7 +3,7 @@ Volume: Volumen Client card: Ficha del cliente Invoice ticket list: Listado de tickets de la factura Show invoice PDF: Ver factura en PDF -Delete Invoice: Borrar factura +Delete Invoice: Eliminar factura InvoiceOut deleted: Factura eliminada Are you sure you want to delete this invoice?: Estas seguro de eliminar esta factura? Book invoice: Asentar factura diff --git a/modules/order/front/descriptor/locale/es.yml b/modules/order/front/descriptor/locale/es.yml index 21f3051ca..0734d7638 100644 --- a/modules/order/front/descriptor/locale/es.yml +++ b/modules/order/front/descriptor/locale/es.yml @@ -7,6 +7,6 @@ Items: Articulos Agency: Agencia Sales person: Comercial Order ticket list: Ticket del pedido -Delete order: Borrar pedido -You are going to delete this order: El pedido se borrará +Delete order: Eliminar pedido +You are going to delete this order: El pedido se eliminará continue anyway?: ¿Continuar de todos modos? \ No newline at end of file diff --git a/modules/order/front/line/locale/es.yml b/modules/order/front/line/locale/es.yml index 688778561..d1368d369 100644 --- a/modules/order/front/line/locale/es.yml +++ b/modules/order/front/line/locale/es.yml @@ -1,3 +1,3 @@ Delete row: Eliminar linea Order confirmed: Pedido confirmado -Are you sure you want to delete this row?: ¿Estas seguro de que quieres borrar esta línea? \ No newline at end of file +Are you sure you want to delete this row?: ¿Estas seguro de que quieres eliminar esta línea? \ No newline at end of file diff --git a/modules/route/front/tickets/locale/es.yml b/modules/route/front/tickets/locale/es.yml index 7edeff17b..02f9eed08 100644 --- a/modules/route/front/tickets/locale/es.yml +++ b/modules/route/front/tickets/locale/es.yml @@ -1,8 +1,8 @@ -Remove ticket: Borrar ticket +Remove ticket: Eliminar ticket Open buscaman: Abrir buscaman -Ticket removed from route: Ticket borrado de la ruta +Ticket removed from route: Ticket quitado de la ruta Order changed: Orden cambiado -Delete ticket from route?: ¿Borrar ticket de la ruta? +Delete ticket from route?: ¿Quitar el ticket de la ruta? Sort routes: Ordenar rutas Add ticket: Añadir ticket Tickets to add: Tickets a añadir \ No newline at end of file diff --git a/modules/ticket/back/methods/ticket/canHaveStowaway.js b/modules/ticket/back/methods/ticket/canHaveStowaway.js index 0d64c2d11..bbc6cf4b3 100644 --- a/modules/ticket/back/methods/ticket/canHaveStowaway.js +++ b/modules/ticket/back/methods/ticket/canHaveStowaway.js @@ -21,10 +21,17 @@ module.exports = Self => { Self.canHaveStowaway = async id => { const models = Self.app.models; - const ticket = await models.Ticket.findById(id); + const ticket = await models.Ticket.findById(id, { + include: { + relation: 'ship', + scope: { + fields: ['id'] + } + } + }); const warehouse = await models.Warehouse.findById(ticket.warehouseFk); - - if (warehouse && warehouse.hasStowaway) + const hasStowaway = ticket.ship() ? true : false; + if (warehouse && warehouse.hasStowaway && !hasStowaway) return true; return false; diff --git a/modules/ticket/back/methods/ticket/deleteStowaway.js b/modules/ticket/back/methods/ticket/deleteStowaway.js new file mode 100644 index 000000000..6f3a1760f --- /dev/null +++ b/modules/ticket/back/methods/ticket/deleteStowaway.js @@ -0,0 +1,39 @@ + +module.exports = Self => { + Self.remoteMethod('deleteStowaway', { + description: 'Deletes an stowaway', + accessType: 'WRITE', + accepts: [{ + arg: 'id', + type: 'number', + required: true, + description: 'The ticket id', + http: {source: 'path'} + }], + returns: { + root: true + }, + http: { + path: `/:id/deleteStowaway`, + verb: 'POST' + } + }); + + Self.deleteStowaway = async id => { + const ticket = await Self.findById(id, { + include: [{ + relation: 'ship' + }, { + relation: 'stowaway' + }] + }); + + let params; + if (ticket.stowaway()) + params = [ticket.stowaway().shipFk, ticket.stowaway().id]; + else if (ticket.ship()) + params = [ticket.ship().shipFk, ticket.ship().id]; + + return Self.rawSql(`CALL vn.stowaway_unboarding(?, ?)`, params); + }; +}; diff --git a/modules/ticket/back/methods/ticket/specs/deleteStowaway.spec.js b/modules/ticket/back/methods/ticket/specs/deleteStowaway.spec.js new file mode 100644 index 000000000..d5a10ac3b --- /dev/null +++ b/modules/ticket/back/methods/ticket/specs/deleteStowaway.spec.js @@ -0,0 +1,42 @@ +const app = require('vn-loopback/server/server'); + +fdescribe('ticket deleteStowaway()', () => { + const shipId = 16; + const stowawayId = 17; + + it('should create an stowaway', async() => { + await app.models.Stowaway.rawSql(` + INSERT INTO stowaway (id, shipFk) VALUES (?, ?) + `, [stowawayId, shipId]); + + const stowawayExists = await app.models.Stowaway.count({id: stowawayId, shipFk: shipId}); + + expect(stowawayExists).toEqual(1); + }); + + it('should delete the stowaway from the ship ticket', async() => { + await app.models.Ticket.deleteStowaway(shipId); + + const stowawayExists = await app.models.Stowaway.count({id: stowawayId, shipFk: shipId}); + + expect(stowawayExists).toEqual(0); + }); + + it('should create again an stowaway', async() => { + await app.models.Stowaway.rawSql(` + INSERT INTO stowaway (id, shipFk) VALUES (?, ?) + `, [stowawayId, shipId]); + + const stowawayExists = await app.models.Stowaway.count({id: stowawayId, shipFk: shipId}); + + expect(stowawayExists).toEqual(1); + }); + + it('should delete the stowaway from the stowaway ticket', async() => { + await app.models.Ticket.deleteStowaway(stowawayId); + + const stowawayExists = await app.models.Stowaway.count({id: stowawayId, shipFk: shipId}); + + expect(stowawayExists).toEqual(0); + }); +}); diff --git a/modules/ticket/back/models/ticket.js b/modules/ticket/back/models/ticket.js index c42df62ef..8ba2bfb0d 100644 --- a/modules/ticket/back/models/ticket.js +++ b/modules/ticket/back/models/ticket.js @@ -27,6 +27,7 @@ module.exports = Self => { require('../methods/ticket/transferSales')(Self); require('../methods/ticket/canHaveStowaway')(Self); require('../methods/ticket/recalculateComponents')(Self); + require('../methods/ticket/deleteStowaway')(Self); Self.observe('before save', async function(ctx) { if (ctx.isNewInstance) return; diff --git a/modules/ticket/back/models/ticket.json b/modules/ticket/back/models/ticket.json index 7b6c4a64b..113e6a75f 100644 --- a/modules/ticket/back/models/ticket.json +++ b/modules/ticket/back/models/ticket.json @@ -51,7 +51,7 @@ "foreignKey": "clientFk" }, "ship": { - "type": "hasMany", + "type": "hasOne", "model": "Stowaway", "foreignKey": "shipFk" }, diff --git a/modules/ticket/front/descriptor/addStowaway.html b/modules/ticket/front/descriptor/addStowaway.html index 4ffab8ce5..ec7005e79 100644 --- a/modules/ticket/front/descriptor/addStowaway.html +++ b/modules/ticket/front/descriptor/addStowaway.html @@ -7,10 +7,10 @@ class="modal-form" on-open="model.refresh()"> -
+
Stowaways to add
- + diff --git a/modules/ticket/front/descriptor/index.html b/modules/ticket/front/descriptor/index.html index decc0b6d4..3632d37f1 100644 --- a/modules/ticket/front/descriptor/index.html +++ b/modules/ticket/front/descriptor/index.html @@ -139,11 +139,12 @@ card-reload="$ctrl.cardReload()" ticket="$ctrl.ticket"> - - + + this.shouldShowRemoveStowaway() + callback: this.showDeleteStowaway, + show: () => this.shouldShowDeleteStowaway() }, { name: 'Make invoice', @@ -43,6 +43,54 @@ class Controller extends Component { ]; } + get ticket() { + return this._ticket; + } + + set ticket(value) { + this._ticket = value; + + if (!value) return; + + if (this.$params.sendSMS) + this.showSMSDialog(); + + this.canStowaway(); + + let links = { + btnOne: { + icon: 'person', + state: `client.card.summary({id: ${value.clientFk}})`, + tooltip: 'Client card' + }}; + + if (value.stowaway) { + links.btnTwo = { + icon: 'icon-stowaway', + state: `ticket.card.summary({id: ${value.stowaway.shipFk}})`, + tooltip: 'Ship stowaways' + }; + } + + if (value.ship) { + links.btnThree = { + icon: 'icon-stowaway', + state: `ticket.card.summary({id: ${value.ship.id}})`, + tooltip: 'Stowaway' + }; + } + + this._quicklinks = links; + } + + get quicklinks() { + return this._quicklinks; + } + + set quicklinks(value = {}) { + this._quicklinks = Object.assign(value, this._quicklinks); + } + showChangeShipped() { if (!this.isEditable) { this.vnApp.showError(this.$translate.instant(`This ticket can't be modified`)); @@ -72,24 +120,6 @@ class Controller extends Component { return false; } - canStowaway() { - if (!this.isTicketModule()) return; - - this.$http.get(`Tickets/${this.ticket.id}/canHaveStowaway`).then(response => { - if (response.data === true) - return this.canShowStowaway = true; - - return this.canShowStowaway = false; - }); - } - - shouldShowRemoveStowaway() { - if (!this._ticket || !this.isTicketModule()) - return false; - - return (this._ticket.stowaway || (this._ticket.ship && this._ticket.ship.length > 0)); - } - onMoreChange(callback) { callback.call(this); } @@ -149,61 +179,38 @@ class Controller extends Component { } } + canStowaway() { + if (!this.isTicketModule()) return; + + this.$http.get(`Tickets/${this.ticket.id}/canHaveStowaway`).then(response => { + if (response.data === true) + return this.canShowStowaway = true; + + return this.canShowStowaway = false; + }); + } + + shouldShowDeleteStowaway() { + if (!this._ticket || !this.isTicketModule()) + return false; + + return this._ticket.stowaway || this._ticket.ship; + } + showAddStowaway() { this.$.addStowaway.show(); } - showRemoveStowaway() { - this.$.removeStowaway.show(); + showDeleteStowaway() { + this.$.deleteStowaway.show(); } - get ticket() { - return this._ticket; - } - - set ticket(value) { - this._ticket = value; - - if (!value) return; - - if (this.$params.sendSMS) - this.showSMSDialog(); - - this.canStowaway(); - - let links = { - btnOne: { - icon: 'person', - state: `client.card.summary({id: ${value.clientFk}})`, - tooltip: 'Client card' - }}; - - if (value.stowaway) { - links.btnTwo = { - icon: 'icon-stowaway', - state: `ticket.card.summary({id: ${value.stowaway.shipFk}})`, - tooltip: 'Ship stowaways' - }; - } - - if (value.ship && value.ship.length == 1) { - links.btnThree = { - icon: 'icon-stowaway', - state: `ticket.card.summary({id: ${value.ship[0].id}})`, - tooltip: 'Stowaway' - }; - } else if (value.ship && value.ship.length > 1) - this.shipStowaways = value.ship; - - this._quicklinks = links; - } - - set quicklinks(value = {}) { - this._quicklinks = Object.assign(value, this._quicklinks); - } - - get quicklinks() { - return this._quicklinks; + deleteStowaway() { + const query = `Tickets/${this.ticket.id}/deleteStowaway`; + this.$http.post(query).then(res => { + this.vnApp.showSuccess(this.$translate.instant('Data saved!')); + this.cardReload(); + }); } showDeliveryNote() { diff --git a/modules/ticket/front/descriptor/index.spec.js b/modules/ticket/front/descriptor/index.spec.js index 937a837b3..eb554218e 100644 --- a/modules/ticket/front/descriptor/index.spec.js +++ b/modules/ticket/front/descriptor/index.spec.js @@ -174,11 +174,11 @@ describe('Ticket Component vnTicketDescriptor', () => { describe('showRemoveStowaway()', () => { it('should show a dialog for an stowaway removal', () => { - controller.$.removeStowaway = {}; - controller.$.removeStowaway.show = jasmine.createSpy('show'); - controller.showRemoveStowaway(); + controller.$.deleteStowaway = {}; + controller.$.deleteStowaway.show = jasmine.createSpy('show'); + controller.showDeleteStowaway(); - expect(controller.$.removeStowaway.show).toHaveBeenCalledWith(); + expect(controller.$.deleteStowaway.show).toHaveBeenCalledWith(); }); }); diff --git a/modules/ticket/front/descriptor/locale/es.yml b/modules/ticket/front/descriptor/locale/es.yml index 2f72e226e..68512fec2 100644 --- a/modules/ticket/front/descriptor/locale/es.yml +++ b/modules/ticket/front/descriptor/locale/es.yml @@ -5,8 +5,8 @@ Ship stowaways: Polizones del barco Stowaways to add: Polizones a añadir Stowaways of the ticket: Polizones del ticket Add stowaway: Añadir polizón -Remove stowaway: Borrar polizón -Are you sure you want to delete this stowaway?: ¿Seguro que quieres borrar este polizón? +Remove stowaway: Eliminar polizón +Are you sure you want to delete this stowaway?: ¿Seguro que quieres eliminar este polizón? Are you sure you want to send it?: ¿Seguro que quieres enviarlo? Show Delivery Note: Ver albarán Send Delivery Note: Enviar albarán diff --git a/modules/ticket/front/descriptor/removeStowaway.html b/modules/ticket/front/descriptor/removeStowaway.html deleted file mode 100644 index 891329b7e..000000000 --- a/modules/ticket/front/descriptor/removeStowaway.html +++ /dev/null @@ -1,38 +0,0 @@ - - - -
Stowaways of the ticket {{$ctrl.ticket.id}}
-
- - - - - Ticket id - Shipped - Agency - Warehouse - State - - - - - {{stowaway.id}} - {{stowaway.ticket.landed | date: 'dd/MM/yyyy'}} - {{stowaway.ticket.agencyMode.name}} - {{stowaway.ticket.warehouse.name}} - {{stowaway.ticket.state.state.name}} - - - - -
-
- - - \ No newline at end of file diff --git a/modules/ticket/front/descriptor/removeStowaway.js b/modules/ticket/front/descriptor/removeStowaway.js deleted file mode 100644 index 05ace7d9e..000000000 --- a/modules/ticket/front/descriptor/removeStowaway.js +++ /dev/null @@ -1,78 +0,0 @@ -import ngModule from '../module'; - -class Controller { - constructor($state, $scope, $http, vnApp, $translate) { - this.vnApp = vnApp; - this.$translate = $translate; - this.$scope = $scope; - this.$state = $state; - this.$http = $http; - } - - getTicketStowaways() { - if (this.ticket.stowaway) { - this.ticketStowaways = [this.ticket.stowaway]; - this.showDeleteConfirm(0); - } else if (this.ticket.ship.length > 1) { - let filter = { - where: {shipFk: this.ticket.id}, - include: { - relation: 'ticket', - scope: { - include: [ - {relation: 'agencyMode'}, - {relation: 'warehouse'}, - {relation: 'state', - scope: { - fields: ['stateFk'], - include: { - relation: 'state' - } - }, - }, - ] - } - } - }; - - let json = encodeURIComponent(JSON.stringify(filter)); - this.$http.get(`Stowaways?filter=${json}`).then(res => { - this.ticketStowaways = res.data; - this.$scope.dialog.show(); - }); - } - } - - deleteStowaway(response) { - if (response === 'accept') { - this.$http.delete(`Stowaways/${this.stowawayToDelete.id}`).then(res => { - this.cardReload(); - this.vnApp.showSuccess(this.$translate.instant('Data saved!')); - }); - } - } - - showDeleteConfirm(index) { - this.stowawayToDelete = this.ticketStowaways[index]; - this.$scope.confirmationDialog.show(); - } - - show() { - this.getTicketStowaways(); - } - - hide() { - this.$scope.dialog.hide(); - } -} - -Controller.$inject = ['$state', '$scope', '$http', 'vnApp', '$translate']; - -ngModule.component('vnRemoveStowaway', { - template: require('./removeStowaway.html'), - controller: Controller, - bindings: { - ticket: '<', - cardReload: '&?' - } -}); diff --git a/modules/ticket/front/descriptor/style.scss b/modules/ticket/front/descriptor/style.scss index e0abcbc50..4becf9789 100644 --- a/modules/ticket/front/descriptor/style.scss +++ b/modules/ticket/front/descriptor/style.scss @@ -1,6 +1,6 @@ @import "variables"; -vn-add-stowaway { +.add-stowaway { vn-data-viewer { width: 40em } diff --git a/modules/ticket/front/index.js b/modules/ticket/front/index.js index f8433b5fe..58ee9136e 100644 --- a/modules/ticket/front/index.js +++ b/modules/ticket/front/index.js @@ -6,7 +6,6 @@ import './search-panel'; import './card'; import './descriptor'; import './descriptor/addStowaway'; -import './descriptor/removeStowaway'; import './descriptor-popover'; import './create/card'; import './create/index'; diff --git a/modules/ticket/front/locale/es.yml b/modules/ticket/front/locale/es.yml index 2b7f75c0c..b26a6d6fa 100644 --- a/modules/ticket/front/locale/es.yml +++ b/modules/ticket/front/locale/es.yml @@ -14,8 +14,8 @@ Counter: Contador Created : Añadido Date : Fecha Delay: Retraso -Delete: Borrar -Delete expedition: Borrar expedición +Delete: Eliminar +Delete expedition: Eliminar expedición Description: Descripción Discount: Descuento Employee : Empleado @@ -42,7 +42,7 @@ PPU: Ud. Price: Precio Price gap: Diferencia de precio Quantity: Cantidad -Remove lines: Borrar lineas +Remove lines: Eliminar lineas Route: Ruta SET OK: PONER OK Shipment: Salida diff --git a/modules/ticket/front/sale/locale/es.yml b/modules/ticket/front/sale/locale/es.yml index f381eb6e6..3ccdd528e 100644 --- a/modules/ticket/front/sale/locale/es.yml +++ b/modules/ticket/front/sale/locale/es.yml @@ -1,7 +1,7 @@ New price: Nuevo precio Add item: Añadir artículo Add turn: Añadir a turno -Delete ticket: Borrar ticket +Delete ticket: Eliminar ticket Mark as reserved: Marcar como reservado Unmark as reserved: Desmarcar como reservado Update discount: Actualizar descuento @@ -10,7 +10,7 @@ Edit discount: Editar descuento Transfer to ticket: Transferir a ticket New ticket: Nuevo ticket Edit price: Editar precio -You are going to delete lines of the ticket: Vas a borrar lineas del ticket +You are going to delete lines of the ticket: Vas a eliminar lineas del ticket This ticket will be removed from current route! Continue anyway?: ¡Se eliminará el ticket de la ruta actual! ¿Continuar de todas formas? You have to allow pop-ups in your web browser to use this functionality: Debes permitir los pop-pups en tu navegador para que esta herramienta funcione correctamente @@ -29,5 +29,5 @@ SMSAvailability: >- {{notAvailables}} no disponible/s. Disculpe las molestias. Continue anyway?: ¿Continuar de todas formas? This ticket is now empty: El ticket ha quedado vacio -Do you want to delete it?: ¿Quieres borrarlo? +Do you want to delete it?: ¿Quieres eliminarlo? Recalculate price: Recalcular precio \ No newline at end of file diff --git a/modules/worker/front/time-control/locale/es.yml b/modules/worker/front/time-control/locale/es.yml index 2f92657dd..1d28b0e2b 100644 --- a/modules/worker/front/time-control/locale/es.yml +++ b/modules/worker/front/time-control/locale/es.yml @@ -5,7 +5,7 @@ Hours: Horas Add time: Añadir hora Week total: Total semana Current week: Semana actual -This time entry will be deleted: Se borrará la hora fichada +This time entry will be deleted: Se eliminará la hora fichada Are you sure you want to delete this entry?: ¿Seguro que quieres eliminarla? Finish at: Termina a las Entry removed: Fichada borrada \ No newline at end of file From 9d487f3ceecf4579161a08f4bd392a55aacd8e7d Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 17 Dec 2019 13:25:30 +0100 Subject: [PATCH 2/2] updated translation --- modules/ticket/front/descriptor/index.js | 2 +- modules/ticket/front/descriptor/locale/es.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ticket/front/descriptor/index.js b/modules/ticket/front/descriptor/index.js index addcd825e..ef64bf84e 100644 --- a/modules/ticket/front/descriptor/index.js +++ b/modules/ticket/front/descriptor/index.js @@ -19,7 +19,7 @@ class Controller extends Component { show: () => this.canShowStowaway }, { - name: 'Remove stowaway', + name: 'Delete stowaway', callback: this.showDeleteStowaway, show: () => this.shouldShowDeleteStowaway() }, diff --git a/modules/ticket/front/descriptor/locale/es.yml b/modules/ticket/front/descriptor/locale/es.yml index 68512fec2..947377e19 100644 --- a/modules/ticket/front/descriptor/locale/es.yml +++ b/modules/ticket/front/descriptor/locale/es.yml @@ -5,7 +5,7 @@ Ship stowaways: Polizones del barco Stowaways to add: Polizones a añadir Stowaways of the ticket: Polizones del ticket Add stowaway: Añadir polizón -Remove stowaway: Eliminar polizón +Delete stowaway: Eliminar polizón Are you sure you want to delete this stowaway?: ¿Seguro que quieres eliminar este polizón? Are you sure you want to send it?: ¿Seguro que quieres enviarlo? Show Delivery Note: Ver albarán