sort date position history

This commit is contained in:
mamoss 2025-08-26 14:08:08 +07:00
parent 910e568973
commit 1cd3876b3e
3 changed files with 3 additions and 0 deletions

View file

@ -2485,6 +2485,7 @@ export class EmployeePositionController extends Controller {
async listPosMasterHistory(@Path() id: string, @Request() request: RequestWithUser) {
const posMasterHistory = await this.posMasterHistoryRepository.find({
where: { ancestorDNA: id },
order: { createdAt: "DESC" },
});
return new HttpSuccess(posMasterHistory);

View file

@ -2221,6 +2221,7 @@ export class EmployeeTempPositionController extends Controller {
async listPosMasterHistory(@Path() id: string, @Request() request: RequestWithUser) {
const posMasterHistory = await this.posMasterHistoryRepository.find({
where: { ancestorDNA: id },
order: { createdAt: "DESC" },
});
return new HttpSuccess(posMasterHistory);

View file

@ -5636,6 +5636,7 @@ export class PositionController extends Controller {
async listPosMasterHistory(@Path() id: string, @Request() request: RequestWithUser) {
const posMasterHistory = await this.posMasterHistoryRepository.find({
where: { ancestorDNA: id },
order: { createdAt: "DESC" },
});
return new HttpSuccess(posMasterHistory);