added date at support ticket, new order support tickets, delete edit support ticktes only from enploye and admins

This commit is contained in:
2026-02-08 18:26:34 +01:00
parent 06489299d5
commit ee4f1aacdd
8 changed files with 888 additions and 752 deletions
+4 -16
View File
@@ -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' },
});
}