descriptor not showing correctly fixed

This commit is contained in:
Gerard 2019-01-17 11:11:45 +01:00
parent 2b2fe69d0d
commit 0c0a465784
2 changed files with 5 additions and 6 deletions

View File

@ -71,7 +71,7 @@
</td> </td>
<td number> <td number>
<span <span
ng-click="$ctrl.showDescriptor($event, row)" ng-click="$ctrl.showDescriptor($event, row.itemFk)"
class="link" pointer> class="link" pointer>
{{("000000"+row.itemFk).slice(-6)}} {{("000000"+row.itemFk).slice(-6)}}
</span> </span>

View File

@ -11,9 +11,8 @@ class Controller {
setSummary() { setSummary() {
this.$http.get(`/order/api/Orders/${this.order.id}/summary`).then(res => { this.$http.get(`/order/api/Orders/${this.order.id}/summary`).then(res => {
if (res && res.data) { if (res && res.data)
this.summary = res.data; this.summary = res.data;
}
}); });
} }
@ -31,17 +30,17 @@ class Controller {
this.setSummary(); this.setSummary();
} }
showDescriptor(event, item) { showDescriptor(event, itemFk) {
this.quicklinks = { this.quicklinks = {
btnThree: { btnThree: {
icon: 'icon-transaction', icon: 'icon-transaction',
state: `item.card.diary({ state: `item.card.diary({
id: ${item.id}, id: ${itemFk},
})`, })`,
tooltip: 'Item diary' tooltip: 'Item diary'
} }
}; };
this.$scope.descriptor.itemFk = item.id; this.$scope.descriptor.itemFk = itemFk;
this.$scope.descriptor.parent = event.target; this.$scope.descriptor.parent = event.target;
this.$scope.descriptor.show(); this.$scope.descriptor.show();
} }