#841 claim relation added
This commit is contained in:
parent
bad8e63f95
commit
baacc351fd
|
@ -67,6 +67,14 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr ng-repeat="sale in $ctrl.summary.sales track by sale.id">
|
<tr ng-repeat="sale in $ctrl.summary.sales track by sale.id">
|
||||||
<td>
|
<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
|
<vn-icon
|
||||||
ng-show="sale.visible || sale.available"
|
ng-show="sale.visible || sale.available"
|
||||||
orange
|
orange
|
||||||
|
|
|
@ -68,7 +68,7 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
relation: 'tracking',
|
relation: 'state',
|
||||||
scope: {
|
scope: {
|
||||||
fields: ['stateFk'],
|
fields: ['stateFk'],
|
||||||
include: {
|
include: {
|
||||||
|
@ -90,11 +90,11 @@ module.exports = Self => {
|
||||||
ticketFk: ticketFk
|
ticketFk: ticketFk
|
||||||
},
|
},
|
||||||
order: 'itemFk ASC',
|
order: 'itemFk ASC',
|
||||||
include: [{
|
include: [
|
||||||
relation: 'item',
|
{relation: 'item'},
|
||||||
}]
|
{relation: 'claimBeginning'}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
return await Sale.find(filter);
|
return await Sale.find(filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,11 @@
|
||||||
"model": "SaleComponent",
|
"model": "SaleComponent",
|
||||||
"foreignKey": "saleFk"
|
"foreignKey": "saleFk"
|
||||||
},
|
},
|
||||||
|
"claimBeginning": {
|
||||||
|
"type": "hasOne",
|
||||||
|
"model": "ClaimBeginning",
|
||||||
|
"foreignKey": "saleFk"
|
||||||
|
},
|
||||||
"saleTracking": {
|
"saleTracking": {
|
||||||
"type": "hasOne",
|
"type": "hasOne",
|
||||||
"model": "SaleTracking",
|
"model": "SaleTracking",
|
||||||
|
|
Loading…
Reference in New Issue