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", "ไม่สามารถลบไอดี: " + 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); await this.salaryRepository.remove(chk_Salary);
return new HttpSuccess(); return new HttpSuccess();
} catch (error: any) { } catch (error: any) {

View file

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