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) {