From 2820b29ba04cf93d28f1722575a50348d5e1fd78 Mon Sep 17 00:00:00 2001 From: Joan Date: Mon, 12 Nov 2018 12:06:18 +0100 Subject: [PATCH] fixed ticket state #812 --- client/ticket/src/card/index.js | 6 +++--- client/ticket/src/card/index.spec.js | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/client/ticket/src/card/index.js b/client/ticket/src/card/index.js index cb17787dc..9bd74db44 100644 --- a/client/ticket/src/card/index.js +++ b/client/ticket/src/card/index.js @@ -26,6 +26,7 @@ class Controller { relation: 'state', fields: ['name'], }, + order: 'created DESC' }, }, ], @@ -39,10 +40,9 @@ class Controller { getCard() { const json = encodeURIComponent(JSON.stringify(this.filter)); const query = `/ticket/api/Tickets/${this.$state.params.id}?filter=${json}`; - this.$http.get(query).then((res) => { - if (res.data) { + this.$http.get(query).then(res => { + if (res.data) this.ticket = res.data; - } }); } diff --git a/client/ticket/src/card/index.spec.js b/client/ticket/src/card/index.spec.js index f599d073f..4828056eb 100644 --- a/client/ticket/src/card/index.spec.js +++ b/client/ticket/src/card/index.spec.js @@ -43,7 +43,8 @@ describe('Ticket', () => { include: { relation: 'state', fields: ['name'] - } + }, + order: 'created DESC' } } ]