refs #6755 fix ticket

This commit is contained in:
Carlos Satorres 2024-03-08 12:27:47 +01:00
parent d4d3fdceb5
commit 8a16c24245
1 changed files with 12 additions and 11 deletions

View File

@ -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() {