Show item descriptor on itemFk click
This commit is contained in:
parent
34ff655617
commit
8878593bbe
|
@ -36,7 +36,8 @@
|
|||
<tr>
|
||||
<td rowspan="{{
|
||||
::sale.components.length + 1
|
||||
}}" number>{{::sale.itemFk}}</td>
|
||||
}}" number pointer
|
||||
ng-click="$ctrl.showDescriptor($event, sale.itemFk)">{{::sale.itemFk}}</td>
|
||||
<td rowspan="{{
|
||||
::sale.components.length + 1
|
||||
}}"><vn-fetched-tags sale="sale"/></td>
|
||||
|
@ -69,3 +70,4 @@
|
|||
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
|
||||
</vn-card>
|
||||
</vn-vertical>
|
||||
<vn-item-descriptor-popover vn-id="descriptor"></vn-item-descriptor-popover>
|
||||
|
|
|
@ -43,6 +43,16 @@ class Controller extends FilterTicketList {
|
|||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
showDescriptor(event, itemFk) {
|
||||
this.$scope.descriptor.itemFk = itemFk;
|
||||
this.$scope.descriptor.parent = event.target;
|
||||
this.$scope.descriptor.show();
|
||||
}
|
||||
|
||||
onDescriptorLoad() {
|
||||
this.$scope.popover.relocate();
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$scope', '$timeout', '$state'];
|
||||
|
|
|
@ -1,4 +1,17 @@
|
|||
vn-ticket-components .vn-grid {
|
||||
vn-ticket-components {
|
||||
vn-fetched-tags {
|
||||
& vn-horizontal {
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
|
||||
& .inline-tag {
|
||||
display: inline-block;
|
||||
float: none
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.vn-grid {
|
||||
tbody:not(:last-child) {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
@ -24,4 +37,5 @@ vn-ticket-components .vn-grid {
|
|||
tr:not(:first-child):not(:last-child), {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -25,7 +25,8 @@
|
|||
vn-tooltip="delete expedition"
|
||||
ng-click="$ctrl.deleteExpedition(expedition)">delete</i>
|
||||
</vn-one>
|
||||
<vn-one pad-medium-h>{{::expedition.itemFk}}</vn-one>
|
||||
<vn-one pointer number
|
||||
ng-click="$ctrl.showDescriptor($event, expedition.item.id)">{{::expedition.itemFk}}</vn-one>
|
||||
<vn-one pad-medium-h>{{::expedition.item.name}}</vn-one>
|
||||
<vn-one pad-medium-h>{{::expedition.package.name}}</vn-one>
|
||||
<vn-one pad-medium-h>{{::expedition.counter}}</vn-one>
|
||||
|
@ -41,3 +42,4 @@
|
|||
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
|
||||
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
|
||||
</vn-vertical>
|
||||
<vn-item-descriptor-popover vn-id="descriptor"></vn-item-descriptor-popover>
|
||||
|
|
|
@ -4,6 +4,7 @@ import FilterTicketList from '../filter-ticket-list';
|
|||
class Controller extends FilterTicketList {
|
||||
constructor($scope, $timeout, $stateParams, $http) {
|
||||
super($scope, $timeout, $stateParams);
|
||||
this.$scope = $scope;
|
||||
this.params = $stateParams;
|
||||
this.$http = $http;
|
||||
}
|
||||
|
@ -13,6 +14,16 @@ class Controller extends FilterTicketList {
|
|||
() => this.$.index.accept()
|
||||
);
|
||||
}
|
||||
|
||||
showDescriptor(event, itemFk) {
|
||||
this.$scope.descriptor.itemFk = itemFk;
|
||||
this.$scope.descriptor.parent = event.target;
|
||||
this.$scope.descriptor.show();
|
||||
}
|
||||
|
||||
onDescriptorLoad() {
|
||||
this.$scope.popover.relocate();
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$scope', '$timeout', '$state', '$http'];
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
disabled="true">
|
||||
</vn-check>
|
||||
</td>
|
||||
<td number>{{::sale.itemFk}}</td>
|
||||
<td number pointer
|
||||
ng-click="$ctrl.showDescriptor($event, sale.itemFk)">{{::sale.itemFk}}</td>
|
||||
<td><vn-fetched-tags sale="sale"/></td>
|
||||
<td number>{{::sale.quantity}}</td>
|
||||
</tr>
|
||||
|
@ -34,3 +35,4 @@
|
|||
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
|
||||
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
|
||||
</vn-vertical>
|
||||
<vn-item-descriptor-popover vn-id="descriptor"></vn-item-descriptor-popover>
|
||||
|
|
|
@ -4,9 +4,19 @@ import FilterTicketList from '../filter-ticket-list';
|
|||
class Controller extends FilterTicketList {
|
||||
constructor($scope, $timeout, $state) {
|
||||
super($scope, $timeout, $state);
|
||||
|
||||
this.$scope = $scope;
|
||||
this.onOrder('quantity', 'ASC');
|
||||
}
|
||||
|
||||
showDescriptor(event, itemFk) {
|
||||
this.$scope.descriptor.itemFk = itemFk;
|
||||
this.$scope.descriptor.parent = event.target;
|
||||
this.$scope.descriptor.show();
|
||||
}
|
||||
|
||||
onDescriptorLoad() {
|
||||
this.$scope.popover.relocate();
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$scope', '$timeout', '$state'];
|
||||
|
|
|
@ -62,7 +62,5 @@
|
|||
</vn-card>
|
||||
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
|
||||
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="index.model.instances"></vn-auto-paging> -->
|
||||
<vn-item-descriptor-popover vn-id="descriptor">
|
||||
</vn-item-descriptor-popover>
|
||||
</vn-popover>
|
||||
<vn-item-descriptor-popover vn-id="descriptor"></vn-item-descriptor-popover>
|
||||
</vn-vertical>
|
||||
|
|
|
@ -73,7 +73,10 @@
|
|||
vn-tooltip="delete expedition"
|
||||
ng-click="$ctrl.deleteExpedition(expedition)">warning</i> -->
|
||||
</td>
|
||||
<td number>{{("000000"+sale.itemFk).slice(-6)}}</td>
|
||||
<td number pointer
|
||||
ng-click="$ctrl.showDescriptor($event, sale.itemFk)">
|
||||
{{("000000"+sale.itemFk).slice(-6)}}
|
||||
</td>
|
||||
<td><vn-fetched-tags sale="sale"/></td>
|
||||
<td number>{{::sale.quantity}}</td>
|
||||
<td number>{{::sale.price | currency:'€':2}}</td>
|
||||
|
@ -85,3 +88,4 @@
|
|||
</vn-horizontal>
|
||||
</vn-vertical>
|
||||
</vn-card>
|
||||
<vn-item-descriptor-popover vn-id="descriptor"></vn-item-descriptor-popover>
|
||||
|
|
|
@ -2,7 +2,8 @@ import ngModule from '../module';
|
|||
import './style.scss';
|
||||
|
||||
class Controller {
|
||||
constructor($http) {
|
||||
constructor($scope, $http) {
|
||||
this.$scope = $scope;
|
||||
this.$http = $http;
|
||||
}
|
||||
|
||||
|
@ -15,9 +16,19 @@ class Controller {
|
|||
this.summary = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
showDescriptor(event, itemFk) {
|
||||
this.$scope.descriptor.itemFk = itemFk;
|
||||
this.$scope.descriptor.parent = event.target;
|
||||
this.$scope.descriptor.show();
|
||||
}
|
||||
|
||||
onDescriptorLoad() {
|
||||
this.$scope.popover.relocate();
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$http'];
|
||||
Controller.$inject = ['$scope', '$http'];
|
||||
|
||||
ngModule.component('vnTicketSummary', {
|
||||
template: require('./index.html'),
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="sale in index.model.instances track by sale.id" class="list list-element">
|
||||
<td number>{{::sale.itemFk}}</td>
|
||||
<td number pointer
|
||||
ng-click="$ctrl.showDescriptor($event, sale.itemFk)">{{::sale.itemFk}}</td>
|
||||
<td><vn-fetched-tags sale="sale"/></td>
|
||||
<td number>{{::sale.quantity}}</td>
|
||||
<td number>{{::sale.volume.m3 | number:3}}</td>
|
||||
|
@ -38,3 +39,5 @@
|
|||
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
|
||||
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
|
||||
</vn-vertical>
|
||||
<vn-item-descriptor-popover vn-id="descriptor"></vn-item-descriptor-popover>
|
||||
|
||||
|
|
|
@ -28,6 +28,16 @@ class Controller extends FilterTicketList {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
showDescriptor(event, itemFk) {
|
||||
this.$scope.descriptor.itemFk = itemFk;
|
||||
this.$scope.descriptor.parent = event.target;
|
||||
this.$scope.descriptor.show();
|
||||
}
|
||||
|
||||
onDescriptorLoad() {
|
||||
this.$scope.popover.relocate();
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$scope', '$http', '$translate', '$timeout', '$state'];
|
||||
|
|
Loading…
Reference in New Issue