Bug #419 Refactorizar vn-fetched-tags para que sea independiente de sale

This commit is contained in:
gerard 2018-07-19 10:44:57 +02:00
parent fb81c473c1
commit b58219b856
9 changed files with 12 additions and 11 deletions

View File

@ -40,7 +40,7 @@
ng-click="$ctrl.showDescriptor($event, sale.itemFk)">{{::sale.itemFk}}</td>
<td rowspan="{{
::sale.components.length + 1
}}"><vn-fetched-tags sale="sale"/></td>
}}"><vn-fetched-tags concept="sale.concept" tags="sale.item.tags"/></td>
<td rowspan="{{
::sale.components.length + 1
}}" number>{{::sale.quantity}}</td>

View File

@ -16,7 +16,7 @@
<tbody>
<tr ng-repeat="sale in $ctrl.ticket.sale.items track by sale.id">
<td number>{{("000000"+sale.itemFk).slice(-6)}}</td>
<td><vn-fetched-tags sale="sale"/></td>
<td><vn-fetched-tags concept="sale.concept" tags="sale.item.tags"/></td>
<td number>{{::sale.quantity}}</td>
<td number>{{::sale.price | currency: '€': 2}}</td>
<td number>{{::sale.component.newPrice | currency: '€': 2}}</td>

View File

@ -1,9 +1,9 @@
<vn-horizontal>
<vn-one>{{::$ctrl.sale.concept}}</vn-one>
<vn-one>{{::$ctrl.concept}}</vn-one>
<vn-two>
<section
class="inline-tag ellipsize" ng-class="{'empty': !fetchedTag.value}"
ng-repeat="fetchedTag in $ctrl.sale.item.tags track by $index"
ng-repeat="fetchedTag in $ctrl.tags track by $index"
vn-tooltip="{{::fetchedTag.tag.name}}: {{::fetchedTag.value}}">
{{::fetchedTag.value}}
</section>

View File

@ -4,6 +4,7 @@ import './style.scss';
ngModule.component('vnFetchedTags', {
template: require('./index.html'),
bindings: {
sale: '<'
concept: '<',
tags: '<'
}
});

View File

@ -31,7 +31,7 @@
ng-click="$ctrl.showDescriptor($event, sale.itemFk)">
{{::sale.itemFk}}
</vn-td>
<vn-td><vn-fetched-tags sale="sale"/></vn-td>
<vn-td><vn-fetched-tags concept="sale.concept" tags="sale.item.tags"/></vn-td>
<vn-td number>{{::sale.quantity}}</vn-td>
</vn-tr>
</vn-tbody>

View File

@ -36,7 +36,7 @@
<vn-td number pointer ng-click="$ctrl.showDescriptor($event, sale.itemFk)">
{{::sale.itemFk}}
</vn-td>
<vn-td><vn-fetched-tags sale="sale"/></vn-td>
<vn-td><vn-fetched-tags concept="sale.concept" tags="sale.item.tags"/></vn-td>
<vn-td>{{::sale.quantity}}</vn-td>
<vn-td>{{::sale.originalQuantity}}</vn-td>
<vn-td title="{{::sale.firstName}} {{::sale.name}}"

View File

@ -55,7 +55,7 @@
</vn-multi-check>
</vn-th>
<vn-th></vn-th>
<vn-th>Item</vn-th>
<vn-th style="text-align: center">Item</vn-th>
<vn-th number>Id</vn-th>
<vn-th>Description</vn-th>
<vn-th number>Quantity</vn-th>
@ -91,7 +91,7 @@
pointer number>
{{::sale.itemFk}}
</vn-td>
<vn-td><vn-fetched-tags sale="sale"/></vn-td>
<vn-td><vn-fetched-tags concept="sale.concept" tags="sale.item.tags"/></vn-td>
<vn-td ng-if="!$ctrl.isEditable" number>{{sale.quantity}}</vn-td>
<vn-td ng-if="$ctrl.isEditable" number>
<vn-textfield

View File

@ -77,7 +77,7 @@
ng-click="$ctrl.showDescriptor($event, sale.itemFk)">
{{("000000"+sale.itemFk).slice(-6)}}
</td>
<td><vn-fetched-tags sale="sale"/></td>
<td><vn-fetched-tags concept="sale.concept" tags="sale.item.tags"/></td>
<td number>{{::sale.quantity}}</td>
<td number>{{::sale.price | currency:'€':2}}</td>
<td number>{{::sale.discount}} %</td>

View File

@ -34,7 +34,7 @@
ng-click="$ctrl.showDescriptor($event, sale.itemFk)">
{{::sale.itemFk}}
</vn-td>
<vn-td><vn-fetched-tags sale="sale"/></vn-td>
<vn-td><vn-fetched-tags concept="sale.concept" tags="sale.item.tags"/></vn-td>
<vn-td number>{{::sale.quantity}}</vn-td>
<vn-td number>{{::sale.volume.m3 | number:3}}</vn-td>
</vn-tr>