From 53fe9b6103658cccab993e2146f9a4e8f243dce5 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez <=> Date: Mon, 29 Oct 2018 08:33:53 +0100 Subject: [PATCH] #756 ticket.sale-tracking checking state functionality --- client/ticket/src/card/index.js | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/client/ticket/src/card/index.js b/client/ticket/src/card/index.js index 077deafcb..cb17787dc 100644 --- a/client/ticket/src/card/index.js +++ b/client/ticket/src/card/index.js @@ -14,9 +14,9 @@ class Controller { fields: ['salesPersonFk', 'name', 'isActive', 'isFreezed', 'isTaxDataChecked'], include: { relation: 'salesPerson', - fields: ['firstName', 'name'] - } - } + fields: ['firstName', 'name'], + }, + }, }, { relation: 'tracking', @@ -24,11 +24,11 @@ class Controller { fields: ['stateFk'], include: { relation: 'state', - fields: ['name'] - } - } - } - ] + fields: ['name'], + }, + }, + }, + ], }; } @@ -37,11 +37,12 @@ class Controller { } getCard() { - let json = encodeURIComponent(JSON.stringify(this.filter)); - let query = `/ticket/api/Tickets/${this.$state.params.id}?filter=${json}`; - this.$http.get(query).then(res => { - if (res.data) + 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.ticket = res.data; + } }); } @@ -54,5 +55,5 @@ Controller.$inject = ['$http', '$state']; ngModule.component('vnTicketCard', { template: require('./index.html'), - controller: Controller + controller: Controller, });