diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index bb4f00ff5..e03619aae 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -2718,9 +2718,9 @@ INSERT INTO `vn`.`collection` (`id`, `created`, `workerFk`, `stateFk`, `itemPack VALUES (3, util.VN_NOW(), 1107, 5, NULL, 0, 0, 1, NULL, NULL); -INSERT INTO `vn`.`itemConfig` (`id`, `isItemTagTriggerDisabled`, `monthToDeactivate`, `wasteRecipients`, `validPriorities`, `defaultPriority`, `defaultTag`) +INSERT INTO `vn`.`itemConfig` (`id`, `isItemTagTriggerDisabled`, `monthToDeactivate`, `wasteRecipients`, `validPriorities`, `defaultPriority`, `defaultTag`, `warehouseFk`) VALUES - (0, 0, 24, '', '[1,2,3]', 2, 56); + (0, 0, 24, '', '[1,2,3]', 2, 56, 60); INSERT INTO `vn`.`ticketCollection` (`ticketFk`, `collectionFk`, `created`, `level`, `wagon`, `smartTagFk`, `usedShelves`, `itemCount`, `liters`) VALUES diff --git a/modules/item/front/card/index.html b/modules/item/front/card/index.html index 330d274c0..f141649eb 100644 --- a/modules/item/front/card/index.html +++ b/modules/item/front/card/index.html @@ -1,6 +1,6 @@ diff --git a/modules/item/front/card/index.js b/modules/item/front/card/index.js index ba9e18c0b..8ff9e2da6 100644 --- a/modules/item/front/card/index.js +++ b/modules/item/front/card/index.js @@ -3,21 +3,18 @@ import ModuleCard from 'salix/components/module-card'; class Controller extends ModuleCard { getWarehouseFk() { - if (this.$state.getCurrentPath()[4].state.name === 'item.card.diary') { - this.warehouseFk = this.$params.warehouseFk; - return; - } + if (this.$state.getCurrentPath()[4].state.name === 'item.card.diary') + return this.$params.warehouseFk; + this.$http.get('ItemConfigs/findOne') .then(res => { - this.warehouseFk = res.data.warehouseFk; + return res.data.warehouseFk; }); } reload() { this.$http.get(`Items/${this.$params.id}/getCard`) .then(res => this.item = res.data); - - this.getWarehouseFk(); } } diff --git a/modules/item/front/descriptor/index.js b/modules/item/front/descriptor/index.js index 133b11b48..61c8e7464 100644 --- a/modules/item/front/descriptor/index.js +++ b/modules/item/front/descriptor/index.js @@ -100,6 +100,6 @@ ngModule.vnComponent('vnItemDescriptor', { item: '<', dated: '<', cardReload: '&', - warehouseFk: '