#975 ticket.summary

This commit is contained in:
Gerard 2019-01-16 12:43:18 +01:00
parent ef7660162c
commit 0fd1149c55
2 changed files with 19 additions and 7 deletions

View File

@ -120,8 +120,22 @@ module.exports = Self => {
ticketFk: ticketFk ticketFk: ticketFk
}, },
include: [ include: [
{relation: 'requester'}, {
{relation: 'atender'} relation: 'requester',
scope: {
include: {
relation: 'user'
}
}
},
{
relation: 'atender',
scope: {
include: {
relation: 'user'
}
}
}
] ]
}; };
return await Self.app.models.TicketRequest.find(filter); return await Self.app.models.TicketRequest.find(filter);

View File

@ -161,7 +161,6 @@
<vn-table model="model"> <vn-table model="model">
<vn-thead> <vn-thead>
<vn-tr> <vn-tr>
<vn-th number>Id</vn-th>
<vn-th>Description</vn-th> <vn-th>Description</vn-th>
<vn-th number>Created</vn-th> <vn-th number>Created</vn-th>
<vn-th>Requester</vn-th> <vn-th>Requester</vn-th>
@ -174,17 +173,16 @@
</vn-thead> </vn-thead>
<vn-tbody> <vn-tbody>
<vn-tr ng-repeat="request in $ctrl.summary.requests"> <vn-tr ng-repeat="request in $ctrl.summary.requests">
<vn-td number>{{::request.id}}</vn-td>
<vn-td>{{::request.description}}</vn-td> <vn-td>{{::request.description}}</vn-td>
<vn-td number>{{::request.created | dateTime: 'dd/MM/yyyy'}}</vn-td> <vn-td number>{{::request.created | dateTime: 'dd/MM/yyyy'}}</vn-td>
<vn-td>{{::request.requester.firstName}} {{::request.requester.name}}</vn-td> <vn-td>{{::request.requester.user.name}}</vn-td>
<vn-td>{{::request.atender.firstName}} {{::request.atender.name}}</vn-td> <vn-td>{{::request.atender.user.name}}</vn-td>
<vn-td number>{{::request.quantity}}</vn-td> <vn-td number>{{::request.quantity}}</vn-td>
<vn-td number>{{::request.price}}</vn-td> <vn-td number>{{::request.price}}</vn-td>
<vn-td number> <vn-td number>
<span <span
ng-show="::request.saleFk" ng-show="::request.saleFk"
ng-click="$ctrl.showDescriptor($event, request.sale)" ng-click="$ctrl.showDescriptor($event, request.saleFk)"
pointer class="link"> pointer class="link">
{{("000000"+request.saleFk).slice(-6)}} {{("000000"+request.saleFk).slice(-6)}}
</span> </span>