migrate (add field profileTraing.developmentId) & filter commandNo
This commit is contained in:
parent
aaf2ad880d
commit
afc8bbf26a
3 changed files with 1003 additions and 2 deletions
|
|
@ -23,7 +23,7 @@ import HttpError from "../interfaces/http-error";
|
||||||
import { ProfileSalaryHistory } from "../entities/ProfileSalaryHistory";
|
import { ProfileSalaryHistory } from "../entities/ProfileSalaryHistory";
|
||||||
import { RequestWithUser } from "../middlewares/user";
|
import { RequestWithUser } from "../middlewares/user";
|
||||||
import { ProfileEmployee } from "../entities/ProfileEmployee";
|
import { ProfileEmployee } from "../entities/ProfileEmployee";
|
||||||
import { LessThan, MoreThan } from "typeorm";
|
import { In, LessThan, MoreThan } from "typeorm";
|
||||||
import permission from "../interfaces/permission";
|
import permission from "../interfaces/permission";
|
||||||
import { setLogDataDiff } from "../interfaces/utils";
|
import { setLogDataDiff } from "../interfaces/utils";
|
||||||
@Route("api/v1/org/profile-employee/salary")
|
@Route("api/v1/org/profile-employee/salary")
|
||||||
|
|
@ -66,7 +66,7 @@ export class ProfileSalaryEmployeeController extends Controller {
|
||||||
if (_workflow == false)
|
if (_workflow == false)
|
||||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileId);
|
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_EMP", profileId);
|
||||||
const record = await this.salaryRepo.find({
|
const record = await this.salaryRepo.find({
|
||||||
where: { profileEmployeeId: profileId },
|
where: { profileEmployeeId: profileId, commandCode: In(["5", "6", "7"]) },
|
||||||
order: { order: "ASC" },
|
order: { order: "ASC" },
|
||||||
});
|
});
|
||||||
return new HttpSuccess(record);
|
return new HttpSuccess(record);
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,14 @@ export class ProfileTraining extends EntityBase {
|
||||||
})
|
})
|
||||||
isDate: boolean;
|
isDate: boolean;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 40,
|
||||||
|
comment: "ไอดีโครงการ/หลักสูตรการฝึกอบรม",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
developmentId: string;
|
||||||
|
|
||||||
@OneToMany(
|
@OneToMany(
|
||||||
() => ProfileTrainingHistory,
|
() => ProfileTrainingHistory,
|
||||||
(profileTrainingHistory) => profileTrainingHistory.histories,
|
(profileTrainingHistory) => profileTrainingHistory.histories,
|
||||||
|
|
@ -136,6 +144,7 @@ export class CreateProfileTraining {
|
||||||
name: string | null;
|
name: string | null;
|
||||||
yearly: number | null;
|
yearly: number | null;
|
||||||
isDate: boolean | null;
|
isDate: boolean | null;
|
||||||
|
developmentId?: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileEmployeeTraining {
|
export class CreateProfileEmployeeTraining {
|
||||||
|
|
@ -151,6 +160,7 @@ export class CreateProfileEmployeeTraining {
|
||||||
name: string | null;
|
name: string | null;
|
||||||
yearly: number | null;
|
yearly: number | null;
|
||||||
isDate: boolean | null;
|
isDate: boolean | null;
|
||||||
|
developmentId?: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UpdateProfileTraining = {
|
export type UpdateProfileTraining = {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue