From 3dd870f7df7fe2903ebec4bb12c4958a36b2b689 Mon Sep 17 00:00:00 2001 From: vicent Date: Thu, 16 Feb 2023 09:44:20 +0100 Subject: [PATCH] fix: test e2e --- db/changes/230202/00-itemConfig.sql | 4 ---- db/changes/230601/00-itemConfig_warehouseFk.sql | 2 ++ modules/item/front/summary/index.js | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/db/changes/230202/00-itemConfig.sql b/db/changes/230202/00-itemConfig.sql index a793997d0..0b32d5de8 100644 --- a/db/changes/230202/00-itemConfig.sql +++ b/db/changes/230202/00-itemConfig.sql @@ -3,7 +3,3 @@ ALTER TABLE `vn`.`itemConfig` ADD CONSTRAINT itemConfig_FK FOREIGN KEY (defaultT ALTER TABLE `vn`.`itemConfig` ADD validPriorities varchar(50) DEFAULT '[1,2,3]' NOT NULL; ALTER TABLE `vn`.`itemConfig` ADD defaultPriority INT DEFAULT 2 NOT NULL; ALTER TABLE `vn`.`item` MODIFY COLUMN relevancy tinyint(1) DEFAULT 0 NOT NULL COMMENT 'La web ordena de forma descendiente por este campo para mostrar los artículos'; - -INSERT INTO `salix`.`ACL` -(model, property, accessType, permission, principalType, principalId) -VALUES('ItemConfig', '*', 'READ', 'ALLOW', 'ROLE', 'buyer'); diff --git a/db/changes/230601/00-itemConfig_warehouseFk.sql b/db/changes/230601/00-itemConfig_warehouseFk.sql index b2e11146d..37631964a 100644 --- a/db/changes/230601/00-itemConfig_warehouseFk.sql +++ b/db/changes/230601/00-itemConfig_warehouseFk.sql @@ -1 +1,3 @@ ALTER TABLE `vn`.`itemConfig` ADD warehouseFk smallint(6) unsigned NULL; +INSERT INTO `salix`.`ACL` (model, property, accessType, permission, principalType, principalId) + VALUES('ItemConfig', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); diff --git a/modules/item/front/summary/index.js b/modules/item/front/summary/index.js index 3d2517110..e17a6a8c4 100644 --- a/modules/item/front/summary/index.js +++ b/modules/item/front/summary/index.js @@ -10,8 +10,8 @@ class Controller extends Summary { this.$http.get('ItemConfigs/findOne') .then(res => { - this.card.warehouseFk = res.data.warehouseFk; - this.getWarehouseName(this.card.warehouseFk); + if (this.card) this.card.warehouseFk = res.data.warehouseFk; + this.getWarehouseName(res.data.warehouseFk); }); }