diff --git a/src/controllers/ProfileDisciplineController.ts b/src/controllers/ProfileDisciplineController.ts index e7690b77..5bbf85eb 100644 --- a/src/controllers/ProfileDisciplineController.ts +++ b/src/controllers/ProfileDisciplineController.ts @@ -34,24 +34,9 @@ export class ProfileDisciplineController extends Controller { private disciplineHistoryRepository = AppDataSource.getRepository(ProfileDisciplineHistory); @Get("{profileId}") - @Example({ - status: 200, - message: "สำเร็จ", - result: [ - { - id: "debfa8a7-83fb-4801-a940-8ae74e7638d3", - date: "2024-03-12T10:09:47.000Z", - level: "string", - detail: "string", - unStigma: "string", - refCommandNo: "string", - refCommandDate: "2024-03-12T10:09:47.000Z", - }, - ], - }) public async getDiscipline(@Path() profileId: string) { const lists = await this.disciplineRepository.find({ - where: { profileId: profileId }, + where: { profileEmployeeId: profileId }, select: [ "id", "date", diff --git a/src/controllers/ProfileLeaveEmployeeController.ts b/src/controllers/ProfileLeaveEmployeeController.ts index 6fa06140..d62cb018 100644 --- a/src/controllers/ProfileLeaveEmployeeController.ts +++ b/src/controllers/ProfileLeaveEmployeeController.ts @@ -40,7 +40,7 @@ export class ProfileLeaveEmployeeController extends Controller { public async getLeave(@Path() profileId: string) { const record = await this.leaveRepo.find({ relations: { leaveType: true }, - where: { profileId }, + where: { profileEmployeeId: profileId }, }); return new HttpSuccess(record); } diff --git a/src/controllers/ProfileNopaidEmployeeController.ts b/src/controllers/ProfileNopaidEmployeeController.ts index fc54a656..bec7b723 100644 --- a/src/controllers/ProfileNopaidEmployeeController.ts +++ b/src/controllers/ProfileNopaidEmployeeController.ts @@ -34,23 +34,9 @@ export class ProfileNopaidEmployeeController extends Controller { private nopaidHistoryRepository = AppDataSource.getRepository(ProfileNopaidHistory); @Get("{profileId}") - @Example({ - status: 200, - message: "สำเร็จ", - result: [ - { - id: "debfa8a7-83fb-4801-a940-8ae74e7638d3", - date: "2024-03-12T10:09:47.000Z", - reference: "string", - detail: "string", - refCommandNo: "string", - refCommandDate: "2024-03-12T10:09:47.000Z", - }, - ], - }) public async getNopaid(@Path() profileId: string) { const lists = await this.nopaidRepository.find({ - where: { profileId }, + where: { profileEmployeeId: profileId }, }); return new HttpSuccess(lists); } diff --git a/src/entities/ProfileSalaryEmployee.ts b/src/entities/ProfileSalaryEmployee.ts index 7b21dc74..4a19c04d 100644 --- a/src/entities/ProfileSalaryEmployee.ts +++ b/src/entities/ProfileSalaryEmployee.ts @@ -229,6 +229,7 @@ export class ProfileSalaryEmployee extends EntityBase { // commandNo: string; @Column({ + nullable: true, comment: "ประเภทคำสั่ง", type: "text", })