From 8a16c24245afac127bbf785ff9923ed8f6ebaf88 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 8 Mar 2024 12:27:47 +0100 Subject: [PATCH] refs #6755 fix ticket --- modules/ticket/front/descriptor-menu/index.js | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/modules/ticket/front/descriptor-menu/index.js b/modules/ticket/front/descriptor-menu/index.js index 245142a60..f60e0012c 100644 --- a/modules/ticket/front/descriptor-menu/index.js +++ b/modules/ticket/front/descriptor-menu/index.js @@ -8,6 +8,7 @@ class Controller extends Section { this.vnReport = vnReport; this.vnEmail = vnEmail; this.vnFile = vnFile; + this.restoreTicket = vnRestoreTicket; } get ticketId() { @@ -172,18 +173,18 @@ class Controller extends Section { } get canRestoreTicket() { - // const isDeleted = this.ticket.isDeleted; - // const now = Date.vnNew(); - // const maxDate = new Date(this.ticket.updated); - // maxDate.setHours(maxDate.getHours() + 1); + const isDeleted = this.ticket.isDeleted; + const now = Date.vnNew(); + const maxDate = new Date(this.ticket.updated); + maxDate.setHours(maxDate.getHours() + 1); - // return isDeleted && (now <= maxDate); - return this.$http.get(`TicketLogs`).then(res => { - if (res && res.data.length) - console.log(res.data); - console.log(res); - return true; - }); + return isDeleted && (now <= maxDate); + // return this.$http.get(`TicketLogs`).then(res => { + // if (res && res.data.length) + // console.log(res.data); + // console.log(res); + // return true; + // }); } restoreTicket() {