added date at support ticket, new order support tickets, delete edit support ticktes only from enploye and admins
This commit is contained in:
+4
-16
@@ -42,16 +42,10 @@ async function getTasksByContract(filters) {
|
||||
where,
|
||||
include: {
|
||||
subtasks: {
|
||||
orderBy: [
|
||||
{ status: 'asc' },
|
||||
{ createdAt: 'asc' },
|
||||
],
|
||||
orderBy: { createdAt: 'asc' },
|
||||
},
|
||||
},
|
||||
orderBy: [
|
||||
{ status: 'asc' }, // OPEN first, then COMPLETED
|
||||
{ createdAt: 'desc' },
|
||||
],
|
||||
orderBy: { createdAt: 'desc' },
|
||||
});
|
||||
}
|
||||
async function getTaskById(id) {
|
||||
@@ -210,10 +204,7 @@ async function getAllTasks(filters) {
|
||||
where,
|
||||
include: {
|
||||
subtasks: {
|
||||
orderBy: [
|
||||
{ status: 'asc' },
|
||||
{ createdAt: 'asc' },
|
||||
],
|
||||
orderBy: { createdAt: 'asc' },
|
||||
},
|
||||
contract: {
|
||||
select: {
|
||||
@@ -246,10 +237,7 @@ async function getAllTasks(filters) {
|
||||
},
|
||||
},
|
||||
},
|
||||
orderBy: [
|
||||
{ status: 'asc' }, // OPEN first, then COMPLETED
|
||||
{ createdAt: 'desc' },
|
||||
],
|
||||
orderBy: { createdAt: 'desc' },
|
||||
});
|
||||
}
|
||||
async function getTaskStats(filters) {
|
||||
|
||||
Reference in New Issue
Block a user