no message
This commit is contained in:
parent
d44de0bb09
commit
91ba933a65
3 changed files with 5 additions and 5 deletions
|
|
@ -3500,7 +3500,7 @@ export class CommandController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
let profile: any = await this.profileRepository.findOne({
|
let profile: any = await this.profileRepository.findOne({
|
||||||
where: { citizenId: item.bodyProfile.citizenId },
|
where: { citizenId: item.bodyProfile.citizenId, isActive: true },
|
||||||
relations: ["roleKeycloaks"],
|
relations: ["roleKeycloaks"],
|
||||||
});
|
});
|
||||||
if (!profile) {
|
if (!profile) {
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
// item.current_holder == null || item.current_holder.profileSalary.length == 0
|
// item.current_holder == null || item.current_holder.profileSalary.length == 0
|
||||||
// ? null
|
// ? null
|
||||||
// : item.current_holder.profileSalary.sort((a: any, b: any) => b.date - a.date)[0].amount;
|
// : item.current_holder.profileSalary.sort((a: any, b: any) => b.date - a.date)[0].amount;
|
||||||
const amount = item.current_holder?item.current_holder.amount:null;
|
const amount = item.current_holder ? item.current_holder.amount : null;
|
||||||
let datePeriodStart = new Date(
|
let datePeriodStart = new Date(
|
||||||
`${new Date().getFullYear()}-${String(new Date().getMonth() + 1).padStart(2, "0")}-${String(new Date().getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
|
`${new Date().getFullYear()}-${String(new Date().getMonth() + 1).padStart(2, "0")}-${String(new Date().getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
|
||||||
);
|
);
|
||||||
|
|
@ -385,7 +385,7 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
// item.current_holder == null || item.current_holder.profileSalary.length == 0
|
// item.current_holder == null || item.current_holder.profileSalary.length == 0
|
||||||
// ? null
|
// ? null
|
||||||
// : item.current_holder.profileSalary.sort((a: any, b: any) => b.date - a.date)[0].amount;
|
// : item.current_holder.profileSalary.sort((a: any, b: any) => b.date - a.date)[0].amount;
|
||||||
const amount = item.current_holder?item.current_holder.amount:null;
|
const amount = item.current_holder ? item.current_holder.amount : null;
|
||||||
let datePeriodStart = new Date(
|
let datePeriodStart = new Date(
|
||||||
`${new Date().getFullYear()}-${String(new Date().getMonth() + 1).padStart(2, "0")}-${String(new Date().getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
|
`${new Date().getFullYear()}-${String(new Date().getMonth() + 1).padStart(2, "0")}-${String(new Date().getDate() + 1).padStart(2, "0")}T00:00:00.000Z`,
|
||||||
);
|
);
|
||||||
|
|
@ -947,7 +947,7 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
if (val >= 70 && val <= 79) return "ดี";
|
if (val >= 70 && val <= 79) return "ดี";
|
||||||
if (val >= 80 && val <= 89) return "ดีมาก";
|
if (val >= 80 && val <= 89) return "ดีมาก";
|
||||||
if (val >= 90 && val <= 100) return "ดีเด่น";
|
if (val >= 90 && val <= 100) return "ดีเด่น";
|
||||||
if (val > 101 ) return "ดีเด่น";
|
if (val > 101) return "ดีเด่น";
|
||||||
else return "-";
|
else return "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5829,7 +5829,7 @@ export class ProfileController extends Controller {
|
||||||
@Get("citizenid/position/{id}")
|
@Get("citizenid/position/{id}")
|
||||||
async getProfileByCitizenId(@Request() request: RequestWithUser, @Path() id: string) {
|
async getProfileByCitizenId(@Request() request: RequestWithUser, @Path() id: string) {
|
||||||
const profile = await this.profileRepo.findOne({
|
const profile = await this.profileRepo.findOne({
|
||||||
where: { citizenId: id },
|
where: { citizenId: id, isActive: true },
|
||||||
relations: [
|
relations: [
|
||||||
"posLevel",
|
"posLevel",
|
||||||
"posType",
|
"posType",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue