refactor: change sort
This commit is contained in:
parent
59bb873b1c
commit
9535774a30
3 changed files with 3 additions and 3 deletions
|
|
@ -50,7 +50,7 @@ export class EmployeeInCountryNoticeController extends Controller {
|
||||||
@Security("keycloak")
|
@Security("keycloak")
|
||||||
async list(@Path() employeeId: string) {
|
async list(@Path() employeeId: string) {
|
||||||
return prisma.employeeInCountryNotice.findMany({
|
return prisma.employeeInCountryNotice.findMany({
|
||||||
orderBy: { createdAt: "asc" },
|
orderBy: { noticeDate: "desc" },
|
||||||
where: { employeeId },
|
where: { employeeId },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ export class EmployeePassportController extends Controller {
|
||||||
@Security("keycloak")
|
@Security("keycloak")
|
||||||
async list(@Path() employeeId: string) {
|
async list(@Path() employeeId: string) {
|
||||||
return prisma.employeePassport.findMany({
|
return prisma.employeePassport.findMany({
|
||||||
orderBy: { createdAt: "asc" },
|
orderBy: { expireDate: "desc" },
|
||||||
where: { employeeId },
|
where: { employeeId },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ export class EmployeeVisaController extends Controller {
|
||||||
@Security("keycloak")
|
@Security("keycloak")
|
||||||
async list(@Path() employeeId: string) {
|
async list(@Path() employeeId: string) {
|
||||||
return prisma.employeeVisa.findMany({
|
return prisma.employeeVisa.findMany({
|
||||||
orderBy: { createdAt: "asc" },
|
orderBy: { expireDate: "desc" },
|
||||||
where: { employeeId },
|
where: { employeeId },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue