#841 claim relation added

This commit is contained in:
Gerard 2018-11-21 10:09:36 +01:00
parent bad8e63f95
commit baacc351fd
3 changed files with 18 additions and 5 deletions

View File

@ -67,6 +67,14 @@
<tbody>
<tr ng-repeat="sale in $ctrl.summary.sales track by sale.id">
<td>
<a ui-sref="claim.card.basicData({id: sale.claimBeginning.claimFk})">
<vn-icon
ng-show="sale.claimBeginning.claimFk"
orange
icon="icon-claims"
vn-tooltip="{{::$ctrl.$translate.instant('Claim')}}: {{::sale.claimBeginning.claimFk}}">
</vn-icon>
</a>
<vn-icon
ng-show="sale.visible || sale.available"
orange

View File

@ -68,7 +68,7 @@ module.exports = Self => {
}
},
{
relation: 'tracking',
relation: 'state',
scope: {
fields: ['stateFk'],
include: {
@ -90,11 +90,11 @@ module.exports = Self => {
ticketFk: ticketFk
},
order: 'itemFk ASC',
include: [{
relation: 'item',
}]
include: [
{relation: 'item'},
{relation: 'claimBeginning'}
]
};
return await Sale.find(filter);
}

View File

@ -57,6 +57,11 @@
"model": "SaleComponent",
"foreignKey": "saleFk"
},
"claimBeginning": {
"type": "hasOne",
"model": "ClaimBeginning",
"foreignKey": "saleFk"
},
"saleTracking": {
"type": "hasOne",
"model": "SaleTracking",