fixed ticket state #812

This commit is contained in:
Joan 2018-11-12 12:06:18 +01:00
parent 81eabac30b
commit 2820b29ba0
2 changed files with 5 additions and 4 deletions

View File

@ -26,6 +26,7 @@ class Controller {
relation: 'state', relation: 'state',
fields: ['name'], fields: ['name'],
}, },
order: 'created DESC'
}, },
}, },
], ],
@ -39,10 +40,9 @@ class Controller {
getCard() { getCard() {
const json = encodeURIComponent(JSON.stringify(this.filter)); const json = encodeURIComponent(JSON.stringify(this.filter));
const query = `/ticket/api/Tickets/${this.$state.params.id}?filter=${json}`; const query = `/ticket/api/Tickets/${this.$state.params.id}?filter=${json}`;
this.$http.get(query).then((res) => { this.$http.get(query).then(res => {
if (res.data) { if (res.data)
this.ticket = res.data; this.ticket = res.data;
}
}); });
} }

View File

@ -43,7 +43,8 @@ describe('Ticket', () => {
include: { include: {
relation: 'state', relation: 'state',
fields: ['name'] fields: ['name']
} },
order: 'created DESC'
} }
} }
] ]