แก้เช็คอัจราในผังเงินเดือนลูกจ้าง

This commit is contained in:
Kittapath 2024-03-13 13:45:57 +07:00
parent c124a05561
commit 9fa5e03d24

View file

@ -23,7 +23,7 @@ import {
SalaryRankEmployees,
UpdateSalaryRankEmployee,
} from "../entities/SalaryRankEmployees";
import { Salarys } from "../entities/Salarys";
import { SalaryEmployees } from "../entities/SalaryEmployees";
@Route("api/v1/salary/rate/employee")
@Tags("SalaryRankEmployee")
@Security("bearerAuth")
@ -34,7 +34,7 @@ import { Salarys } from "../entities/Salarys";
@SuccessResponse(HttpStatusCode.OK, "สำเร็จ")
export class SalaryRankEmployeesController extends Controller {
private salaryRankEmployeeRepository = AppDataSource.getRepository(SalaryRankEmployees);
private salaryRepository = AppDataSource.getRepository(Salarys);
private salaryEmployeeRepository = AppDataSource.getRepository(SalaryEmployees);
/**
* API
@ -48,7 +48,7 @@ export class SalaryRankEmployeesController extends Controller {
@Request() request: { user: Record<string, any> },
) {
try {
const checkSalary = await this.salaryRepository.findOne({
const checkSalary = await this.salaryEmployeeRepository.findOne({
where: { id: requestBody.salaryEmployeeId },
});
if (!checkSalary) {