เช็คเลขบัตร ปชช.

This commit is contained in:
Bright 2024-05-17 12:54:18 +07:00
parent 68394fe07c
commit a529207692
9 changed files with 60 additions and 12 deletions

View file

@ -20,7 +20,7 @@ import { RequestWithUser } from "../middlewares/user";
import { ProfileEmployee } from "../entities/ProfileEmployee";
import { ProfileFamilyMother, CreateProfileEmployeeFamilyMother, UpdateProfileFamilyMother } from "../entities/ProfileFamilyMother";
import { ProfileFamilyMotherHistory } from "../entities/ProfileFamilyMotherHistory";
import Extension from "../interfaces/extension";
@Route("api/v1/org/profile-employee/family/mother")
@Tags("ProfileEmployeeFamilyMother")
@Security("bearerAuth")
@ -136,6 +136,7 @@ export class ProfileFamilyMotherEmployeeController extends Controller {
if (!profile) {
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
}
familyMother.motherCitizenId = Extension.CheckCitizen(String(body.motherCitizenId));
familyMother.createdUserId = req.user.sub;
familyMother.createdFullName = req.user.name;
familyMother.lastUpdateUserId = req.user.sub;
@ -175,7 +176,7 @@ export class ProfileFamilyMotherEmployeeController extends Controller {
Object.assign(familyMother, body);
familyMother.lastUpdateUserId = req.user.sub,
familyMother.lastUpdateFullName = req.user.name;
familyMother.motherCitizenId = Extension.CheckCitizen(String(body.motherCitizenId));
history.profileFamilyMotherId = familyMother.id;
history.motherPrefix = familyMother.motherPrefix,
history.motherFirstName = familyMother.motherFirstName,