fix ลบรายการกลุ่มงานลูกจ้างประจำ

This commit is contained in:
Bright 2024-12-25 12:24:32 +07:00
parent dcbda3b94e
commit 12ae8172d5

View file

@ -141,10 +141,11 @@ export class EmployeePosTypeController extends Controller {
async deleteType(@Path() id: string, @Request() request: RequestWithUser) {
let result: any;
try {
result = await this.employeePosTypeRepository.findOne({
where: { id: id },
});
await this.employeePosTypeRepository.remove(result, { data: request });
// result = await this.employeePosTypeRepository.findOne({
// where: { id: id },
// });
// await this.employeePosTypeRepository.remove(result, { data: request });
result = await this.employeePosTypeRepository.delete({ id: id });
} catch {
throw new HttpError(
HttpStatusCode.NOT_FOUND,