7430_devToTest #2490

Merged
alexm merged 306 commits from 7430_devToTest into test 2024-05-21 09:15:04 +00:00
2 changed files with 8 additions and 6 deletions
Showing only changes of commit 9cba2be00d - Show all commits

View File

@ -8,7 +8,8 @@
}, },
"properties": { "properties": {
"id": { "id": {
"type": "string" "type": "number",
"id": true
}, },
"originFk": { "originFk": {
"type": "number" "type": "number"

View File

@ -37,18 +37,19 @@ class Controller extends Section {
}); });
const filter = { const filter = {
fields: ['originFk', 'creationDate', 'newInstance'], fields: ['id', 'originFk', 'creationDate', 'newInstance'],
where: { where: {
originFk: value, originFk: value,
newInstance: {like: '%"isDeleted":true%'} 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 => { .then(res => {
if (res && res.data) { if (res && res.data && res.data.length) {
const now = Date.vnNew(); const now = Date.vnNew();
const maxDate = new Date(res.data.creationDate); const maxDate = new Date(res.data[0].creationDate);
maxDate.setHours(maxDate.getHours() + 1); maxDate.setHours(maxDate.getHours() + 1);
if (now <= maxDate) if (now <= maxDate)
return this.canRestoreTicket = true; return this.canRestoreTicket = true;