แก้api ลูกจ้างประจำ
This commit is contained in:
parent
ab138c2e04
commit
23e5d4f7fe
44 changed files with 7960 additions and 79 deletions
|
|
@ -148,7 +148,7 @@ export class ProfileAssessmentsEmployeeController extends Controller {
|
|||
@Request() req: RequestWithUser,
|
||||
@Body() body: CreateProfileEmployeeAssessment,
|
||||
) {
|
||||
await new permission().PermissionCreate(req,"SYS_REGISTRY_EMP");
|
||||
await new permission().PermissionCreate(req, "SYS_REGISTRY_EMP");
|
||||
if (!body.profileEmployeeId) {
|
||||
throw new HttpError(HttpStatus.BAD_REQUEST, "กรุณากรอก profileEmployeeId");
|
||||
}
|
||||
|
|
@ -178,7 +178,7 @@ export class ProfileAssessmentsEmployeeController extends Controller {
|
|||
@Request() req: RequestWithUser,
|
||||
@Path() assessmentId: string,
|
||||
) {
|
||||
await new permission().PermissionUpdate(req,"SYS_REGISTRY_EMP");
|
||||
await new permission().PermissionUpdate(req, "SYS_REGISTRY_EMP");
|
||||
const record = await this.profileAssessmentsRepository.findOneBy({ id: assessmentId });
|
||||
if (!record) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
|
||||
|
|
@ -199,8 +199,11 @@ export class ProfileAssessmentsEmployeeController extends Controller {
|
|||
}
|
||||
|
||||
@Delete("{assessmentId}")
|
||||
public async deleteProfileAssessment(@Path() assessmentId: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionDelete(req,"SYS_REGISTRY_EMP");
|
||||
public async deleteProfileAssessment(
|
||||
@Path() assessmentId: string,
|
||||
@Request() req: RequestWithUser,
|
||||
) {
|
||||
await new permission().PermissionDelete(req, "SYS_REGISTRY_EMP");
|
||||
await this.profileAssessmentsHistoryRepository.delete({
|
||||
profileAssessmentId: assessmentId,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue