no message

This commit is contained in:
Kittapath 2024-06-17 13:27:11 +07:00
parent 30286317c6
commit 61b56a0d62
2 changed files with 41 additions and 40 deletions

View file

@ -1631,6 +1631,7 @@ export class ProfileController extends Controller {
profileId: profile.id,
prefix: profile.prefix,
rank: profile.rank,
isProbation: profile.isProbation,
firstName: profile.firstName,
lastName: profile.lastName,
citizenId: profile.citizenId,

View file

@ -809,6 +809,20 @@ export class ProfileEmployeeController extends Controller {
return new HttpSuccess(historyProfile);
}
/**
* API
*
* @summary ORG_038 - (ADMIN) #
*
*/
@Get("report")
async getReport(@Request() request: RequestWithUser) {
const profiles = await this.profileRepo.find({
where: { statusTemp: "REPORT", employeeClass: "TEMP" },
});
return new HttpSuccess(profiles);
}
/**
* API
*
@ -2853,20 +2867,6 @@ export class ProfileEmployeeController extends Controller {
return new HttpSuccess();
}
/**
* API
*
* @summary ORG_038 - (ADMIN) #
*
*/
@Get("report")
async getReport(@Request() request: RequestWithUser) {
const profiles = await this.profileRepo.find({
where: { statusTemp: "REPORT", employeeClass: "TEMP" },
});
return new HttpSuccess(profiles);
}
/**
* API
*
@ -2957,38 +2957,38 @@ export class ProfileEmployeeController extends Controller {
break;
case "firstname":
[findProfile, total] = await this.profileRepo.findAndCount({
where: {
keycloak: IsNull(),
firstName: Like(`%${body.keyword}%`),
},
relations: ["posType", "posLevel", "current_holders", "profileSalarys"],
skip,
take,
});
[findProfile, total] = await this.profileRepo.findAndCount({
where: {
keycloak: IsNull(),
firstName: Like(`%${body.keyword}%`),
},
relations: ["posType", "posLevel", "current_holders", "profileSalarys"],
skip,
take,
});
break;
case "lastname":
[findProfile, total] = await this.profileRepo.findAndCount({
where: {
keycloak: IsNull(),
lastName: Like(`%${body.keyword}%`),
},
relations: ["posType", "posLevel", "current_holders", "profileSalarys"],
skip,
take,
});
[findProfile, total] = await this.profileRepo.findAndCount({
where: {
keycloak: IsNull(),
lastName: Like(`%${body.keyword}%`),
},
relations: ["posType", "posLevel", "current_holders", "profileSalarys"],
skip,
take,
});
break;
default:
[findProfile, total] = await this.profileRepo.findAndCount({
where: {
keycloak: IsNull(),
},
relations: ["posType", "posLevel", "current_holders", "profileSalarys"],
skip,
take,
});
[findProfile, total] = await this.profileRepo.findAndCount({
where: {
keycloak: IsNull(),
},
relations: ["posType", "posLevel", "current_holders", "profileSalarys"],
skip,
take,
});
break;
}