-
{{$ctrl.item.itemType.worker.user.name}}
@@ -50,22 +60,22 @@
@@ -112,7 +122,7 @@
question="Do you want to clone this item?"
message="All it's properties will be copied">
-
@@ -120,7 +130,7 @@
-
-
\ No newline at end of file
+
diff --git a/modules/item/front/descriptor/index.js b/modules/item/front/descriptor/index.js
index 61c8e7464..0acc7c8f6 100644
--- a/modules/item/front/descriptor/index.js
+++ b/modules/item/front/descriptor/index.js
@@ -30,7 +30,10 @@ class Controller extends Descriptor {
set warehouseFk(value) {
this._warehouseFk = value;
- if (value) this.updateStock();
+ if (value) {
+ this.updateStock();
+ this.getWarehouseName(value);
+ }
}
loadData() {
@@ -89,6 +92,22 @@ class Controller extends Descriptor {
this.$.photo.setAttribute('src', newSrc);
this.$.photo.setAttribute('zoom-image', newZoomSrc);
}
+
+ getWarehouseName(warehouseFk) {
+ this.showIcon = false;
+
+ const filter = {
+ where: {id: warehouseFk}
+ };
+ this.$http.get('Warehouses/findOne', {filter})
+ .then(res => {
+ this.warehouseText = this.$t('WarehouseFk', {
+ warehouseName: res.data.name
+ });
+
+ this.showIcon = true;
+ });
+ }
}
Controller.$inject = ['$element', '$scope', '$rootScope'];
diff --git a/modules/item/front/diary/index.js b/modules/item/front/diary/index.js
index c997ea491..cc965a76e 100644
--- a/modules/item/front/diary/index.js
+++ b/modules/item/front/diary/index.js
@@ -37,6 +37,7 @@ class Controller extends Section {
set warehouseFk(value) {
if (value && value != this._warehouseFk) {
this._warehouseFk = value;
+ this.card.warehouseFk = value;
this.$state.go(this.$state.current.name, {
warehouseFk: value
@@ -76,5 +77,8 @@ ngModule.vnComponent('vnItemDiary', {
controller: Controller,
bindings: {
item: '<'
+ },
+ require: {
+ card: '?^vnItemCard'
}
});
diff --git a/modules/item/front/summary/index.html b/modules/item/front/summary/index.html
index cd4d69ca3..40e9c5aa7 100644
--- a/modules/item/front/summary/index.html
+++ b/modules/item/front/summary/index.html
@@ -20,17 +20,18 @@
Available
- {{$ctrl.summary.available}}
+
{{$ctrl.summary.available}}
+
+
+
-
+
diff --git a/modules/item/front/summary/index.js b/modules/item/front/summary/index.js
index 52753ff65..3d2517110 100644
--- a/modules/item/front/summary/index.js
+++ b/modules/item/front/summary/index.js
@@ -7,6 +7,24 @@ class Controller extends Summary {
this.$http.get(`Items/${this.item.id}/getSummary`).then(response => {
this.summary = response.data;
});
+
+ this.$http.get('ItemConfigs/findOne')
+ .then(res => {
+ this.card.warehouseFk = res.data.warehouseFk;
+ this.getWarehouseName(this.card.warehouseFk);
+ });
+ }
+
+ getWarehouseName(warehouseFk) {
+ const filter = {
+ where: {id: warehouseFk}
+ };
+ this.$http.get('Warehouses/findOne', {filter})
+ .then(res => {
+ this.warehouseText = this.$t('WarehouseFk', {
+ warehouseName: res.data.name
+ });
+ });
}
$onChanges() {
@@ -37,4 +55,7 @@ ngModule.vnComponent('vnItemSummary', {
bindings: {
item: '<',
},
+ require: {
+ card: '?^vnItemCard'
+ }
});
diff --git a/modules/item/front/summary/locale/en.yml b/modules/item/front/summary/locale/en.yml
index 79c19a94d..0ec208720 100644
--- a/modules/item/front/summary/locale/en.yml
+++ b/modules/item/front/summary/locale/en.yml
@@ -1,2 +1 @@
-WarehouseFk: >
- Calculated on the warehouse of {{ name }}
+WarehouseFk: Calculated on the warehouse of {{ warehouseName }}
diff --git a/modules/item/front/summary/locale/es.yml b/modules/item/front/summary/locale/es.yml
index 709d22efd..2e78841ae 100644
--- a/modules/item/front/summary/locale/es.yml
+++ b/modules/item/front/summary/locale/es.yml
@@ -1,5 +1,4 @@
Barcode: Códigos de barras
Other data: Otros datos
Go to the item: Ir al artículo
-WarehouseFk: >
- Calculado sobre el almacén de {{ name }}
+WarehouseFk: Calculado sobre el almacén de {{ warehouseName }}
diff --git a/modules/item/front/summary/style.scss b/modules/item/front/summary/style.scss
index 7d5e3b609..d047f3e36 100644
--- a/modules/item/front/summary/style.scss
+++ b/modules/item/front/summary/style.scss
@@ -29,7 +29,11 @@ vn-item-summary {
padding: 0;
&:nth-child(1) {
- border-right: 1px solid white;
+ border-right: 1px solid white;
+ }
+
+ &:nth-child(2) {
+ border-right: 1px solid white;
}
}
-}
\ No newline at end of file
+}