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

View File

@ -7,14 +7,15 @@ class Controller {
} }
getSummary() { 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; this.summary = response.data;
}); });
} }
$onChanges() { $onChanges() {
if (this.item && this.item.id) if (this.item && this.item.id) {
this.getSummary(); this.getSummary();
}
} }
} }
@ -24,6 +25,6 @@ ngModule.component('vnItemSummary', {
template: require('./index.html'), template: require('./index.html'),
controller: Controller, controller: Controller,
bindings: { bindings: {
item: '<' item: '<',
} },
}); });