7152-devToTest_2414 #2228
|
@ -46,22 +46,16 @@ class Controller extends Section {
|
||||||
};
|
};
|
||||||
this.$http.get(`TicketLogs/findOne`, {filter})
|
this.$http.get(`TicketLogs/findOne`, {filter})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log(res);
|
|
||||||
console.log(res.data.creationDate);
|
|
||||||
if (res && res.data) {
|
if (res && res.data) {
|
||||||
console.log(res.data);
|
|
||||||
const now = Date.vnNew();
|
const now = Date.vnNew();
|
||||||
const maxDate = new Date(res.data.creationDate);
|
const maxDate = new Date(res.data.creationDate);
|
||||||
maxDate.setHours(maxDate.getHours() + 1);
|
maxDate.setHours(maxDate.getHours() + 1);
|
||||||
console.log(now, maxDatenow);
|
|
||||||
console.log(now.getTime(), maxDate.getTime());
|
|
||||||
if (now <= maxDate)
|
if (now <= maxDate)
|
||||||
return this.canRestoreTicket = true;
|
return this.canRestoreTicket = true;
|
||||||
}
|
}
|
||||||
this.canRestoreTicket = false;
|
this.canRestoreTicket = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
console.log('ENTRY');
|
|
||||||
this.canRestoreTicket = false;
|
this.canRestoreTicket = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue