From 8adc104cf473892b5c1292a8985c8ed2f6cc4b71 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 26 May 2023 08:39:58 +0200 Subject: [PATCH 1/6] refs #5735 fix currency --- modules/client/front/credit-management/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/client/front/credit-management/index.html b/modules/client/front/credit-management/index.html index d7456fd06..b9064ff69 100644 --- a/modules/client/front/credit-management/index.html +++ b/modules/client/front/credit-management/index.html @@ -68,7 +68,7 @@ {{::clientInforma.rating}} - {{::clientInforma.recommendedCredit}} + {{::clientInforma.recommendedCredit | currency: 'EUR': 2}} From bdffc0401fd98a4ff2b410f97c0509269a557151 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 8 Jun 2023 15:29:03 +0200 Subject: [PATCH 2/6] refs #5760 update getChanges, traduccion --- .eslintrc.yml | 4 ++-- .../ticket/back/methods/ticket-log/getChanges.js | 16 ++++++++-------- modules/ticket/front/descriptor/locale/es.yml | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 13fc2b140..ee20324ff 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -1,6 +1,6 @@ extends: [eslint:recommended, google, plugin:jasmine/recommended] parserOptions: - ecmaVersion: 2018 + ecmaVersion: 2020 sourceType: "module" plugins: - jasmine @@ -35,4 +35,4 @@ rules: space-in-parens: ["error", "never"] jasmine/no-focused-tests: 0 jasmine/prefer-toHaveBeenCalledWith: 0 - arrow-spacing: ["error", { "before": true, "after": true }] \ No newline at end of file + arrow-spacing: ["error", { "before": true, "after": true }] diff --git a/modules/ticket/back/methods/ticket-log/getChanges.js b/modules/ticket/back/methods/ticket-log/getChanges.js index 7a6de49e8..1b74ec1d7 100644 --- a/modules/ticket/back/methods/ticket-log/getChanges.js +++ b/modules/ticket/back/methods/ticket-log/getChanges.js @@ -61,15 +61,15 @@ module.exports = Self => { const oldQuantity = log.oldInstance.quantity; const newQuantity = log.newInstance?.quantity || 0; - if (oldQuantity || newQuantity) { - const changeMessage = $t('Change quantity', { - concept: log.changedModelValue, - oldQuantity: oldQuantity || 0, - newQuantity: newQuantity || 0, - }); - changes.push(changeMessage); + if (oldQuantity > newQuantity) { + const changeMessage = $t('Change quantity', { + concept: log.changedModelValue, + oldQuantity: oldQuantity || 0, + newQuantity: newQuantity || 0, + }); + changes.push(changeMessage); } - } + } return changes.join('\n'); }; diff --git a/modules/ticket/front/descriptor/locale/es.yml b/modules/ticket/front/descriptor/locale/es.yml index d921b5dc2..3da013467 100644 --- a/modules/ticket/front/descriptor/locale/es.yml +++ b/modules/ticket/front/descriptor/locale/es.yml @@ -23,4 +23,4 @@ Restore ticket: Restaurar ticket You are going to restore this ticket: Vas a restaurar este ticket Are you sure you want to restore this ticket?: ¿Seguro que quieres restaurar el ticket? Are you sure you want to refund all?: ¿Seguro que quieres abonar todo? -Send changes: "Verdnatura le recuerda:\rPedido {{ticketId}} día {{created | date: 'dd/MM/yyyy'}}\r{{changes}}" +Send changes: "Verdnatura:\rPedido {{ticketId}}\r{{changes}}" From ec9dfa90fd0b8061f6812ff4b4f87fde7f7f7510 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 9 Jun 2023 08:06:45 +0200 Subject: [PATCH 3/6] refs #5760 fixtures --- db/dump/fixtures.sql | 7 ++++--- .../back/methods/ticket-log/specs/getChanges.spec.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 3476bfe48..88b837247 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -2781,12 +2781,14 @@ UPDATE `account`.`user` SET `hasGrant` = 1 WHERE `id` = 66; -INSERT INTO `vn`.`ticketLog` (`originFk`, userFk, `action`, changedModel, oldInstance, newInstance, changedModelId, `description`) +INSERT INTO `vn`.`ticketLog` (originFk, userFk, `action`, `changedModel`, `oldInstance`, `newInstance`, changedModelId, `description`) VALUES (7, 18, 'update', 'Sale', '{"quantity":1}', '{"quantity":10}', 1, NULL), (7, 18, 'update', 'Ticket', '{"quantity":1,"concept":"Chest ammo box"}', '{"quantity":10,"concept":"Chest ammo box"}', 1, NULL), (7, 18, 'update', 'Sale', '{"price":3}', '{"price":5}', 1, NULL), - (7, 18, 'update', NULL, NULL, NULL, NULL, "Cambio cantidad Melee weapon heavy shield 1x0.5m de '5' a '10'"); + (7, 18, 'update', NULL, NULL, NULL, NULL, "Cambio cantidad Melee weapon heavy shield 1x0.5m de '5' a '10'"), + (16, 9, 'update', 'Sale', '{"quantity":10,"concept":"Shield", "price": 10.5, "itemFk": 1}', '{"quantity":8,"concept":"Shield", "price": 10.5, "itemFk": 1}' , 5689, 'Shield'); + INSERT INTO `vn`.`ticketLog` (originFk, userFk, `action`, creationDate, changedModel, changedModelId, changedModelValue, oldInstance, newInstance, description) VALUES @@ -2800,7 +2802,6 @@ INSERT INTO `vn`.`ticketLog` (originFk, userFk, `action`, creationDate, changedM (1, 18, 'select', '2000-12-27 03:40:30', 'Ticket', 45, NULL , NULL, NULL, NULL), (1, 18, 'insert', '2000-04-10 09:40:15', 'Sale', 5689, 'Shield' , NULL, '{"quantity":10,"concept":"Shield", "price": 10.5, "itemFk": 1}', NULL), (1, 18, 'insert', '1999-05-09 10:00:00', 'Ticket', 45, 'Super Man' , NULL, '{"id":45,"clientFk":8608,"warehouseFk":60,"shipped":"2023-05-16T22:00:00.000Z","nickname":"Super Man","addressFk":48637,"isSigned":true,"isLabeled":true,"isPrinted":true,"packages":0,"hour":0,"created":"2023-05-16T11:42:56.000Z","isBlocked":false,"hasPriority":false,"companyFk":442,"agencyModeFk":639,"landed":"2023-05-17T22:00:00.000Z","isBoxed":true,"isDeleted":true,"zoneFk":713,"zonePrice":13,"zoneBonus":0}', NULL); - INSERT INTO `vn`.`osTicketConfig` (`id`, `host`, `user`, `password`, `oldStatus`, `newStatusId`, `day`, `comment`, `hostDb`, `userDb`, `passwordDb`, `portDb`, `responseType`, `fromEmailId`, `replyTo`) VALUES (0, 'http://localhost:56596/scp', 'ostadmin', 'Admin1', '1,6', 3, 60, 'Este CAU se ha cerrado automáticamente. Si el problema persiste responda a este mensaje.', 'localhost', 'osticket', 'osticket', 40003, 'reply', 1, 'all'); diff --git a/modules/ticket/back/methods/ticket-log/specs/getChanges.spec.js b/modules/ticket/back/methods/ticket-log/specs/getChanges.spec.js index c0f7dde0e..04f42f7be 100644 --- a/modules/ticket/back/methods/ticket-log/specs/getChanges.spec.js +++ b/modules/ticket/back/methods/ticket-log/specs/getChanges.spec.js @@ -7,7 +7,7 @@ describe('ticketLog getChanges()', () => { return value; }; it('should return the changes in the sales of a ticket', async() => { - const ticketId = 7; + const ticketId = 16; const changues = await models.TicketLog.getChanges(ctx, ticketId); From c66feb53f0aab7dcaf95fab743b39b8a31b74ae2 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 9 Jun 2023 08:29:18 +0200 Subject: [PATCH 4/6] refs #5760 fix fixtures --- db/dump/fixtures.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 88b837247..4441ec19c 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -2781,7 +2781,7 @@ UPDATE `account`.`user` SET `hasGrant` = 1 WHERE `id` = 66; -INSERT INTO `vn`.`ticketLog` (originFk, userFk, `action`, `changedModel`, `oldInstance`, `newInstance`, changedModelId, `description`) +INSERT INTO `vn`.`ticketLog` (`originFk`, userFk, `action`, changedModel, oldInstance, newInstance, changedModelId, `description`) VALUES (7, 18, 'update', 'Sale', '{"quantity":1}', '{"quantity":10}', 1, NULL), (7, 18, 'update', 'Ticket', '{"quantity":1,"concept":"Chest ammo box"}', '{"quantity":10,"concept":"Chest ammo box"}', 1, NULL), From 0fb114b06dcf5a10486990d51de6a128d2f32f40 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 9 Jun 2023 21:45:36 +0200 Subject: [PATCH 5/6] refs #5667 Search & entity filters moved to top --- front/salix/components/log/index.html | 38 +++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/front/salix/components/log/index.html b/front/salix/components/log/index.html index f68919f00..8b33c811b 100644 --- a/front/salix/components/log/index.html +++ b/front/salix/components/log/index.html @@ -110,6 +110,25 @@
+ + + + + + + + - - - - - - - - From decc5e471f00c584cfbcf86adf92b376dcc8b572 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 9 Jun 2023 21:57:47 +0200 Subject: [PATCH 6/6] refs #5667 Changes added to changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f2c0e6e5..d4717b711 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,9 +10,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - (Tickets -> Abono) Al abonar permite crear el ticket abono con almacén o sin almmacén - (General -> Desplegables) Mejorada eficiencia de carga de datos +- (General -> Históricos) Ahora, ademas de los ids, se muestra la descripión de los atributos +- (General -> Históricos) Botón para hacer más ágil mostrar sólo los cambios en un registro +- (General -> Históricos) Filtro por cambios ### Changed - (General -> Permisos) Mejorada seguridad +- (General -> Históricos) Elementos de la interfaz reorganizados para hacerla más ágil e intuitiva ### Fixed -