แก้ create เป็น update เมนูทะเบียนประวัติ

This commit is contained in:
AdisakKanthawilang 2024-08-27 12:11:31 +07:00
parent fde5f8d90a
commit f281ea0bc2
61 changed files with 193 additions and 147 deletions

View file

@ -216,7 +216,7 @@ export class ProfileFamilyFatherController extends Controller {
if (!profile) {
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
}
await new permission().PermissionOrgUserCreate(req, "SYS_REGISTRY_OFFICER", profile.id);//ตส
await new permission().PermissionOrgUserUpdate(req, "SYS_REGISTRY_OFFICER", profile.id); //ไม่แน่ใจOFF
familyFather.fatherCitizenId = Extension.CheckCitizen(String(body.fatherCitizenId));
familyFather.createdUserId = req.user.sub;
familyFather.createdFullName = req.user.name;
@ -239,7 +239,7 @@ export class ProfileFamilyFatherController extends Controller {
@Body() body: UpdateProfileFamilyFather,
@Path() profileId: string,
) {
await new permission().PermissionOrgUserUpdate(req, "SYS_REGISTRY_OFFICER", profileId);//ตส
await new permission().PermissionOrgUserUpdate(req, "SYS_REGISTRY_OFFICER", profileId); //ไม่แน่ใจOFF
const familyFather = await this.ProfileFamilyFather.findOneBy({ profileId: profileId });
if (!familyFather) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");