edit del && fields salaryRank

This commit is contained in:
Bright 2024-02-19 10:25:45 +07:00
parent 00b643c129
commit fbda0293c7
2 changed files with 10 additions and 6 deletions

View file

@ -211,6 +211,10 @@ export class Salary extends Controller {
"ไม่สามารถลบไอดี: " + id + " ได้ เนื่องสถานะการใช้งานที่เป็น Default",
);
}
const del_SalaryRank = await this.salaryRankRepository.find({
where: { salaryId: chk_Salary.id }
});
await this.salaryRankRepository.remove(del_SalaryRank);
await this.salaryRepository.remove(chk_Salary);
return new HttpSuccess();
} catch (error: any) {

View file

@ -82,22 +82,22 @@ export class CreateSalaryRank {
salary: number;
@Column()
salaryHalf?: number;
salaryHalf?: number | null;
@Column()
salaryHalfSpecial?: number;
salaryHalfSpecial?: number | null;
@Column()
salaryFull?: number;
salaryFull?: number | null;
@Column()
salaryFullSpecial?: number;
salaryFullSpecial?: number | null;
@Column()
salaryFullHalf?: number;
salaryFullHalf?: number | null;
@Column()
salaryFullHalfSpecial?: number;
salaryFullHalfSpecial?: number | null;
@Column()
isNext: boolean;