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