แก้ไขบัค employeeSalary
This commit is contained in:
parent
067231d291
commit
6f74d3ddcc
3 changed files with 5 additions and 8 deletions
|
|
@ -67,7 +67,7 @@ export class ProfileSalaryEmployeeController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
const dest_item = await this.salaryRepo.findOne({
|
const dest_item = await this.salaryRepo.findOne({
|
||||||
where: { profileId: body.profileEmployeeId },
|
where: { profileEmployeeId: body.profileEmployeeId },
|
||||||
order: { order: "DESC" },
|
order: { order: "DESC" },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -148,6 +148,10 @@ export class ProfileSalary extends EntityBase {
|
||||||
@ManyToOne(() => Profile, (profile) => profile.profileSalary)
|
@ManyToOne(() => Profile, (profile) => profile.profileSalary)
|
||||||
@JoinColumn({ name: "profileId" })
|
@JoinColumn({ name: "profileId" })
|
||||||
profile: Profile;
|
profile: Profile;
|
||||||
|
|
||||||
|
@ManyToOne(() => ProfileEmployee, (ProfileEmployee) => ProfileEmployee.profileSalarys)
|
||||||
|
@JoinColumn({ name: "profileEmployeeId" })
|
||||||
|
profileEmployee: ProfileEmployee;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileSalary {
|
export class CreateProfileSalary {
|
||||||
|
|
|
||||||
|
|
@ -14,13 +14,6 @@ import { ProfileSalary } from "./ProfileSalary";
|
||||||
|
|
||||||
@Entity("profileSalaryHistory")
|
@Entity("profileSalaryHistory")
|
||||||
export class ProfileSalaryHistory extends EntityBase {
|
export class ProfileSalaryHistory extends EntityBase {
|
||||||
@Column({
|
|
||||||
length: 40,
|
|
||||||
comment: "คีย์นอก(FK)ของตาราง profile",
|
|
||||||
type: "uuid",
|
|
||||||
})
|
|
||||||
profileId: string;
|
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
comment: "วันที่",
|
comment: "วันที่",
|
||||||
type: "datetime",
|
type: "datetime",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue