From d3852bac5d01a30625ed042c2c4c42292b73d90b Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 26 Jul 2022 11:45:12 +0200 Subject: [PATCH 1/6] fix(vnInputTime): quit new date(null) --- front/core/components/input-time/index.js | 9 ++++++--- modules/route/front/basic-data/index.html | 12 ++++++------ package.json | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/front/core/components/input-time/index.js b/front/core/components/input-time/index.js index d77ccbec2..0d01fbd32 100644 --- a/front/core/components/input-time/index.js +++ b/front/core/components/input-time/index.js @@ -23,12 +23,15 @@ export default class InputTime extends Field { let date = null; let value = this.input.value; + if (this.field && !this.modelDate) + this.modelDate = this.field; + if (value) { let split = value.split(':').map(i => parseInt(i) || null); - date = this.field instanceof Date - ? this.field - : new Date(this.field || null); + date = this.modelDate + ? new Date(this.modelDate) + : new Date(); date.setHours(split[0], split[1], 0, 0); } diff --git a/modules/route/front/basic-data/index.html b/modules/route/front/basic-data/index.html index d3ba25b11..737bbab13 100644 --- a/modules/route/front/basic-data/index.html +++ b/modules/route/front/basic-data/index.html @@ -21,7 +21,7 @@
{{name}} - {{nickname}}
- diff --git a/package.json b/package.json index 13a7096d6..82fc606d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-back", - "version": "8.6.0", + "version": "8.8.0", "author": "Verdnatura Levante SL", "description": "Salix backend", "license": "GPL-3.0", From 085a4537a8050ce5a9fb0ff7c4c58326016900fe Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 27 Jul 2022 11:16:33 +0200 Subject: [PATCH 2/6] jenkins try --- db/dump/structure.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/db/dump/structure.sql b/db/dump/structure.sql index 1f787f864..b9415f658 100644 --- a/db/dump/structure.sql +++ b/db/dump/structure.sql @@ -49732,6 +49732,7 @@ proc:BEGIN pb.m3 DESC LIMIT vMaxTicketPrinted; + -- Se seleccionan los primeros tickets, asignando colección para dejarlos bloqueados a otros sacadores. -- Se splitan los tickets preparables, para que solo tengan un tipo de empaquetado From 1e35663a96cb421b3fe6561aa76cda404cf3f4bb Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 27 Jul 2022 11:57:51 +0200 Subject: [PATCH 3/6] jenkins try --- db/dump/structure.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/db/dump/structure.sql b/db/dump/structure.sql index b900ce5c7..bb58c1955 100644 --- a/db/dump/structure.sql +++ b/db/dump/structure.sql @@ -49732,7 +49732,6 @@ proc:BEGIN pb.m3 DESC LIMIT vMaxTicketPrinted; - -- Se seleccionan los primeros tickets, asignando colección para dejarlos bloqueados a otros sacadores. -- Se splitan los tickets preparables, para que solo tengan un tipo de empaquetado From 5e40bb07499f70ba73ca4b0403488c70f24b59a6 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 27 Sep 2022 09:37:09 +0200 Subject: [PATCH 4/6] fix(puppeteer): update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d33b65f93..49496ec19 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "node-ssh": "^11.0.0", "object-diff": "0.0.4", "object.pick": "^1.3.0", - "puppeteer": "^7.1.0", + "puppeteer": "^18.0.5", "read-chunk": "^3.2.0", "require-yaml": "0.0.1", "sharp": "^0.27.1", From 2dd6de1d47703a80097b62f729c33162853afbfc Mon Sep 17 00:00:00 2001 From: Pau Navarro Date: Tue, 27 Sep 2022 13:46:23 +0200 Subject: [PATCH 5/6] Modified Fixtures, clone.js and the item model --- db/dump/fixtures.sql | 36 ++++++++++++------------- modules/item/back/methods/item/clone.js | 1 - modules/item/back/models/item.json | 3 +++ 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index f7f241bc3..1f66a53cf 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -862,25 +862,25 @@ INSERT INTO `vn`.`itemFamily`(`code`, `description`) ('VT', 'Sales'); INSERT INTO `vn`.`item`(`id`, `typeFk`, `size`, `inkFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `expenceFk`, - `comment`, `relevancy`, `image`, `subName`, `minPrice`, `stars`, `family`, `isFloramondo`, `genericFk`, `itemPackingTypeFk`, `hasMinPrice`, `packingShelve`) + `comment`, `relevancy`, `image`, `subName`, `minPrice`, `stars`, `family`, `isFloramondo`, `genericFk`, `itemPackingTypeFk`, `hasMinPrice`, `packingShelve`, `weightByPiece`) VALUES - (1, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '1', NULL, 0, 1, 'VT', 0, NULL, 'V', 0, 15), - (2, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '2', NULL, 0, 2, 'VT', 0, NULL, 'H', 0, 10), - (3, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '3', NULL, 0, 5, 'VT', 0, NULL, NULL, 0, 5), - (4, 1, 60, 'YEL', 1, 1, 'Increases block', 1, 05080000, 4751000000, NULL, 0, '4', NULL, 0, 3, 'VT', 0, NULL, NULL, 0, NULL), - (5, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '5', NULL, 0, 3, 'VT', 0, NULL, NULL, 0, NULL), - (6, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '6', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL), - (7, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '7', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL), - (8, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '8', NULL, 0, 5, 'VT', 0, NULL, NULL, 0, NULL), - (9, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '9', NULL, 0, 4, 'VT', 1, NULL, NULL, 0, NULL), - (10, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '10', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL), - (11, 1, 60, 'YEL', 1, 1, NULL, 1, 05080000, 4751000000, NULL, 0, '11', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL), - (12, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '12', NULL, 0, 3, 'VT', 0, NULL, NULL, 0, NULL), - (13, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '13', NULL, 1, 2, 'VT', 1, NULL, NULL, 1, NULL), - (14, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 4, 'VT', 1, NULL, NULL, 0, NULL), - (15, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 0, 'EMB', 0, NULL, NULL, 0, NULL), - (16, 6, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 0, 'EMB', 0, NULL, NULL, 0, NULL), - (71, 6, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 0, 'VT', 0, NULL, NULL, 0, NULL); + (1, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '1', NULL, 0, 1, 'VT', 0, NULL, 'V', 0, 15,3), + (2, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '2', NULL, 0, 2, 'VT', 0, NULL, 'H', 0, 10,2), + (3, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '3', NULL, 0, 5, 'VT', 0, NULL, NULL, 0, 5,5), + (4, 1, 60, 'YEL', 1, 1, 'Increases block', 1, 05080000, 4751000000, NULL, 0, '4', NULL, 0, 3, 'VT', 0, NULL, NULL, 0, NULL,NULL), + (5, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '5', NULL, 0, 3, 'VT', 0, NULL, NULL, 0, NULL,NULL), + (6, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '6', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL), + (7, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '7', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL), + (8, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '8', NULL, 0, 5, 'VT', 0, NULL, NULL, 0, NULL,NULL), + (9, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '9', NULL, 0, 4, 'VT', 1, NULL, NULL, 0, NULL,NULL), + (10, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '10', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL), + (11, 1, 60, 'YEL', 1, 1, NULL, 1, 05080000, 4751000000, NULL, 0, '11', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL), + (12, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '12', NULL, 0, 3, 'VT', 0, NULL, NULL, 0, NULL,NULL), + (13, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '13', NULL, 1, 2, 'VT', 1, NULL, NULL, 1, NULL,NULL), + (14, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 4, 'VT', 1, NULL, NULL, 0, NULL,NULL), + (15, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 0, 'EMB', 0, NULL, NULL, 0, NULL,NULL), + (16, 6, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 0, 'EMB', 0, NULL, NULL, 0, NULL,NULL), + (71, 6, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 0, 'VT', 0, NULL, NULL, 0, NULL,NULL); -- Update the taxClass after insert of the items UPDATE `vn`.`itemTaxCountry` SET `taxClassFk` = 2 diff --git a/modules/item/back/methods/item/clone.js b/modules/item/back/methods/item/clone.js index 3e6f3ab5a..6d07e83d3 100644 --- a/modules/item/back/methods/item/clone.js +++ b/modules/item/back/methods/item/clone.js @@ -42,7 +42,6 @@ module.exports = Self => { origin.itemTag = undefined; origin.description = undefined; - origin.image = undefined; origin.comment = undefined; origin.size = undefined; diff --git a/modules/item/back/models/item.json b/modules/item/back/models/item.json index 01b6ba093..a6328a456 100644 --- a/modules/item/back/models/item.json +++ b/modules/item/back/models/item.json @@ -143,6 +143,9 @@ }, "packingShelve": { "type": "number" + }, + "weightByPiece": { + "type": "number" } }, "relations": { From 901007d34b4b788d4ac017416b9b488b86e8cfc4 Mon Sep 17 00:00:00 2001 From: Pau Navarro Date: Tue, 27 Sep 2022 13:58:27 +0200 Subject: [PATCH 6/6] change test case to expect the image to be defined --- modules/item/back/methods/item/specs/clone.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/item/back/methods/item/specs/clone.spec.js b/modules/item/back/methods/item/specs/clone.spec.js index d376b9e5b..1f4a87ac1 100644 --- a/modules/item/back/methods/item/specs/clone.spec.js +++ b/modules/item/back/methods/item/specs/clone.spec.js @@ -21,7 +21,7 @@ describe('item clone()', () => { const result = await models.Item.clone(itemFk, options); expect(result.id).toEqual(nextItemId); - expect(result.image).toBeUndefined(); + expect(result.image).toBeDefined(); expect(result.itemTag).toBeUndefined(); expect(result.comment).toBeUndefined(); expect(result.description).toBeUndefined();