diff --git a/modules/ticket/back/models/ticket-log.json b/modules/ticket/back/models/ticket-log.json index 32b4afd13..d75589f11 100644 --- a/modules/ticket/back/models/ticket-log.json +++ b/modules/ticket/back/models/ticket-log.json @@ -8,7 +8,8 @@ }, "properties": { "id": { - "type": "string" + "type": "number", + "id": true }, "originFk": { "type": "number" diff --git a/modules/ticket/front/descriptor-menu/index.js b/modules/ticket/front/descriptor-menu/index.js index 52cac141c..89590e86a 100644 --- a/modules/ticket/front/descriptor-menu/index.js +++ b/modules/ticket/front/descriptor-menu/index.js @@ -37,14 +37,15 @@ class Controller extends Section { }); const filter = { - fields: ['originFk', 'creationDate', 'newInstance'], + fields: ['id', 'originFk', 'creationDate', 'newInstance'], where: { originFk: value, newInstance: {like: '%"isDeleted":true%'} }, - order: 'creationDate DESC' + order: 'creationDate DESC', + limit: 1 }; - this.$http.get(`TicketLogs/findOne`, {filter}) + this.$http.get(`TicketLogs`, {filter}) .then(res => { if (res && res.data) { const now = Date.vnNew();