itemSummary
This commit is contained in:
parent
60e2d8132b
commit
7ab1a8852b
|
@ -2,9 +2,22 @@
|
||||||
<vn-vertical pad-medium>
|
<vn-vertical pad-medium>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-one margin-medium>
|
<vn-one margin-medium>
|
||||||
<img
|
<vn-horizontal>
|
||||||
ng-src="http://verdnatura.es/vn-image-data/catalog/200x200/{{$ctrl.item.image}}"
|
<vn-one></vn-one>
|
||||||
zoom-image="http://verdnatura.es/vn-image-data/catalog/900x900/{{$ctrl.item.image}}" on-error-src/>
|
<vn-auto>
|
||||||
|
<vn-vertical>
|
||||||
|
<vn-one>
|
||||||
|
<img
|
||||||
|
ng-src="http://verdnatura.es/vn-image-data/catalog/200x200/{{$ctrl.item.image}}"
|
||||||
|
zoom-image="http://verdnatura.es/vn-image-data/catalog/900x900/{{$ctrl.item.image}}" on-error-src/>
|
||||||
|
</vn-one>
|
||||||
|
<vn-one>
|
||||||
|
<h5 text-center pad-small-v class="summaryId">{{::$ctrl.item.id}}</h5>
|
||||||
|
</vn-one>
|
||||||
|
</vn-vertical>
|
||||||
|
</vn-auto>
|
||||||
|
<vn-one></vn-one>
|
||||||
|
</vn-horizontal>
|
||||||
</vn-one>
|
</vn-one>
|
||||||
<vn-one margin-medium>
|
<vn-one margin-medium>
|
||||||
<vn-vertical>
|
<vn-vertical>
|
||||||
|
@ -30,9 +43,9 @@
|
||||||
<vn-one margin-medium>
|
<vn-one margin-medium>
|
||||||
<vn-vertical>
|
<vn-vertical>
|
||||||
<h5 translate>Nicho</h5>
|
<h5 translate>Nicho</h5>
|
||||||
<p><span translate>Name</span>: <b>{{::$ctrl.item.name}}</b></p>
|
<p ng-repeat="niche in $ctrl.niches track by $index">
|
||||||
<p><span translate>Name</span>: <b>{{::$ctrl.item.name}}</b></p>
|
<span>{{::niche.warehouse.name}}</span>: <b>{{::niche.code}}</b>
|
||||||
<p><span translate>Name</span>: <b>{{::$ctrl.item.name}}</b></p>
|
</p>
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
</vn-one>
|
</vn-one>
|
||||||
<vn-one margin-medium>
|
<vn-one margin-medium>
|
||||||
|
@ -47,7 +60,7 @@
|
||||||
<vn-vertical>
|
<vn-vertical>
|
||||||
<h5 translate>Barcode</h5>
|
<h5 translate>Barcode</h5>
|
||||||
<p ng-repeat="barcode in $ctrl.barcodes track by $index">
|
<p ng-repeat="barcode in $ctrl.barcodes track by $index">
|
||||||
<b>{{::$ctrl.barcode.code}}</b>
|
<b>{{::barcode.code}}</b>
|
||||||
</p>
|
</p>
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
</vn-one>
|
</vn-one>
|
||||||
|
|
|
@ -31,6 +31,17 @@ class ItemSummary {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_getNiches() {
|
||||||
|
let filter = {
|
||||||
|
where: {itemFk: this.item.id},
|
||||||
|
include: {relation: 'warehouse'}
|
||||||
|
};
|
||||||
|
this.$http.get(`/item/api/ItemNiches?filter=${JSON.stringify(filter)}`).then(response => {
|
||||||
|
this.niches = response.data;
|
||||||
|
this.setOldNiches(response);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
_getBarcodes() {
|
_getBarcodes() {
|
||||||
let filter = {
|
let filter = {
|
||||||
where: {
|
where: {
|
||||||
|
@ -46,6 +57,8 @@ class ItemSummary {
|
||||||
$onChanges() {
|
$onChanges() {
|
||||||
if (this.item && this.item.id) {
|
if (this.item && this.item.id) {
|
||||||
this._getTags();
|
this._getTags();
|
||||||
|
this._getBarcodes();
|
||||||
|
this._getNiches();
|
||||||
if (!this.item.botanical)
|
if (!this.item.botanical)
|
||||||
this._getBotanical();
|
this._getBotanical();
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,11 @@ vn-item-summary{
|
||||||
h5 {
|
h5 {
|
||||||
border-bottom: 2px solid $color-orange;
|
border-bottom: 2px solid $color-orange;
|
||||||
}
|
}
|
||||||
|
h5.summaryId {
|
||||||
|
border: none;
|
||||||
|
background: $color-orange;
|
||||||
|
color: $color-white;
|
||||||
|
}
|
||||||
p {
|
p {
|
||||||
margin: 0 0 5px 0;
|
margin: 0 0 5px 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue