added date at support ticket, new order support tickets, delete edit support ticktes only from enploye and admins
This commit is contained in:
@@ -37,16 +37,10 @@ export async function getTasksByContract(filters: ContractTaskFilters) {
|
||||
where,
|
||||
include: {
|
||||
subtasks: {
|
||||
orderBy: [
|
||||
{ status: 'asc' },
|
||||
{ createdAt: 'asc' },
|
||||
],
|
||||
orderBy: { createdAt: 'asc' },
|
||||
},
|
||||
},
|
||||
orderBy: [
|
||||
{ status: 'asc' }, // OPEN first, then COMPLETED
|
||||
{ createdAt: 'desc' },
|
||||
],
|
||||
orderBy: { createdAt: 'desc' },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -249,10 +243,7 @@ export async function getAllTasks(filters: AllTasksFilters) {
|
||||
where,
|
||||
include: {
|
||||
subtasks: {
|
||||
orderBy: [
|
||||
{ status: 'asc' },
|
||||
{ createdAt: 'asc' },
|
||||
],
|
||||
orderBy: { createdAt: 'asc' },
|
||||
},
|
||||
contract: {
|
||||
select: {
|
||||
@@ -285,10 +276,7 @@ export async function getAllTasks(filters: AllTasksFilters) {
|
||||
},
|
||||
},
|
||||
},
|
||||
orderBy: [
|
||||
{ status: 'asc' }, // OPEN first, then COMPLETED
|
||||
{ createdAt: 'desc' },
|
||||
],
|
||||
orderBy: { createdAt: 'desc' },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user