Merge branch 'dev' of http://git.verdnatura.es/salix into dev

This commit is contained in:
Carlos Jimenez 2018-10-25 14:09:40 +02:00
commit faa7ca154a
2 changed files with 27 additions and 26 deletions

View File

@ -8,17 +8,17 @@
</vn-one>
<vn-one>
<img
ng-src="//verdnatura.es/vn-image-data/catalog/200x200/{{::$ctrl.item.image}}"
zoom-image="//verdnatura.es/vn-image-data/catalog/1600x900/{{::$ctrl.item.image}}" on-error-src/>
ng-src="//verdnatura.es/vn-image-data/catalog/200x200/{{$ctrl.item.image}}"
zoom-image="//verdnatura.es/vn-image-data/catalog/1600x900/{{$ctrl.item.image}}" on-error-src/>
</vn-one>
<vn-horizontal class="state">
<vn-one>
<p class="title" uppercase text-center>Visible</p>
<h5 class="title" text-center>{{::$ctrl.summary.visible}}</h5>
<h5 class="title" text-center>{{$ctrl.summary.visible}}</h5>
</vn-one>
<vn-one>
<p class="title" uppercase translate text-center>Available</p>
<h5 text-center class="title">{{::$ctrl.summary.available}}</h5>
<h5 text-center class="title">{{$ctrl.summary.available}}</h5>
</vn-one>
</vn-horizontal>
</vn-vertical>
@ -27,39 +27,39 @@
<vn-vertical name="basicData">
<h5 translate>Basic data</h5>
<vn-label-value label="Name"
value="{{::$ctrl.summary.item.name}}">
value="{{$ctrl.summary.item.name}}">
</vn-label-value>
<vn-label-value label="Full name"
value="{{::$ctrl.summary.item.longName}}">
value="{{$ctrl.summary.item.longName}}">
</vn-label-value>
<vn-label-value label="Type"
value="{{::$ctrl.summary.item.itemType.name}}">
value="{{$ctrl.summary.item.itemType.name}}">
</vn-label-value>
<vn-label-value label="Intrastat code"
value="{{::$ctrl.summary.item.intrastat.id}}">
value="{{$ctrl.summary.item.intrastat.id}}">
</vn-label-value>
<vn-label-value label="Intrastat"
value="{{::$ctrl.summary.item.intrastat.description}}">
value="{{$ctrl.summary.item.intrastat.description}}">
</vn-label-value>
<vn-label-value label="Relevancy"
value="{{::$ctrl.summary.item.relevancy}}">
value="{{$ctrl.summary.item.relevancy}}">
</vn-label-value>
<vn-label-value label="Origin"
value="{{::$ctrl.summary.item.origin.name}}">
value="{{$ctrl.summary.item.origin.name}}">
</vn-label-value>
<vn-label-value label="Expence"
value="{{::$ctrl.summary.item.expence.name}}">
value="{{$ctrl.summary.item.expence.name}}">
</vn-label-value>
<vn-label-value label="Buyer"
value="{{::$ctrl.summary.item.itemType.worker.firstName}} {{::$ctrl.summary.item.itemType.worker.name}}">
value="{{$ctrl.summary.item.itemType.worker.firstName}} {{$ctrl.summary.item.itemType.worker.name}}">
</vn-label-value>
</vn-vertical>
</vn-one>
<vn-one margin-medium>
<vn-vertical name="tax">
<h5 translate>Tax</h5>
<vn-label-value label="{{::tax.country.country}}" ng-repeat="tax in $ctrl.summary.item.taxes track by $index"
value="{{::tax.taxClass.description}}">
<vn-label-value label="{{tax.country.country}}" ng-repeat="tax in $ctrl.summary.item.taxes"
value="{{tax.taxClass.description}}">
</vn-label-value>
</vn-vertical>
</vn-one>
@ -68,16 +68,16 @@
<vn-one margin-medium>
<vn-vertical name="tags">
<h5 translate>Tags</h5>
<vn-label-value label="{{::tag.tag.name}}" ng-repeat="tag in $ctrl.summary.tags track by tag.id"
value="{{::tag.value}}">
<vn-label-value label="{{tag.tag.name}}" ng-repeat="tag in $ctrl.summary.tags track by tag.id"
value="{{tag.value}}">
</vn-label-value>
</vn-vertical>
</vn-one>
<vn-one margin-medium>
<vn-vertical name="niche">
<h5 translate>Niche</h5>
<vn-label-value label="{{::niche.warehouse.name}}" ng-repeat="niche in $ctrl.summary.niches track by $index"
value="{{::niche.code}}">
<vn-label-value label="{{niche.warehouse.name}}" ng-repeat="niche in $ctrl.summary.niches"
value="{{niche.code}}">
</vn-label-value>
</vn-vertical>
</vn-one>
@ -85,13 +85,13 @@
<vn-vertical name="botanical">
<h5 translate>Botanical</h5>
<vn-label-value label="Botanical"
value="{{::$ctrl.summary.botanical.botanical}}">
value="{{$ctrl.summary.botanical.botanical}}">
</vn-label-value>
<vn-label-value label="Genus"
value="{{::$ctrl.summary.botanical.genus.latin_genus_name}}">
value="{{$ctrl.summary.botanical.genus.latin_genus_name}}">
</vn-label-value>
<vn-label-value label="Specie"
value="{{::$ctrl.summary.botanical.specie.latin_species_name}}">
value="{{$ctrl.summary.botanical.specie.latin_species_name}}">
</vn-label-value>
</vn-vertical>
</vn-one>

View File

@ -7,15 +7,16 @@ class Controller {
}
getSummary() {
this.$http.get(`/item/api/Items/${this.item.id}/getSummary`).then(response => {
this.$http.get(`/item/api/Items/${this.item.id}/getSummary`).then((response) => {
this.summary = response.data;
});
}
$onChanges() {
if (this.item && this.item.id)
if (this.item && this.item.id) {
this.getSummary();
}
}
}
Controller.$inject = ['$http'];
@ -24,6 +25,6 @@ ngModule.component('vnItemSummary', {
template: require('./index.html'),
controller: Controller,
bindings: {
item: '<'
}
item: '<',
},
});