#195 listar lineas de ticket componente fetched-tags
This commit is contained in:
parent
dcce890bea
commit
d29dcf2e11
|
@ -9,8 +9,8 @@
|
|||
show="$ctrl.showDropDown"
|
||||
selected="$ctrl.selected"
|
||||
filter="true"
|
||||
parent="$ctrl.element"
|
||||
></vn-drop-down>
|
||||
parent="$ctrl.element">
|
||||
</vn-drop-down>
|
||||
</div>
|
||||
<div ng-if="$ctrl.findMore">
|
||||
<vn-drop-down
|
||||
|
@ -21,7 +21,7 @@
|
|||
load-more="$ctrl.getItems()"
|
||||
show-load-more="$ctrl.maxRow"
|
||||
filter-action="$ctrl.findItems(search)"
|
||||
parent="$ctrl.element"
|
||||
></vn-drop-down>
|
||||
parent="$ctrl.element">
|
||||
</vn-drop-down>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,8 @@
|
|||
<vn-vertical style="text-align:center">
|
||||
<vn-one>{{::$ctrl.sale.concept}}</vn-one>
|
||||
<vn-one>
|
||||
<vn-one ng-repeat="fetchedTag in $ctrl.sale.itemTag track by $index">
|
||||
<vn-label>{{::fetchedTag.tag.name}} </vn-label>{{::fetchedTag.value}}
|
||||
</vn-one>
|
||||
</vn-one>
|
||||
</vn-vertical>
|
|
@ -0,0 +1,12 @@
|
|||
import ngModule from '../module';
|
||||
|
||||
class Controller {}
|
||||
Controller.$inject = [];
|
||||
|
||||
ngModule.component('vnFetchedTags', {
|
||||
template: require('./fetched-tags.html'),
|
||||
controller: Controller,
|
||||
bindings: {
|
||||
sale: '<'
|
||||
}
|
||||
});
|
|
@ -1,39 +1,30 @@
|
|||
<mg-ajax path="/ticket/api/sales/filter" options="vnIndex"></mg-ajax>
|
||||
<vn-vertical>
|
||||
<vn-card pad-large>
|
||||
<vn-vertical>
|
||||
<vn-title>Sale</vn-title>
|
||||
<table class="vn-grid">
|
||||
<thead>
|
||||
<tr>
|
||||
<th number translate>Item</th>
|
||||
<th translate style="text-align:center">Description</th>
|
||||
<th number translate>Quantity</th>
|
||||
<th number translate>Price</th>
|
||||
<th number translate>Discount</th>
|
||||
<th number translate>Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="sale in index.model.instances track by sale.id">
|
||||
<td number>{{::sale.itemFk}}</td>
|
||||
<td>
|
||||
<vn-vertical style="text-align:center">
|
||||
<vn-one>{{::sale.concept}}</vn-one>
|
||||
<vn-one>
|
||||
<vn-one ng-repeat="fetchedTag in sale.itemTag track by $index">
|
||||
<vn-label>{{::fetchedTag.tag.name}} </vn-label>{{::fetchedTag.value}}
|
||||
</vn-one>
|
||||
</vn-one>
|
||||
</vn-vertical>
|
||||
</td>
|
||||
<td number>{{::sale.quantity}}</td>
|
||||
<td number>{{::sale.price | currency:'€':2}}</td>
|
||||
<td number>{{::sale.discount}} %</td>
|
||||
<td number>{{::sale.quantity * sale.price | currency:'€':2}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</vn-vertical>
|
||||
<vn-vertical>
|
||||
<vn-title>Sale</vn-title>
|
||||
<table class="vn-grid">
|
||||
<thead>
|
||||
<tr>
|
||||
<th number translate>Item</th>
|
||||
<th translate style="text-align:center">Description</th>
|
||||
<th number translate>Quantity</th>
|
||||
<th number translate>Price</th>
|
||||
<th number translate>Discount</th>
|
||||
<th number translate>Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="sale in index.model.instances track by sale.id">
|
||||
<td number>{{::sale.itemFk}}</td>
|
||||
<td><vn-fetched-tags sale="sale"/></td>
|
||||
<td number>{{::sale.quantity}}</td>
|
||||
<td number>{{::sale.price | currency:'€':2}}</td>
|
||||
<td number>{{::sale.discount}} %</td>
|
||||
<td number>{{::sale.quantity * sale.price | currency:'€':2}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</vn-vertical>
|
||||
</vn-card>
|
||||
</vn-vertical>
|
||||
|
|
|
@ -11,3 +11,4 @@ import './volume/ticket-volume';
|
|||
import './package/package';
|
||||
import './sale/sale';
|
||||
import './tracking/tracking';
|
||||
import './fetched-tags/fetched-tags';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import createNightmare from '../../helpers/helpers';
|
||||
|
||||
fdescribe('edit item basic data path', () => {
|
||||
describe('edit item basic data path', () => {
|
||||
const nightmare = createNightmare();
|
||||
|
||||
beforeAll(() => {
|
||||
|
|
Loading…
Reference in New Issue