itemSummary
This commit is contained in:
parent
60e2d8132b
commit
7ab1a8852b
|
@ -2,9 +2,22 @@
|
|||
<vn-vertical pad-medium>
|
||||
<vn-horizontal>
|
||||
<vn-one margin-medium>
|
||||
<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-horizontal>
|
||||
<vn-one></vn-one>
|
||||
<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 margin-medium>
|
||||
<vn-vertical>
|
||||
|
@ -30,9 +43,9 @@
|
|||
<vn-one margin-medium>
|
||||
<vn-vertical>
|
||||
<h5 translate>Nicho</h5>
|
||||
<p><span translate>Name</span>: <b>{{::$ctrl.item.name}}</b></p>
|
||||
<p><span translate>Name</span>: <b>{{::$ctrl.item.name}}</b></p>
|
||||
<p><span translate>Name</span>: <b>{{::$ctrl.item.name}}</b></p>
|
||||
<p ng-repeat="niche in $ctrl.niches track by $index">
|
||||
<span>{{::niche.warehouse.name}}</span>: <b>{{::niche.code}}</b>
|
||||
</p>
|
||||
</vn-vertical>
|
||||
</vn-one>
|
||||
<vn-one margin-medium>
|
||||
|
@ -47,7 +60,7 @@
|
|||
<vn-vertical>
|
||||
<h5 translate>Barcode</h5>
|
||||
<p ng-repeat="barcode in $ctrl.barcodes track by $index">
|
||||
<b>{{::$ctrl.barcode.code}}</b>
|
||||
<b>{{::barcode.code}}</b>
|
||||
</p>
|
||||
</vn-vertical>
|
||||
</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() {
|
||||
let filter = {
|
||||
where: {
|
||||
|
@ -46,6 +57,8 @@ class ItemSummary {
|
|||
$onChanges() {
|
||||
if (this.item && this.item.id) {
|
||||
this._getTags();
|
||||
this._getBarcodes();
|
||||
this._getNiches();
|
||||
if (!this.item.botanical)
|
||||
this._getBotanical();
|
||||
}
|
||||
|
|
|
@ -4,6 +4,11 @@ vn-item-summary{
|
|||
h5 {
|
||||
border-bottom: 2px solid $color-orange;
|
||||
}
|
||||
h5.summaryId {
|
||||
border: none;
|
||||
background: $color-orange;
|
||||
color: $color-white;
|
||||
}
|
||||
p {
|
||||
margin: 0 0 5px 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue