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',
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;
}
});
}

View File

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