#229 ticket descriptor

This commit is contained in:
Carlos Jimenez 2018-04-10 11:14:33 +02:00
parent 3a798757cf
commit e65942a296
3 changed files with 51 additions and 6 deletions

View File

@ -11,6 +11,30 @@ class TicketCard {
_getTicket() { _getTicket() {
let filter = { let filter = {
include: [
{relation: 'warehouse', scope: {fields: ['name']}},
{relation: 'agencyMode', scope: {fields: ['name']}},
{
relation: 'client',
scope: {
fields: ['salesPersonFk', 'name'],
include: {
relation: 'salesPerson',
fields: ['firstName', 'name']
}
}
},
{
relation: 'ticketTracking',
scope: {
fields: ['stateFk'],
include: {
relation: 'state',
fields: ['name']
}
}
}
]
}; };
this.$http.get(`/ticket/api/Tickets/${this.$state.params.id}?filter=${JSON.stringify(filter)}`) this.$http.get(`/ticket/api/Tickets/${this.$state.params.id}?filter=${JSON.stringify(filter)}`)
.then(res => { .then(res => {

View File

@ -8,9 +8,31 @@
<vn-icon icon="desktop_windows"></vn-icon> <vn-icon icon="desktop_windows"></vn-icon>
</a> </a>
</vn-horizontal> </vn-horizontal>
<vn-vertical> <div pad-medium>
<vn-auto pad-medium> <h6>{{$ctrl.client.name}}</h6>
<div>
</vn-auto> <vn-label translate>ID:</vn-label> {{$ctrl.ticket.id}}
</vn-vertical> </div>
<div>
<vn-label translate>Cliente:</vn-label> {{$ctrl.ticket.client.name}}
</div>
<div>
<vn-label translate>State:</vn-label> {{$ctrl.ticket.ticketTracking.state.name}}
</div>
<div>
<vn-label translate>Sales person:</vn-label> {{$ctrl.ticket.client.salesPerson.firstName}} {{$ctrl.ticket.client.salesPerson.name}}
</div>
<div>
<vn-label translate>Shipped:</vn-label> {{$ctrl.ticket.shipped | date}}
</div>
<div>
<vn-label translate>Agency:</vn-label> {{$ctrl.ticket.agencyMode.name}}
</div>
<div>
<vn-label translate>Warehouse:</vn-label> {{$ctrl.ticket.warehouse.name}}
</div>
<div>
<vn-label translate>Alias:</vn-label> {{$ctrl.ticket.nickname}}
</div>
</div>
</vn-card> </vn-card>

View File

@ -36,7 +36,6 @@ module.exports = Self => {
} }
} }
); );
return filters; return filters;
} }
}; };