fix: no recarga cada vez
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Vicent Llopis 2023-02-06 12:24:26 +01:00
parent ba5616055b
commit 4f76465246
4 changed files with 8 additions and 11 deletions

View File

@ -2718,9 +2718,9 @@ INSERT INTO `vn`.`collection` (`id`, `created`, `workerFk`, `stateFk`, `itemPack
VALUES VALUES
(3, util.VN_NOW(), 1107, 5, NULL, 0, 0, 1, NULL, NULL); (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 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`) INSERT INTO `vn`.`ticketCollection` (`ticketFk`, `collectionFk`, `created`, `level`, `wagon`, `smartTagFk`, `usedShelves`, `itemCount`, `liters`)
VALUES VALUES

View File

@ -1,6 +1,6 @@
<vn-portal slot="menu"> <vn-portal slot="menu">
<vn-item-descriptor <vn-item-descriptor
warehouse-fk="$ctrl.warehouseFk" warehouse-fk="$ctrl.getWarehouseFk()"
item="$ctrl.item" item="$ctrl.item"
card-reload="$ctrl.reload()"></vn-item-descriptor> card-reload="$ctrl.reload()"></vn-item-descriptor>
<vn-left-menu source="card"></vn-left-menu> <vn-left-menu source="card"></vn-left-menu>

View File

@ -3,21 +3,18 @@ import ModuleCard from 'salix/components/module-card';
class Controller extends ModuleCard { class Controller extends ModuleCard {
getWarehouseFk() { getWarehouseFk() {
if (this.$state.getCurrentPath()[4].state.name === 'item.card.diary') { if (this.$state.getCurrentPath()[4].state.name === 'item.card.diary')
this.warehouseFk = this.$params.warehouseFk; return this.$params.warehouseFk;
return;
}
this.$http.get('ItemConfigs/findOne') this.$http.get('ItemConfigs/findOne')
.then(res => { .then(res => {
this.warehouseFk = res.data.warehouseFk; return res.data.warehouseFk;
}); });
} }
reload() { reload() {
this.$http.get(`Items/${this.$params.id}/getCard`) this.$http.get(`Items/${this.$params.id}/getCard`)
.then(res => this.item = res.data); .then(res => this.item = res.data);
this.getWarehouseFk();
} }
} }

View File

@ -100,6 +100,6 @@ ngModule.vnComponent('vnItemDescriptor', {
item: '<', item: '<',
dated: '<', dated: '<',
cardReload: '&', cardReload: '&',
warehouseFk: '<?' warehouseFk: '<'
} }
}); });