From 14a72b32bda87e1c92f0f44aa6a3a1e0fffee2a9 Mon Sep 17 00:00:00 2001 From: carlosjr Date: Thu, 21 Oct 2021 11:37:09 +0200 Subject: [PATCH 1/2] refactor(itemMaxSize): added itemMaxSize column and used it instead of m3Max --- db/dump/fixtures.sql | 28 ++++++++++++------------ e2e/helpers/selectors.js | 2 +- e2e/paths/11-zone/01_basic-data.spec.js | 1 + modules/zone/back/models/zone.json | 3 +++ modules/zone/front/basic-data/index.html | 2 +- 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index f06916fd3..102a3eea4 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -533,21 +533,21 @@ INSERT INTO `vn`.`invoiceOutExpence`(`id`, `invoiceOutFk`, `amount`, `expenceFk` (6, 4, 8.07, 2000000000, CURDATE()), (7, 5, 8.07, 2000000000, CURDATE()); -INSERT INTO `vn`.`zone` (`id`, `name`, `hour`, `agencyModeFk`, `travelingDays`, `price`, `bonus`, `m3Max`) +INSERT INTO `vn`.`zone` (`id`, `name`, `hour`, `agencyModeFk`, `travelingDays`, `price`, `bonus`, `m3Max`, `itemMaxSize`) VALUES - (1, 'Zone pickup A', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 1, 0, 0, 0, 30.50), - (2, 'Zone pickup B', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 1, 0, 0, 0, 30.50), - (3, 'Zone 247 A', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 7, 1, 2, 0, 40.50), - (4, 'Zone 247 B', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 7, 1, 2, 0, 40.50), - (5, 'Zone expensive A', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 8, 1, 1000, 0, 50.50), - (6, 'Zone expensive B', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 8, 1, 1000, 0, 50.50), - (7, 'Zone refund', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 23, 0, 0, 0, 60.50), - (8, 'Zone others', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 10, 0, 0, 0, 60.50), - (9, 'Zone superMan', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 2, 0, 0, 0, NULL), - (10, 'Zone teleportation', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 3, 0, 0, 0, NULL), - (11, 'Zone pickup C', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 1, 0, 0, 0, NULL), - (12, 'Zone entanglement', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 4, 0, 0, 0, NULL), - (13, 'Zone quantum break', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 5, 0, 0, 0, NULL); + (1, 'Zone pickup A', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 1, 0, 0, 0, 30.50, 100), + (2, 'Zone pickup B', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 1, 0, 0, 0, 30.50, 100), + (3, 'Zone 247 A', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 7, 1, 2, 0, 40.50, 100), + (4, 'Zone 247 B', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 7, 1, 2, 0, 40.50, 100), + (5, 'Zone expensive A', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 8, 1, 1000, 0, 50.50, 100), + (6, 'Zone expensive B', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 8, 1, 1000, 0, 50.50, 100), + (7, 'Zone refund', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 23, 0, 0, 0, 60.50, 100), + (8, 'Zone others', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 10, 0, 0, 0, 60.50, 100), + (9, 'Zone superMan', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 2, 0, 0, 0, NULL, 100), + (10, 'Zone teleportation', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 3, 0, 0, 0, NULL, 100), + (11, 'Zone pickup C', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 1, 0, 0, 0, NULL, 100), + (12, 'Zone entanglement', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 4, 0, 0, 0, NULL, 100), + (13, 'Zone quantum break', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 5, 0, 0, 0, NULL, 100); INSERT INTO `vn`.`zoneWarehouse` (`id`, `zoneFk`, `warehouseFk`) VALUES diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 52c89743d..4b5629c3c 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -1039,7 +1039,7 @@ export default { zoneBasicData: { name: 'vn-zone-basic-data vn-textfield[ng-model="$ctrl.zone.name"]', agency: 'vn-zone-basic-data vn-autocomplete[ng-model="$ctrl.zone.agencyModeFk"]', - maxVolume: 'vn-zone-basic-data vn-input-number[ng-model="$ctrl.zone.m3Max"]', + maxVolume: 'vn-zone-basic-data vn-input-number[ng-model="$ctrl.zone.itemMaxSize"]', travelingDays: 'vn-zone-basic-data vn-input-number[ng-model="$ctrl.zone.travelingDays"]', closing: 'vn-zone-basic-data vn-input-time[ng-model="$ctrl.zone.hour"]', price: 'vn-zone-basic-data vn-input-number[ng-model="$ctrl.zone.price"]', diff --git a/e2e/paths/11-zone/01_basic-data.spec.js b/e2e/paths/11-zone/01_basic-data.spec.js index fe3a1ea9c..ded40579d 100644 --- a/e2e/paths/11-zone/01_basic-data.spec.js +++ b/e2e/paths/11-zone/01_basic-data.spec.js @@ -25,6 +25,7 @@ describe('Zone basic data path', () => { await page.clearInput(selectors.zoneBasicData.name); await page.write(selectors.zoneBasicData.name, 'Brimstone teleportation'); await page.autocompleteSearch(selectors.zoneBasicData.agency, 'Quantum break device'); + await page.clearInput(selectors.zoneBasicData.maxVolume); await page.write(selectors.zoneBasicData.maxVolume, '10'); await page.clearInput(selectors.zoneBasicData.travelingDays); await page.write(selectors.zoneBasicData.travelingDays, '1'); diff --git a/modules/zone/back/models/zone.json b/modules/zone/back/models/zone.json index 403a35359..96fc8bb29 100644 --- a/modules/zone/back/models/zone.json +++ b/modules/zone/back/models/zone.json @@ -40,6 +40,9 @@ }, "m3Max": { "type": "Number" + }, + "itemMaxSize": { + "type": "Number" } }, "relations": { diff --git a/modules/zone/front/basic-data/index.html b/modules/zone/front/basic-data/index.html index c5fef9021..eb701a803 100644 --- a/modules/zone/front/basic-data/index.html +++ b/modules/zone/front/basic-data/index.html @@ -32,7 +32,7 @@ Date: Thu, 21 Oct 2021 13:19:41 +0200 Subject: [PATCH 2/2] refactor(zone): removed deprecated column m3Max --- db/dump/fixtures.sql | 28 ++++++++++++++-------------- modules/zone/back/models/zone.json | 3 --- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 102a3eea4..4c82be909 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -533,21 +533,21 @@ INSERT INTO `vn`.`invoiceOutExpence`(`id`, `invoiceOutFk`, `amount`, `expenceFk` (6, 4, 8.07, 2000000000, CURDATE()), (7, 5, 8.07, 2000000000, CURDATE()); -INSERT INTO `vn`.`zone` (`id`, `name`, `hour`, `agencyModeFk`, `travelingDays`, `price`, `bonus`, `m3Max`, `itemMaxSize`) +INSERT INTO `vn`.`zone` (`id`, `name`, `hour`, `agencyModeFk`, `travelingDays`, `price`, `bonus`, `itemMaxSize`) VALUES - (1, 'Zone pickup A', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 1, 0, 0, 0, 30.50, 100), - (2, 'Zone pickup B', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 1, 0, 0, 0, 30.50, 100), - (3, 'Zone 247 A', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 7, 1, 2, 0, 40.50, 100), - (4, 'Zone 247 B', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 7, 1, 2, 0, 40.50, 100), - (5, 'Zone expensive A', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 8, 1, 1000, 0, 50.50, 100), - (6, 'Zone expensive B', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 8, 1, 1000, 0, 50.50, 100), - (7, 'Zone refund', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 23, 0, 0, 0, 60.50, 100), - (8, 'Zone others', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 10, 0, 0, 0, 60.50, 100), - (9, 'Zone superMan', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 2, 0, 0, 0, NULL, 100), - (10, 'Zone teleportation', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 3, 0, 0, 0, NULL, 100), - (11, 'Zone pickup C', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 1, 0, 0, 0, NULL, 100), - (12, 'Zone entanglement', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 4, 0, 0, 0, NULL, 100), - (13, 'Zone quantum break', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 5, 0, 0, 0, NULL, 100); + (1, 'Zone pickup A', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 1, 0, 0, 0, 100), + (2, 'Zone pickup B', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 1, 0, 0, 0, 100), + (3, 'Zone 247 A', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 7, 1, 2, 0, 100), + (4, 'Zone 247 B', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 7, 1, 2, 0, 100), + (5, 'Zone expensive A', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 8, 1, 1000, 0, 100), + (6, 'Zone expensive B', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 8, 1, 1000, 0, 100), + (7, 'Zone refund', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 23, 0, 0, 0, 100), + (8, 'Zone others', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 10, 0, 0, 0, 100), + (9, 'Zone superMan', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 2, 0, 0, 0, 100), + (10, 'Zone teleportation', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 3, 0, 0, 0, 100), + (11, 'Zone pickup C', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 1, 0, 0, 0, 100), + (12, 'Zone entanglement', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 4, 0, 0, 0, 100), + (13, 'Zone quantum break', CONCAT(CURRENT_DATE(), ' ', TIME('23:59')), 5, 0, 0, 0, 100); INSERT INTO `vn`.`zoneWarehouse` (`id`, `zoneFk`, `warehouseFk`) VALUES diff --git a/modules/zone/back/models/zone.json b/modules/zone/back/models/zone.json index 96fc8bb29..ad43bd6f6 100644 --- a/modules/zone/back/models/zone.json +++ b/modules/zone/back/models/zone.json @@ -38,9 +38,6 @@ "inflation": { "type": "Number" }, - "m3Max": { - "type": "Number" - }, "itemMaxSize": { "type": "Number" } -- 2.40.1